7 Commits
Author SHA1 Message Date
gurix 5f47feaf32 refactor: remove checkRateLimit and incrementApiCall completely 2026-03-29 23:38:54 +02:00
gurix 2365a95f98 feat: remove application-side API rate limits 2026-03-29 23:29:16 +02:00
gurix c19b7fedc1 feat(04-01): add audio/speech modules and speechEnabled to Settings
- Create src/audio/sounds.ts with playCorrectSound, playRewardSound, playForestElementSound
- Create src/audio/speech.ts with speakText via Web Speech API
- Add speechEnabled field to Settings interface in types.ts
- Add speechEnabled defaults in all Settings initializers (gemini.ts, parent.ts, db.test.ts)
- All sound functions check audioEnabled, speakText checks speechEnabled
- AudioContext lazy initialization for autoplay policy compliance
2026-03-29 18:16:53 +02:00
gurixandClaude Opus 4.6 d4207bf33d feat(03-01): extend Progress type, add LessonPhase, update rate limits
- Progress: added totalCorrect, totalErrors, errorKeyCounts, lastPlayedLevels
- New LessonPhase type: discover | practice | words
- Rate limits: 10 text / 5 image per day (was 1 each)
- Updated screens.ts with new Progress field defaults
- Updated existing tests for new rate limits and Progress shape

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:42:32 +02:00
gurixandClaude Opus 4.6 2bea324962 feat(02-01): implement config loader and Gemini API client
- Config loader: fetches/caches public/config.json with GeminiConfig interface
- generateText: Gemini REST with 3x exponential backoff retry, returns string|null
- generateImage: reference images as base64 inlineData, responseModalities: ["IMAGE"]
- Rate limiting: checkRateLimit/incrementApiCall with daily reset in Settings store
- Extended Settings type with apiCallsToday and lastApiCallDate fields
- 18 tests across config.test.ts and gemini.test.ts, all passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:56:21 +02:00
gurixandClaude Opus 4.6 b31b9fd26c test(02-01): add failing tests for config loader and Gemini API client
- Config loader: fetch, error handling, caching (6 tests)
- Gemini text: response extraction, request body, retry, failure (4 tests)
- Gemini image: blob extraction, reference images, responseModalities, failure (4 tests)
- Rate limiting: under limit, at limit, increment, daily reset (4 tests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:53:57 +02:00
gurixandClaude Opus 4.6 4dc9523044 feat(01-01): scaffold Vite project with CSS design system and project structure
- Vite 6 + TypeScript + Biome + Vitest configured
- All directories from spec section 13 created
- CSS custom properties for full color palette and finger colors
- index.html with 5 screen sections and Google Fonts
- Dev server binds to 0.0.0.0:5173 for VPS access

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:01:10 +02:00