Backend Developer
Electronic Medical Record
Multi-tenant clinic & hospital SaaS
2024 — 2026·5 engineers

0
clinics on one platform
0k+
patient records
0%
faster record retrieval
0.0%
uptime
Overview
A multi-tenant SaaS platform for clinic and hospital management covering patient registration, queue management, consultations, medical records, billing, and secure document storage — serving 12 clinics on shared infrastructure with strict tenant isolation.
Challenges
- Enforcing tenant isolation for sensitive medical data across every API and background job.
- Medical record search slowing down as records grew past tens of thousands.
- Handling large medical documents without bloating the transactional database.
Solutions
- Designed multi-tenant RBAC for doctors, nurses, clinic admins, and staff with tenant-scoped guards on every route and worker.
- Redesigned PostgreSQL schemas, indexes, and query patterns for record search and retrieval paths.
- Moved documents to MinIO object storage with signed access flows, keeping only metadata in PostgreSQL; RabbitMQ workers handle long-running tasks.
Results
- Record search and retrieval ~40% faster after schema and index redesign.
- 12 clinics and 50k+ patient records with zero cross-tenant data incidents.
- 99.9% uptime with blocking work moved off the request path.
Architecture
Tech stack
- NestJS
- PostgreSQL
- Redis
- RabbitMQ
- MinIO
- RBAC
- Docker
- AWS
Process
- 01
Domain modeling
2 weeksMapped clinic workflows, tenants, roles, and record lifecycles.
- 02
Backend development
18 monthsAPIs, RBAC, storage integration, background workers.
- 03
Hardening
ContinuousTenancy edge cases, performance passes, audit reviews.