68 Commits
Author SHA1 Message Date
gurixandClaude Opus 4.6 a242ce1570 feat(02-03): add IndexedDB accessor methods for companionAssets, styleReference, forestElements
- saveCompanionAssets/getCompanionAssets keyed by characterType
- saveStyleReference/getStyleReference singleton pattern (id: 1)
- saveForestElement (auto-increment add) / getForestElements (getAll)
- Extended type imports for CompanionAssets, CompanionType, ForestElement, StyleReference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:04:48 +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 66f8403b33 feat(02-02): add 7 SVG fallback images for forest elements
- blume, pilz, vogel, schmetterling, reh, baum, bach
- Pastel watercolor style with soft gradients, 200x200 viewBox
- All under 2KB, no text elements, child-friendly aesthetic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:54:56 +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 24bcbd1bba feat(02-02): add fallback texts module with German greetings, forest comments, and letter intros
- 10 time-of-day keyed greetings (morgen/mittag/abend/any)
- 10 forest element discovery comments
- 13 letter introductions for levels 1-6 with finger mapping
- Helper functions for random selection and letter lookup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:53:47 +02:00
gurixandClaude Opus 4.6 78d516c55d fix(01): add lesson cancel button and handle level 6 completion
- Back button in lesson screen to return to forest without completing
- "Alle Stufen geschafft!" message when all 6 levels are done
- Cap currentLevel at MAX_LEVEL to prevent out-of-bounds progression

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:30:55 +02:00
gurixandClaude Opus 4.6 5bac8501bf feat(01-05): forest screen with level map and complete app flow
- Add forest overview screen with 6-level map showing locked/current/completed states
- Create src/forest/scene.ts with getLevelStatus, renderLevelMap, initForestScreen
- Wire complete flow: welcome -> forest -> lesson -> forest with progress updates
- Add forest CSS with level card styles and continue button

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:15:18 +02:00
gurixandClaude Opus 4.6 ba4525daf3 feat(01-04): wire lesson screen UI with keyboard and falling letters
- Lesson screen HTML with letter-area and keyboard containers
- initLessonScreen: renders keyboard, shows letters, handles keypress
- Correct key dissolves letter with animation, advances to next
- Wrong key does nothing (per D-03), correct key stays highlighted
- startLesson in app.ts: manages lesson lifecycle and cleanup
- onComplete: updates progress, unlocks next level, saves to IndexedDB
- CSS: floating letter animation, dissolve effect on correct press

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:12:13 +02:00
gurixandClaude Opus 4.6 5fe66cb315 feat(01-04): implement typing exercise engine with TDD
- generateLetters: random 8-12 letters from level key set
- handleKeyPress: correct/wrong input with adaptive tempo
- Adaptive tempo: 3s start, -200ms after 2x correct, +500ms on error
- Bounds: min 1500ms, max 4000ms
- 18 passing tests covering all behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:10:53 +02:00
gurixandClaude Opus 4.6 2f0784fd14 feat(01-03): add QWERTZ keyboard renderer with finger colors and animations
- Full QWERTZ keyboard with DE and CH layout support
- Finger color mapping for all keys per spec section 8.3
- renderKeyboard, highlightKey, pressKey, updateKeyboardForLevel exports
- CSS: pulse animation for target key, press animation on keydown
- Inactive keys grayed at 0.5 opacity, active keys with finger colors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:07:52 +02:00
gurixandClaude Opus 4.6 20a7670ef9 feat(01-02): welcome screen UI with onboarding flow
- Implement initWelcomeScreen with companion card rendering, layout toggle, start button
- Update index.html with welcome screen structure (companion-grid, layout-toggle, start-btn)
- Add CSS for companion cards, layout buttons, start button with hover/selected/disabled states
- Selecting a companion enables start, clicking start saves progress to IndexedDB and navigates to forest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:06:54 +02:00
gurixandClaude Opus 4.6 afae18decc feat(01-03): implement level definitions 1-6 with finger mappings
- 6 levels per spec section 4.1 progression table
- Finger-to-CSS-variable mapping per spec section 8.3
- getLevelByNumber and getKeysUpToLevel helper functions
- All 14 tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:06:22 +02:00
gurixandClaude Opus 4.6 4b5502f5fa feat(01-02): screen management and companion definitions
- Create companion/characters.ts with 4 companion definitions (fee, einhorn, fuchs, eule)
- Create app.ts with showScreen, getDB, initApp (routes to welcome or forest)
- Update main.ts to call initApp on DOMContentLoaded
- Add stub ui/screens.ts for initWelcomeScreen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:05:59 +02:00
gurixandClaude Opus 4.6 3462a6704e test(01-03): add failing tests for level definitions
- 13 tests covering levels array, key progressions, finger mappings
- Tests for getLevelByNumber and getKeysUpToLevel helpers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:05:56 +02:00
gurixandClaude Opus 4.6 6c065db8ce chore(01-01): apply biome formatting to CSS and test imports
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:03:20 +02:00
gurixandClaude Opus 4.6 9912bfa387 feat(01-01): implement TypeScript interfaces and IndexedDB wrapper
- All shared interfaces: Progress, Settings, ForestElement, CompanionAssets, etc.
- IndexedDB wrapper with 5 stores (progress, companionAssets, styleReference, forestElements, settings)
- CRUD for progress and settings stores
- 5 passing tests with fake-indexeddb

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:02:43 +02:00
gurixandClaude Opus 4.6 35c1ef1b80 test(01-01): add failing tests for IndexedDB wrapper
- Tests for openDB with 5 stores, progress CRUD, settings CRUD
- Tests for null return on empty DB
- RED phase: implementation not yet created

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:01:40 +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