badal.sahani

Approach

How the systems stay standing.

Four disciplines, six principles — each one earned in production, not borrowed from a blog post.

System Design

Multi-tenant architecture where correctness is the feature: one core, many institutions, no forks.

  • Idempotent webhooks and single-writer settlement — designs that make double-booking impossible, not just unlikely
  • Two-tier read-through caching, EXPLAIN-driven indexing, chunked background jobs with back-pressure
  • Graceful degradation as a default: WebSocket → polling, offline-tolerant clients, reconciliation sweeps for anything dropped

AI Engineering

AI as infrastructure, not garnish — wired into the team's daily loop where it compounds.

  • Built an LLM review pipeline that reads every PR with repo context before a human does
  • Agentic development with Claude Code and Copilot daily — plans, migrations, tests, refactors
  • Automated the repetitive layer of engineering so 8–10 people ship like more

DevOps & Platform

Infrastructure as code, delivery as GitOps, secrets as references — nothing hand-built, nothing plaintext.

  • ~9k lines of Terraform: EKS, Multi-AZ RDS MariaDB, IRSA, KMS — production and UAT from the same code
  • Helm + ArgoCD with automated image updates; a documented 43% cost reduction with the runbook to prove it
  • A multi-tenant Docker dev kit that onboards a new engineer with one command

Payments Engineering

High-volume fee collections through code I own — every transaction posted, verified, and reconcilable.

  • 6 gateways behind one router; HMAC-verified, idempotent, replay-safe callbacks
  • 8 bank payout rails including ISO 20022 over GPG-encrypted SFTP
  • Settlement files auto-posted as Journal Entries — finance stopped reconciling by hand

Working principles

Correctness is designed, not tested in
Money systems don't get to be probably right. I reach for designs that make failure structurally impossible — single-writer settlement so two workers can't book the same payment, idempotency keys so retries are free, database-level unique constraints as the last line. Tests confirm the design; they don't substitute for it.
Everything degrades gracefully
Networks drop, webhooks vanish, sockets die. The bus tracker falls back from WebSocket to polling. The exam engine keeps answers in IndexedDB through a dead connection. Reconciliation sweeps recover callbacks the gateway never delivered. The failure path is part of the feature, not an afterthought.
Upgradeable beats clever
A customization that blocks the next framework upgrade is technical debt with interest. Our 25-app suite keeps the core pristine: overlay apps, hooks, fixtures, and isolated class overrides — no forks, no monkey-patching. New institutions onboard without touching the platform.
Performance is a query plan, not a guess
The 4–5s → sub-500ms win came from reading EXPLAIN output, restructuring joins, and adding the right composite indexes — then layering Redis with doc-event invalidation so the cache is correct, not just fast. Measure, fix the actual bottleneck, cache last.
AI compounds when it's in the pipeline
An engineer using AI is faster; a team whose pipeline uses AI is faster everywhere. The LLM review pipeline reads every PR with repo context before a human does. Claude Code and Copilot are in my daily loop for migrations, tests, and refactors. The judgment stays human; the toil doesn't.
Infrastructure is code, delivery is Git
Production and UAT come from the same ~9k lines of Terraform. Deploys are ArgoCD syncing what Git says, images update themselves, and secrets exist only as references — never plaintext. The documented 43% cost cut came from the same discipline: read the bill like a query plan.

see the systems these built →