How asitshastri/vinicure works
ViniCure is an Indian telemedicine platform. Patients discover doctors, book and pay for appointments, then join video consultations; doctors manage schedules and patients and issue prescriptions, while administrators and support staff operate the service. The Next.js app serves the role-specific website and API, with business modules handling identity, scheduling, payments, consultations, and patient data. A PostgreSQL-backed worker handles asynchronous jobs such as invoices, scans, and reminders. The map emphasizes documented product stages; some subsystem links are based on README descriptions because their implementation was not sampled.
Main entry points: with-api.ts API boundary · app Role-based website · handlers.ts Background jobs · scheduling Scheduling
Components 25
Web experience
- Role-based website
src/app - Booking experience
src/components/booking - Doctor directory
src/components/doctors - Doctor portal
src/app/(doctor)/doctor - Patient portal
src/app/(patient)/patient - Admin portal
src/app/(admin)/admin - Support portal
src/app/(support)/staff
Care workflow
- Scheduling
src/modules/scheduling - Payments and payouts
src/modules/payments - Video consultations
src/modules/consultations - Prescription console
src/components/console - Patient health data
src/modules/patients - Doctor applications
src/modules/directory/service.ts
Operations
- Privacy requests
src/modules/compliance
Platform services
- API boundary
src/lib/api/with-api.ts - Identity and access
src/modules/identity - Secure file storage
src/lib/storage/storage.ts - Job queue
src/lib/queue/queue.ts - Background jobs
src/worker/handlers.ts - PostgreSQL
src/lib/db/pool.ts
Other components
- Patient
- Doctor
- Admin / support
- Payment provider
- Video provider
Connections 39
- Patient → Role-based website: uses
README.md - Doctor → Role-based website: uses
README.md - Admin / support → Role-based website: uses
README.md - Role-based website → Doctor directory: offers discovery
README.md - Role-based website → Booking experience: starts booking
README.md - Role-based website → Doctor portal: serves
README.md - Role-based website → Patient portal: serves
README.md - Role-based website → Admin portal: serves
README.md - Role-based website → Support portal: serves
README.md - Booking experience → API boundary: requests
- Doctor directory → API boundary: requests
- Doctor portal → API boundary: requests
- Patient portal → API boundary: requests
- Admin portal → API boundary: requests
- Support portal → API boundary: requests
- API boundary → Identity and access: checks access
src/lib/api/with-api.ts - API boundary → Scheduling: routes appointments
src/app/api/v1/appointments/route.ts - API boundary → Payments and payouts: routes webhook
src/app/api/webhooks/razorpay/route.ts - API boundary → Patient health data: routes patient data
src/app/api/v1/patients/route.ts - API boundary → Privacy requests: routes requests
src/app/api/v1/data-requests/route.ts - API boundary → Doctor applications: routes favorites
- Booking experience → Scheduling: selects appointment
- Booking experience → Payments and payouts: pays appointment
- Payments and payouts → Payment provider: verifies charges
- Scheduling → Video consultations: enables visit
- Video consultations → Video provider: connects video
- Video consultations → Prescription console: supports prescribing
README.md - Doctor portal → Prescription console: uses console
README.md - Patient portal → Patient health data: manages health data
README.md - Doctor applications → Secure file storage: stores documents
src/modules/directory/service.ts - Doctor applications → Job queue: queues work
src/modules/directory/service.ts - Payments and payouts → PostgreSQL: persists payments
- Scheduling → PostgreSQL: persists appointments
- Patient health data → PostgreSQL: persists records
- Job queue → Background jobs: dispatches jobs
worker/main.mts - Background jobs → PostgreSQL: runs job queries
src/worker/handlers.ts - Background jobs → Payments and payouts: renders invoices
src/worker/handlers.ts - Background jobs → Scheduling: releases holds
src/worker/handlers.ts - Background jobs → Video consultations: processes recordings
src/worker/handlers.ts