How ejnburrows-rgb/cartilla-de-gretel works
La Cartilla de Gretel is a digital classroom edition of a Spanish literacy workbook. Learners enter through the book and lesson experience, practice with interactive activities—including a speaking piano and microphone-based syllable recognition—and can retain progress locally or sync it through student services. Teachers have a separate authenticated classroom and CRM experience. The graph emphasizes documented runtime links; several broader lesson, workbook, and teacher capabilities are represented by their source directories because their implementation was not sampled.
Main entry points: usePianoSession.ts Speaking piano session · cartilla Book and lesson routes · client.ts Supabase client · student-session.ts Student progress
Components 20
Learner experience
- App entry
src/main.tsx - Route registry
src/router.tsx - Book and lesson routes
src/routes/cartilla - Workbook views
src/components/cartilla
Learning activities
- Interactive activities
src/cartilla/interactions - Speaking piano session
src/components/cartilla/piano/usePianoSession.ts - Microphone listening
src/hooks/usePianoListening.ts - Lesson content
src/content - Gretel live avatar
src/components/gretel/GretelLiveAvatar.tsx - Gretel animation
src/components/gretel/useGretelAnimation.ts
Progress and teaching
- Student progress
src/lib/student-session.ts - Learner-scoped storage
src/lib/learner-storage.ts - Teacher routes
src/routes/cartilla/teacher - Teacher CRM
src/features/teacher-crm
Shared services
- Supabase client
src/integrations/supabase/client.ts - Speech playback
src/lib/speech-playback.ts - Audio engine
src/lib/audio-engine.ts
Other components
- Learner
- Supabase service
- Browser speech recognition
Connections 17
- App entry → Route registry: starts
src/main.tsx - Route registry → Book and lesson routes: routes via registry
- Learner → Book and lesson routes: opens lessons
- Book and lesson routes → Workbook views: renders views
- Workbook views → Interactive activities: offers activities
- Speaking piano session → Microphone listening: starts listening
src/components/cartilla/piano/usePianoSession.ts - Microphone listening → Browser speech recognition: uses browser API
src/hooks/usePianoListening.ts - Speaking piano session → Speech playback: claims speech
src/components/cartilla/piano/usePianoSession.ts - Speaking piano session → Lesson content: uses word content
- Gretel live avatar → Gretel animation: uses animation
src/components/gretel/GretelLiveAvatar.tsx - Gretel animation → Lesson content: uses character states
- Student progress → Learner-scoped storage: records locally
- Student progress → Supabase client: submits progress
src/lib/student-session.ts - Supabase client → Supabase service: connects when configured
src/integrations/supabase/client.ts - Teacher routes → Supabase client: checks session
src/routes/cartilla/teacher/route.tsx - Teacher routes → Teacher CRM: serves CRM pages
- Audio engine → Speech playback: stops picture speech
src/lib/audio-engine.ts