Case study 01
Replacing a 38-database legacy compliance system while production stays online
Shuru · Software Development Engineer II · Mumbai · Jul 2025 — Present · Client: Balio (City Data Service)
24
Production V1 stays read-only throughout, and notifications and program-window recomputation run off the request path on SQS, SES, and EventBridge-triggered ECS tasks.
Context and what was at risk
A 20-year-old grant and housing-compliance system serves 24 California cities and counties, with a legacy estate spanning 38 databases and 142K compliance and expense reports — and it has to be replaced without taking production offline.
What I owned and built
I own the backend architecture for the NestJS/PostgreSQL V2 platform: a JSONB-backed form engine so agencies configure conditional fields and tenant overrides without a deployment, revision snapshots and field-level diffs that preserve grant amendment audit trails, and RBAC with per-resource CRUD/APPROVE/REJECT permissions enforced through route guards and query-level tenant scoping. A Python migration tool carries 200–500-field legacy records across per-jurisdiction mappings, validating budgets and required fields, folding in client Excel corrections, and emitting JSON for V2 imports.
Stack
- NestJS
- TypeScript
- PostgreSQL (JSONB)
- Python
- AWS (ECS, SQS, SES, EventBridge)
Related writing
Building RAG over twenty years of grant compliance
How I built retrieval-augmented answers over a multi-tenant compliance platform — tenant-scoped retrieval, record-shaped chunks, pgvector plus Elasticsearch, Cohere reranking on Bedrock, and citations that are checked before they are shown.
What a JSONB form engine cost us
Notes on backing a multi-tenant form engine with PostgreSQL JSONB — where it bought configuration without deployments, and where it quietly bought a sequential scan.