nhath.dev
Download CV
All projects

Backend Developer

Electronic Medical Record

Multi-tenant clinic & hospital SaaS

2024 — 2026·5 engineers
Electronic Medical Record product screenshot

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

tenant-scoped queriesasync jobsdocumentsClinic Web AppNestJS API (RBAC)RabbitMQ WorkersPostgreSQL (multi-t…MinIO Object Storage

Tech stack

  • NestJS
  • PostgreSQL
  • Redis
  • RabbitMQ
  • MinIO
  • RBAC
  • Docker
  • AWS

Process

  1. 01

    Domain modeling

    2 weeks

    Mapped clinic workflows, tenants, roles, and record lifecycles.

  2. 02

    Backend development

    18 months

    APIs, RBAC, storage integration, background workers.

  3. 03

    Hardening

    Continuous

    Tenancy edge cases, performance passes, audit reviews.

Next project

MarketLens

Automated market reporting platform