Telehealth platform
A bilingual Arabic and English telehealth platform. Patients book and pay for video visits with licensed doctors. I own it from the requirements to the production deploys.
Healthtech. Lead developer and product lead. Web, plus a companion mobile app.
My part
- Requirements
- Explaining it to the client
- Build
- DevOps
- Production deploys
The system
One API serves every clinic, and each clinic's data stays its own.
The flow
From a new doctor to a paid doctor.
- Doctor registers
License, documents and bank details. An admin checks and approves.
- Schedule published
The doctor publishes it from a template. Slots are generated on read.
- Patient books and pays
The patient picks a specialty or a doctor, sees the price and pays.
- E‑invoice issued
Each payment gets an e‑invoice with its own counter.
- Video visit
Chat opens before the visit. The JWT-secured call ends by itself. Then the e‑prescription.
- Visit closed
The visit is marked completed or no-show, and the earnings are recorded.
- Monthly payout
Batches are generated, reviewed, then released to verified doctor bank accounts.
The decision
The visit time is over. Who decides what happened?
A visit can end three ways: it happened, the patient never joined, or the doctor never joined. The answer drives the doctor's payout, so it must be decided exactly once.
- One delayed job per appointment. It runs after the scheduled end plus a grace period, re-reads the state and checks who joined.
Two more rules the platform follows
- A slot is locked once, so two patients cannot take the same slot.
- A shift can cross midnight. "Today" always means today in the local time zone.
What broke, and what I changed
- A data reset would have restarted the invoice chain
I persisted the last invoice hash in settings and verified it before the reset ran.
- The reset script hit a rate limit
The FHIR server throttled it after about 2,000 writes. I added retry with backoff.
Built with
TypeScript, NestJS, TypeORM, PostgreSQL, a FHIR R4 server. Redis and BullMQ. Socket.IO. Next.js, React, Redux Toolkit, Tailwind CSS, in Arabic RTL and English. Docker, GitHub Actions.