Skip to content
Back to work

01Modern Clinic Management Platform

CleverOp Clinic

A clinic runs on a chain of small hand-offs: a booking becomes an arrival, an arrival becomes a consultation, a consultation becomes an invoice and a follow-up. CleverOp Clinic keeps that whole chain in one place.

Role
Product, design & engineering
Timeline
July 2026 – present
Platform
Web · multi-tenant SaaS
Status
Release candidate · v1.0.0-rc.2
Languages
English · Français · العربية
  • Web Application
  • Healthcare
  • Next.js
  • NestJS
  • PostgreSQL
  • Multi-Branch
app.cleverop.com/dashboard
CleverOp Clinic Today view: the day’s appointments on a timeline with waiting, in-consultation and completed counts.

01

Problem

Many clinics still run their day across paper files, spreadsheets, a calendar app and a messaging phone. Each tool holds part of the truth, and the gaps between them are where mistakes and lost revenue live.

  • Appointments that ended without anyone recording what happened
  • Unpaid balances nobody follows up
  • Patients due for a follow-up who are never recalled
  • Staff re-typing the same information in several places
  • No reliable picture of how the clinic is actually doing

02

Product

One platform for the clinic’s daily work, organized around the people who use it — reception, doctors, cashiers and managers — across one or many branches.

  • Patients

    Org-wide records with vitals against reference bands, problems, medications, documents and a visit timeline.

  • Appointments

    Schedule-driven slot picker with conflict detection, practitioner calendars and a live arrival queue.

  • Consultations

    Structured notes, vitals, ICD-10 coded diagnoses, prescriptions and autosave — follow-up booked from the visit.

  • Billing

    Invoices from the visit, partial and multiple payments, branded receipts, expenses and multi-currency books.

  • Communication

    Patient messaging through the clinic’s own connected WhatsApp Business account.

  • Insight

    Business intelligence with plain-language observations and CSV / Excel exports.

  • Administration

    Users, roles and permissions, branches, settings and a first-class audit center.

  • Platform Console

    The vendor side: plans, subscriptions, module access, usage limits and offline activation keys.

03

Core Workflow

The core loop a clinic runs dozens of times a day — designed so each step hands the next one exactly what it needs.

  1. 01

    Book

    A slot picked from real practitioner schedules, with conflicts caught before they happen.

  2. 02

    Arrive

    The queue shows who is actually here; the appointment always says where the person is.

  3. 03

    Consult

    Notes, vitals, diagnoses and prescriptions in one workspace that saves itself.

  4. 04

    Bill

    The invoice is raised from the visit; payments can be partial, multiple and reversed with audit.

  5. 05

    Follow up

    Follow-ups are booked through the same engine and tracked until someone answers them.

04

Architecture

A monorepo with one API serving two separate identity realms — clinics and the vendor — over a single PostgreSQL database with row-level tenancy.

  1. Interfaces

    • Clinic web app

      Next.js 16 · React 19 · Tailwind CSS v4

    • Platform Console

      Vendor-only Next.js app

    • Printed documents

      Receipts, prescriptions and visit records as PDF

  2. API

    • NestJS 11

      JWT · permissions · module access · rate limiting

    • Audit & commercial

      Every important action recorded; plans, modules and limits as data

    • Workers

      Four idempotent background workers

  3. Shared domain

    • @clinic/scheduling

      One availability engine used by both the API and the web app

  4. Data & services

    • PostgreSQL 16 · Prisma 6

      Row-level tenancy · 65 migrations · 50 models

    • WhatsApp Cloud API

      Per-clinic connected account

05

Engineering Challenges

  1. 01

    Appointments as a deterministic state machine

    The clock never guesses an outcome. A past appointment becomes a question — overdue — and a person resolves it through one audited workflow. Status writes are compare-and-swap, so two desks can’t silently overwrite each other.

  2. 02

    One booking engine for two runtimes

    Availability lives in a shared package used by the API and the browser. Every appointment write goes through one advisory-locked service, so a slot the UI offers is a slot the server accepts.

  3. 03

    Money that is always exact

    Amounts are integer cents through a single seam; invoice status is derived, never set. Payments on one invoice are serialized with an idempotency key, and currency conversion runs through an append-only rate ledger. A mixed-currency book is never shown as one number.

  4. 04

    Tenancy and isolation

    The organization is the tenant root, operational data is scoped to branches, and clinics and the vendor sign in through separate realms with separate secrets. Isolation is proven by a two-tenant test suite against a real PostgreSQL database.

  5. 05

    Trilingual by construction

    English, French and Arabic ship together with full right-to-left layout. A test fails the build if any language is missing a key — a layout that only fits in the shortest language doesn’t fit.

06

Reliability & Security

Reliability

  • Unsaved clinical work can’t be lost: a leave guard, self-retrying saves and revision-checked note writes.
  • Backup and restore, with restore fenced off from live writes.
  • Background workers are idempotent and can each be disabled on their own.
  • Bounded PDF queue, connection pool and heavy reads.
  • A pre-release QA war room: every P0–P2 finding fixed before pilot handover.

Security

  • Six security domains with six separate secrets, enforced at boot in production.
  • Guards re-read the database on every request — authentication, permissions, module access, rate limits.
  • Every important business action is audited; a vendor reading a patient record leaves a trace.
  • The public demo-request form stores nothing, is throttled and rejects bots.
  • Clinical reference data uses only openly licensed sources — WHO INN names and ICD-10-CM codes.

07

Technology

Frontend
Next.js 16React 19TypeScriptTailwind CSS v4
Backend
NestJS 11Prisma 6PostgreSQL 16Zod
Platform
TurborepopnpmDockerPlaywrightVitest
Integrations
WhatsApp Cloud APISMTPPDF generation

08

Screenshots

Screenshots from the running application with its seeded demo dataset — names and figures are fictional.

  • app.cleverop.com/dashboard/appointments
    Week calendar showing each practitioner’s load per day, next arrivals and unsettled past appointments.
    Calendar — practitioner load across the week, next arrivals and past appointments still waiting for an outcome.
  • app.cleverop.com/dashboard/patients
    Patient chart with vitals trends against reference bands, coded problems and the outstanding balance.
    Patient chart — vitals against reference bands, ICD-10 coded problems and the financial position side by side.
  • app.cleverop.com/dashboard/billing
    Invoice raised from a visit, with services, tax, total and balance due.
    Invoice — raised from the visit it bills, with the document’s full history underneath.
  • app.cleverop.com/dashboard/billing
    Billing overview with amounts owed shown separately per currency.
    Billing — balances per currency. Amounts in different currencies are never added together.
  • app.cleverop.com/dashboard/bi
    Insight dashboard with collected revenue per currency and plain-language observations.
    Insight — period metrics with plain-language observations and CSV / Excel export.
  • app.cleverop.com/dashboard
    The Today view in Arabic with a mirrored right-to-left layout.
    Arabic, right to left — the same product with a fully mirrored layout.

09

Lessons

  • “The clock raises a question; a person answers it.”

    Automating an outcome nobody saw creates records nobody trusts. Surfacing the question keeps the data honest.

  • “Never lock a clinic out of its own records.”

    Core data lives in every plan; only revenue-adding modules are sold upward, and limits fail open.

  • “Build workflows, not pages.”

    The best screen is the one that hands the next step exactly what it needs.

10

Current State

Release candidate · pilot handover cleared

CleverOp Clinic is at v1.0.0-rc.2 and works end to end. It is sold into Lebanon first, in USD or LBP. There are no paying customers yet — the demo network runs on seeded fixture data.

  • Working: patients, appointments, consultations, clinical library, billing, expenses, insight, documents, administration, audit, multi-branch, backup and the vendor console.
  • Not built yet: inventory, insurance, laboratory, telemedicine and online payments.
Next projectCleverOp YieldProduction Cost & Waste Control

Start a Project

Need software built around your workflow?

I design and build business applications with the same care you see here.

+961 71 279 930dbouk_9@hotmail.com