Clinic Platform — Physio & Rehab SaaS
Multi-tenant platform for physiotherapy and rehabilitation clinics — staff application, operator console, public booking resolved by clinic hostname, and a marketing site, each on its own origin.
- Client / industry: Own product · physiotherapy & rehabilitation practices
- My role: Founder & sole engineer — tenancy architecture, entitlement authority, clinical and billing modules, legacy data migration.
- Challenge: A clinic platform holds health data for many practices at once, so isolation has to be structural rather than a WHERE clause — and the first practice arrived with a legacy system full of real history that had to survive the move.
- Solution: Four runtime surfaces on separate origins, so a session in one cannot be read by another. A control-plane tenant registry with database-enforced invariants, host→tenant resolution with every refusal accounted for, a dedicated tenant connection per operation, per-tenant migrations, and entitlement decisions computed from persisted plans, subscriptions and overrides.
- Result: Encounters and treatment execution, packages and payments, Croatian fiscalization, and anonymous booking resolved by hostname — cross-tenant isolation proven against two separate PostgreSQL databases under roughly 1,500 tests.
- Tech stack: PHP 8.2 · Symfony · API Platform · Angular · PostgreSQL · Messenger · Docker · Playwright
Architecture
- PATIENT · STAFF · OPERATOR
- FOUR ANGULAR SURFACES
- API PLANES · v1 · PLATFORM · BOOKING
- SYMFONY · TENANT KERNEL
- POSTGRESQL — DB PER TENANT
All projects · Nikola Grdanjski