
Electronic Medical Record
Multi-tenant clinic & hospital SaaS
Backend Developer2024 — 20265 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.
TECH STACK
- NestJS
- PostgreSQL
- Redis
- RabbitMQ
- MinIO
- RBAC
- Docker
- AWS
ARCHITECTURE
PROCESS
- 012 weeks
Domain modeling
Mapped clinic workflows, tenants, roles, and record lifecycles.
- 0218 months
Backend development
APIs, RBAC, storage integration, background workers.
- 03Continuous
Hardening
Tenancy edge cases, performance passes, audit reviews.