Objective
Replace paper appointment books, phone scheduling and spreadsheets in small and mid-sized private clinics with one system for appointments, billing, patient records, follow-ups and role-based reports. Patients are data records only; every action is performed by clinic staff.
Engineering approach
Next.js App Router with Server Actions as the only write path, and Supabase Postgres where row-level security on every table is the main guard. Appointment status changes are enforced by a database trigger and billing runs as transactional Postgres functions, so a charge cannot half-succeed. Four roles with per-user page overrides, audit records for sensitive changes, and an AI assistant limited to a curated set of tools (also reachable on WhatsApp through a separate worker). Covered by 270 unit tests plus Playwright, with an evaluation gate for the assistant in CI.