How tanmay-awal/clinic-ai works
Clinic AI combines a patient-facing phone agent with a clinic operations dashboard. Patients call through Twilio; the bot conducts a structured conversation, while the backend provides appointment, call-analysis, action, and reporting capabilities that clinic staff access through the frontend. The README documents the bot’s speech/LLM pipeline and post-call analysis; sampled controllers confirm the API ownership shown, but unsampled service internals limit certainty about some integrations.
Main entry points: data-source.ts PostgreSQL · bot.py Speech services · layout.tsx Clinic dashboard · call.controller.ts Call API
Components 25
Voice agent
- Twilio
- Call server
clinic-bot/server.py - Conversation flow
clinic-bot/bot.py - Speech services
clinic-bot/bot.py - Bot runtime
clinic-bot/runtime.py - Groq / OpenRouter
- Deepgram STT
- Cartesia TTS
Clinic API
- Identity API
clinic-backend/src/user/user.controller.ts - Appointment API
clinic-backend/src/appointments/appointments.controller.ts - Call API
clinic-backend/src/call/call.controller.ts - Call analysis
clinic-backend/src/ai/ai.service.ts - PostgreSQL
clinic-backend/src/data-source.ts
Clinic operations
- Action API
clinic-backend/src/actions/actions.controller.ts - Dashboard API
clinic-backend/src/dashboard/dashboard.controller.ts - Reports API
clinic-backend/src/reports/reports.controller.ts - Admin API
clinic-backend/src/admin/admin.controller.ts
Staff dashboard
- Clinic dashboard
clinic-frontend/src/app/(protected)/layout.tsx - Call review
clinic-frontend/src/app/calls/[callId]/page.tsx - Insights
clinic-frontend/src/app/insights/page.tsx - Action management
clinic-frontend/src/app/actions/page.tsx - Report builder
clinic-frontend/src/app/reports/page.tsx - Appointment management
clinic-frontend/src/app/outbound/page.tsx
Other components
- Patient
- Clinic staff
Connections 27
- Patient → Twilio: calls
- Twilio → Call server: streams audio
- Call server → Conversation flow: starts call
- Conversation flow → Speech services: processes dialogue
- Speech services → Deepgram STT: transcribes
- Speech services → Groq / OpenRouter: generates replies
- Speech services → Cartesia TTS: synthesizes speech
- Speech services → Twilio: returns audio
- Conversation flow → Bot runtime: records telemetry
- Call server → Call API: submits call
- Call API → Call analysis: analyzes call
- Call API → PostgreSQL: stores call data
- Call analysis → PostgreSQL: stores analysis
- Clinic staff → Clinic dashboard: uses
- Clinic dashboard → Identity API: authenticates
- Clinic dashboard → Dashboard API: requests metrics
- Call review → Call API: loads call
- Insights → Dashboard API: loads insights
- Action management → Action API: manages tasks
- Report builder → Reports API: generates reports
- Appointment management → Appointment API: manages bookings
- Clinic dashboard → Admin API: manages users
- Appointment API → PostgreSQL: reads and writes
- Action API → PostgreSQL: reads and writes
- Dashboard API → PostgreSQL: queries analytics
- Reports API → PostgreSQL: queries report data
- Admin API → PostgreSQL: reads and writes