How ali09154000/spark-and-chat-studio works
SpeakWell is an English-speaking practice app with sign-in, a protected dashboard, voice/conversation practice, transcription, and speaking assessments. The visible workflow runs from authentication into the dashboard, then branches into practice services and assessment reporting; the live-voice relay is a separate server-side capability. Supabase provides authentication and the application’s practice data model. Some routes and service implementations were not excerpted, so their internal links are omitted rather than inferred.
Main entry points: client.ts Supabase client · practice-ai.server.ts Practice AI service · auth.tsx Sign-in · index.tsx Home page
Components 23
App entry and identity
- Home page
src/routes/index.tsx - Sign-in
src/routes/auth.tsx - Authenticated gate
src/routes/_authenticated/route.tsx - Dashboard route
src/routes/_authenticated/dashboard.tsx
Practice experience
- App shell
src/components/speakwell/app-shell.tsx - Live voice hook
src/hooks/use-live-voice.ts - Conversation UI
src/components/ai-elements/conversation.tsx - Prompt input
src/components/ai-elements/prompt-input.tsx - Assessment report
src/components/speakwell/assessment-report.tsx
Practice services
- Practice functions
src/lib/speakwell.functions.ts - Transcription route
src/routes/api/practice.transcribe.ts - Assessment route
src/routes/api/practice.assess.ts - Practice AI service
src/lib/practice-ai.server.ts - Assessment parsing
src/lib/practice-assessment.ts - Chat route
src/routes/api/chat.ts - Chat service
src/lib/chat.server.ts - Live voice relay
src/lib/live-relay.server.ts
Backend and integrations
- Supabase client
src/integrations/supabase/client.ts - Preview auth storage
src/integrations/supabase/previewAuthStorage.ts - Auth middleware
src/integrations/supabase/auth-middleware.ts - Supabase data store
src/integrations/supabase/types.ts
Other components
- Learner
- AI gateway
Connections 20
- Learner → Home page: visits
src/routes/index.tsx - Home page → Supabase client: checks session
src/routes/index.tsx - Home page → Sign-in: opens sign-in
src/routes/index.tsx - Learner → Sign-in: signs in
src/routes/auth.tsx - Sign-in → Supabase client: authenticates
src/routes/auth.tsx - Authenticated gate → Supabase client: checks user
src/routes/_authenticated/route.tsx - Authenticated gate → Sign-in: redirects unauthenticated
src/routes/_authenticated/route.tsx - Dashboard route → App shell: renders
src/routes/_authenticated/dashboard.tsx - Dashboard route → Practice functions: calls
src/routes/_authenticated/dashboard.tsx - App shell → Supabase client: uses
src/components/speakwell/app-shell.tsx - Transcription route → Practice AI service: delegates to
src/routes/api/practice.transcribe.ts - Assessment route → Practice AI service: delegates to
src/routes/api/practice.assess.ts - Practice AI service → Assessment parsing: parses assessment
src/lib/practice-ai.server.ts - Practice functions → Assessment parsing: uses
src/lib/speakwell.functions.ts - Practice functions → Auth middleware: uses
src/lib/speakwell.functions.ts - Assessment report → Assessment parsing: uses
src/components/speakwell/assessment-report.tsx - Supabase client → Preview auth storage: configures
src/integrations/supabase/client.ts - Practice AI service → AI gateway: transcribes audio
src/lib/practice-ai.server.ts - Live voice relay → AI gateway: streams live session
src/lib/live-relay.server.ts - Supabase client → Supabase data store: uses schema types
src/integrations/supabase/client.ts