WhatsApp-first clinic management for Indian practices.
ClinicOS reduces patient no-shows by 20β40% through automated WhatsApp reminders and dual-channel (WhatsApp + IVR) appointment management. Clinics get a real-time receptionist dashboard, an owner revenue view, and a lightweight EMR β all without asking patients to install an app.
Live Demo
- Frontend: https://clinicos-nine-ashy.vercel.app
- Backend API: https://startup-nqlw.onrender.com/docs
Indian clinics lose significant revenue to no-shows. ClinicOS tackles this at the source:
- Patients book appointments entirely over WhatsApp β no app download, no web form
- Automated reminders go out 24 hours before each appointment via WhatsApp and voice call
- Patients who don't respond get an IVR auto-callback offering to confirm, cancel, or reschedule
- Receptionists manage the day from a live dashboard with full slot and appointment control
- Owners track revenue, no-show rates, and patient volume from a dedicated analytics view
Patient
β
ββ WhatsApp message βββΊ Meta API βββΊ POST /webhook
β β
β AI Agent Swarm
β (Triage Β· Booking Β· Sentiment
β Clinical Β· Webhook Β· Orchestrator)
β β
β PostgreSQL DB
β β
β Reminder Service (APScheduler)
β β
ββ WhatsApp reminder βββ Meta API βββββββββ
ββ IVR auto-callback βββ Twilio βββββββββββ
Receptionist / Owner / Doctor
β
ββ Browser βββΊ React/Next.js Frontend βββΊ GET/PATCH/POST/DELETE /api/* βββΊ Backend
| Component | Technology | Role |
|---|---|---|
| Backend | FastAPI + SQLAlchemy | Webhook handler, REST API, business logic |
| Database | PostgreSQL 14+ | Appointments, patients, encounters, audit logs |
| AI Agent Swarm | Groq LLM (6 agents) | Message triage, booking extraction, clinical notes |
| Reminder Service | APScheduler | Hourly check; sends WhatsApp + IVR reminders |
| IVR Auto-Callback | Twilio | Voice calls for non-responders and no-show recovery |
| Prescription Service | ReportLab + Meta API | PDF generation and WhatsApp document delivery |
| Frontend | Next.js 14 + Tailwind | Admin dashboard, owner analytics, EMR view |
Admin Dashboard (/dashboard) β Receptionist control center. Live appointment queues (Confirmed, Waiting, Completed), upcoming appointments for the next 24 hours, and today's missed list. Receptionists can add new appointments, manage available slots, mark appointments as completed or missed, and delete appointments β all from the dashboard. Status updates reflect within 2 seconds.
Owner Dashboard (/owner) β Revenue and operations. Today's revenue, monthly totals, no-show rate, patient volume metrics, and a daily revenue trend chart. Supports month-picker for historical data.
EMR View (/emr) β Patient clinical history. Search patients by name or phone, view their last 10 encounters with expandable clinical notes.
Receptionists can manage availability directly from the dashboard without touching the database:
- Add slots β Set date, start time, and end time in IST. Slots appear immediately on WhatsApp for patients to book.
- Delete slots β Remove open slots that are no longer available.
- Book appointments manually β Enter patient name and phone, select a slot, and create the booking. The patient record is created automatically if they don't exist yet.
- Delete appointments β Remove appointments with a confirmation step. The slot is automatically re-opened when an appointment is deleted.
backend/
app/main.py FastAPI app β webhooks, REST API, CORS, slot/appointment management
app/database.py SQLAlchemy ORM (8 tables)
app/analytics_service.py Revenue and no-show calculations
app/reminders.py APScheduler reminder jobs
app/pdf_service.py ReportLab prescription PDFs
app/voice.py Twilio IVR TwiML routes
agents/ Six AI agent definition files
frontend/
app/dashboard/ Admin Dashboard page
app/owner/ Owner Dashboard page
app/emr/ EMR View page
components/ AppointmentCard, AddAppointmentModal, KPICard, RevenueTrendChart, etc.
lib/api.ts Typed fetch wrappers for all backend endpoints
- Python 3.10+
- PostgreSQL 14+
- Node.js 18+
git clone https://github.com/LALA22-7/STARTUP.git
cp .env.example .env
# Fill in required values in .env (see docs/SETUP.md)docker compose up --buildThe backend starts at http://localhost:8000 and the frontend at http://localhost:3000.
On first run, call the seed endpoint to create the default clinic:
curl -X POST http://localhost:8000/admin/seed# Backend
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# Frontend (separate terminal)
cd frontend
npm install
npm run devAPI docs are available at http://localhost:8000/docs.
| Method | Path | Description |
|---|---|---|
| GET | /api/appointments |
List appointments (filter by clinic, status, date range) |
| POST | /api/appointments |
Manually create an appointment |
| PATCH | /api/appointments/{id}/status |
Update appointment status |
| DELETE | /api/appointments/{id} |
Delete appointment and re-open its slot |
| GET | /api/slots |
List all slots for a clinic |
| POST | /api/slots |
Create a new bookable slot |
| DELETE | /api/slots/{id} |
Delete an open slot |
| GET | /api/analytics/daily |
Daily revenue and appointment counts |
| GET | /api/analytics/monthly |
Monthly revenue, no-show rate, daily breakdown |
| GET | /api/patients |
List patients (search by name or phone) |
| GET | /api/patients/{id}/encounters |
Last 10 clinical encounters for a patient |
| POST | /admin/seed |
Seed default clinic data (run once on fresh database) |
| POST | /webhook |
Meta WhatsApp webhook receiver |
| GET | /webhook |
Meta webhook verification |
| POST | /prescription/send |
Generate and deliver prescription PDF via WhatsApp |
| POST | /voice/* |
Twilio IVR TwiML routes |
Copy .env.example to .env and fill in your values. Required variables:
| Variable | Purpose |
|---|---|
DATABASE_URL |
PostgreSQL connection string (postgresql+asyncpg://...) |
META_PHONE_ID |
Meta WhatsApp Business phone number ID |
META_ACCESS_TOKEN |
Meta API access token |
META_VERIFY_TOKEN |
Webhook verification secret |
GROQ_API_KEY |
LLM key for the AI agent swarm |
GEMINI_API_KEY |
Gemini AI key |
Optional (features degrade gracefully when absent):
| Variable | Purpose |
|---|---|
TWILIO_ACCOUNT_SID |
Twilio account SID |
TWILIO_AUTH_TOKEN |
Twilio auth token |
TWILIO_PHONE_NUMBER |
Twilio outbound phone number |
GOOGLE_CREDENTIALS_JSON |
Full Google service account JSON as a string (for cloud deployments) |
GOOGLE_CREDENTIALS_FILE |
Path to Google Calendar service account JSON (for local/Docker) |
NEXT_PUBLIC_API_URL |
Backend URL consumed by the frontend (default: http://localhost:8000) |
See docs/SETUP.md for step-by-step credential setup and docs/HOSTING.md for deployment instructions.
# Backend β property-based and unit tests (31 tests)
cd backend
pytest tests/ -v
# Frontend β component tests (45 tests)
cd frontend
npx vitest --run- docs/SETUP.md β Credential setup, database migrations, local development
- docs/HOSTING.md β Deploying to Railway/Render (backend) and Vercel (frontend)