Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.09 KB

File metadata and controls

27 lines (22 loc) · 1.09 KB

this is the actual flow below: New Transcription Flow (Realtime, no polling)

Client (Session Page) ↓ renders RealtimeTranscriptionDisplay (uses useRealtimeTranscriptions) ↓ subscribes via Supabase Realtime Channel: postgres_changes on table "transcriptions" filtered by session_id

Starting a transcription job ↓ calls /app/api/transcription/transcribe (App Router) ↓ uses services/transcription/lib/assemblyai.ts to start job (real or simulated) ↓ AssemblyAI processes audio and POSTs webhook payload

Server receives transcription ↓ endpoint /app/api/transcription/callback (App Router) ↓ validates payload and inserts row into Supabase table: transcriptions (includes session_id, text, confidence, metrics) ↓ triggers Supabase Realtime postgress broadcast to subscribed clients

Client update (no polling) ↓ useRealtimeTranscriptions receives change payload ↓ updates local state and UI in RealtimeTranscriptionDisplay