Case study 02 / 09
Own product · 2026
CuraCloud
A clinic management system I designed and built on my own: patients, appointments, prescriptions and billing in English, Persian and Pashto, as a multi-tenant web app and an offline desktop app.
- Role
- Sole developer
- Stack
- Django
- Django REST Framework
- PostgreSQL
- React
- TypeScript
- TanStack Query
- Tailwind CSS
- i18next
- Electron
- AWS EC2
- 01Patients
- 02Appointments & queue
- 03Prescriptions
- 04Billing
- 05Reports
- 06Roles & audit
01
Overview
CuraCloud is a clinic management system for doctors and small clinics. Reception staff, doctors and accountants work in one place: patient records, the day’s appointment queue, prescriptions and invoices.
I designed and built it on my own as a Django REST API with a React front end. The same application runs as a multi-tenant web deployment and, packaged with Electron, as an offline desktop app.
02
The brief
A clinic system has to fit how a clinic day actually runs: booked and walk-in patients in one queue, prescriptions a pharmacist can read, and invoices that allow partial payment.
For clinics in Afghanistan it also has to work in Persian and Pashto, right to left, and keep working without a reliable internet connection.
03
Role and scope
- Role
- Sole developer
- Scope
- Product design, the Django REST API, the React front end, the multi-tenant deployment on AWS and the Electron desktop build.
04
Main features
Patient records
Profiles with medical history, allergies, blood group, national ID and emergency contacts.
Appointments and queue
Scheduled, walk-in, follow-up and emergency appointments, plus a daily queue for reception.
Prescriptions
Medicine autocomplete, reusable saved templates and printable PDF prescriptions with a unique reference number.
Billing
Itemised invoices for consultations, medicines, lab work and procedures, with discounts, tax and partial payments.
Roles and audit
Five roles (admin, doctor, receptionist, nurse and accountant), JWT authentication and audit logging of billing actions.
Reports
Dashboard, revenue, appointment, prescription and per-doctor reports.
05
How it’s built
One database per clinic
Each clinic gets its own PostgreSQL database, resolved from its subdomain, with commands to create, migrate and back up a clinic.
Business rules in services
Logic lives in per-app service modules rather than in views, so the web and desktop builds share exactly the same behaviour.
Three languages, two directions
i18next drives English, Persian and Pashto with right-to-left layout switching. PDFs reshape Arabic-script text and bundle Noto Sans Arabic so prescriptions print correctly.
Offline desktop build
Electron starts the Django API locally on SQLite, so a clinic can keep working without internet, with database backup and restore from the menu.
Integrations
- Django REST Framework + SimpleJWT
- OpenAPI docs (drf-spectacular)
- WeasyPrint PDF
- Electron
- Nginx + Gunicorn on AWS EC2
06
Challenges and decisions
Printing right to left
Browsers render Persian and Pashto well; PDF engines do not. Reshaping the text and embedding the right fonts was needed before prescriptions printed correctly.
One codebase, two deployments
Swapping a settings module, rather than forking the code, lets the same API run on PostgreSQL in the cloud and on SQLite inside the desktop app.
07
What was delivered
- Patient, appointment, prescription and billing modules with role-based access
- A multi-tenant web deployment on AWS EC2 (Nginx, Gunicorn, PostgreSQL)
- An Electron desktop build with offline storage, backup and restore
- An interface in English, Persian and Pashto
