How wantedfelconer/clinic-os works
ClinicOS is a multi-tenant clinic-management SaaS for patients, clinic staff, doctors, and platform administrators. The principal workflow spans clinic and patient management, appointment booking, clinical records and prescriptions, and billing; communications and reviews provide related patient-facing capabilities, while subscriptions and administration govern the platform. The React client uses feature modules and API wrappers to reach an Express server organized into domain modules, with MySQL persistence. Sampled controllers show cross-domain calls for appointments, payments, patient records, prescriptions, and reviews. Other client-to-server wiring is inferred only at the documented REST boundary; unsampled module internals are not detailed.
Main entry points: index.js Express API · patientController.js Patient registry · database.js MySQL database · appointmentController.js Appointments
Components 21
Web application
- ClinicOS app
client/src/modules/application/ClinicOSApp.tsx - Patient portal
client/src/modules/patient/PatientPortal.tsx - Doctor dashboard
client/src/modules/dashboard/DoctorDashboard.tsx - Admin panel
client/src/modules/admin/AdminPanel.tsx - API wrappers
client/src/app/api/index.ts
Clinic workflows
- Clinics and staff
server/src/modules/clinics/controllers/clinicController.js - Patient registry
server/src/modules/patients/controllers/patientController.js - Appointments
server/src/modules/appointments/controllers/appointmentController.js - Medical records
server/src/modules/emr/controllers/medicalRecordController.js - Medical reports
server/src/modules/emr/controllers/medicalReportController.js - Prescriptions
server/src/modules/prescriptions/controllers/prescriptionController.js - Payments and receipts
server/src/modules/billing/controllers/paymentController.js - Reviews
server/src/modules/reviews/controllers/reviewController.js
Platform services
- Authentication
server/src/modules/auth/controllers/authController.js - Messages and notices
server/src/modules/communications/controllers/messageController.js - Subscriptions
server/src/modules/subscriptions/controllers/subscriptionController.js - Platform administration
server/src/modules/admin/controllers/adminController.js
API and persistence
- Express API
server/src/index.js - MySQL database
server/src/core/config/database.js
Other components
- Clinic users
- Email delivery
Connections 48
- Clinic users → ClinicOS app: use
- ClinicOS app → Patient portal: offers portal
- ClinicOS app → Doctor dashboard: offers dashboard
- ClinicOS app → Admin panel: offers admin
- Patient portal → API wrappers: request data
- Doctor dashboard → API wrappers: request data
- Admin panel → API wrappers: request data
- API wrappers → Express API: REST requests
- Express API → Authentication: dispatches
- Express API → Clinics and staff: dispatches
- Express API → Patient registry: dispatches
- Express API → Appointments: dispatches
- Express API → Medical records: dispatches
- Express API → Medical reports: dispatches
- Express API → Prescriptions: dispatches
- Express API → Payments and receipts: dispatches
- Express API → Messages and notices: dispatches
- Express API → Reviews: dispatches
- Express API → Subscriptions: dispatches
- Express API → Platform administration: dispatches
- Authentication → MySQL database: reads and writes
- Clinics and staff → MySQL database: reads and writes
- Patient registry → MySQL database: reads and writes
- Appointments → MySQL database: reads and writes
- Medical records → MySQL database: reads and writes
- Medical reports → MySQL database: reads and writes
- Prescriptions → MySQL database: reads and writes
- Payments and receipts → MySQL database: reads and writes
- Messages and notices → MySQL database: reads and writes
- Reviews → MySQL database: reads and writes
- Subscriptions → MySQL database: reads and writes
- Platform administration → MySQL database: reads and writes
- Appointments → Clinics and staff: checks clinic services
- Appointments → Patient registry: validates patient
- Appointments → Messages and notices: creates notices
- Payments and receipts → Patient registry: validates patient
- Payments and receipts → Appointments: checks appointment
- Payments and receipts → Messages and notices: notifies patient
- Patient registry → Medical records: loads records
- Patient registry → Medical reports: loads reports
- Patient registry → Appointments: loads appointments
- Patient registry → Prescriptions: loads prescriptions
- Patient registry → Payments and receipts: loads payments
- Prescriptions → Patient registry: checks ownership
- Prescriptions → Appointments: checks appointment
- Prescriptions → Messages and notices: notifies patient
- Reviews → Patient registry: resolves identity
- Reviews → Appointments: verifies appointment