How hyacinth18-creator/sauti-ai-ke works
SAUTI-AI-KE is a community-incident reporting app. Residents speak a report, receive transcription and follow-up support, and submit an analyzed incident for a reference number; they can also view reports and look up an incident. Account sign-in and voice-service session support are separate capabilities. The README documents incident status history and updates in Supabase. Some page logic and subsystems are unsampled, so links not established by the excerpts are omitted.
Main entry points: page.tsx Reporting interface · incidents/route.ts Incident collection API · 20260904000000_create_incidents.sql Incident records · transcribe/route.ts Transcription endpoint
Components 20
Voice reporting
- Reporting interface
src/app/page.tsx - Transcription endpoint
src/app/api/voice/transcribe/route.ts - Follow-up endpoint
src/app/api/voice/follow-up/route.ts - Voice session endpoint
src/app/api/voice/session/route.ts - Service health endpoint
src/app/api/assemblyai/health/route.ts
Incident workflow
- Incident analysis
src/lib/incident-analysis.ts - Incident validation
src/lib/incident-validation.ts - Incident collection API
src/app/api/incidents/route.ts - Reference lookup API
src/app/api/incidents/[reference]/route.ts - Incident operations
src/lib/incidents.ts - Server database client
src/lib/supabase-server.ts - Incident records
supabase/migrations/20260904000000_create_incidents.sql - Status history
supabase/migrations/20260904000000_create_incidents.sql - Incident updates
supabase/migrations/20260904000000_create_incidents.sql
Accounts
- Account panel
src/app/auth-panel.tsx - Browser auth client
src/lib/supabase-browser.ts - OAuth callback
src/app/auth/callback/route.ts
External services
- Supabase Auth
- AssemblyAI
Other components
- Resident
Connections 23
- Resident → Reporting interface: speaks report
- Reporting interface → Transcription endpoint: uploads audio
- Transcription endpoint → AssemblyAI: uploads and polls
- AssemblyAI → Transcription endpoint: returns transcript
- Reporting interface → Follow-up endpoint: requests question
- Follow-up endpoint → AssemblyAI: generates question
- Reporting interface → Incident analysis: analyzes transcript
- Reporting interface → Incident collection API: submits report
- Incident collection API → Incident validation: validates input
- Incident collection API → Incident operations: creates or lists
- Incident operations → Server database client: queries database
- Server database client → Incident records: reads and writes
- Incident records → Status history: records status changes
- Incident records → Incident updates: stores updates
- Reporting interface → Reference lookup API: looks up reference
- Reference lookup API → Incident operations: finds incident
- Reporting interface → Account panel: shows account controls
- Reporting interface → Browser auth client: checks signed-in user
- Account panel → Browser auth client: manages account
- Browser auth client → Supabase Auth: authenticates
- OAuth callback → Supabase Auth: exchanges code
- Voice session endpoint → AssemblyAI: requests session token
- Service health endpoint → AssemblyAI: checks connectivity