Selected projects

System design, concurrency, and data integrity—made executable.

← Back to portfolio

HLD · Distributed systems

Webhook Delivery Platform

Durable, multi-tenant event delivery

01 / HLD

A webhook platform built around an uncomfortable reality: a receiver can accept an event just before the sender crashes. Designed for durable admission, bounded retries, and recoverable delivery.

29 tests · signed delivery verified: 503 → 503 → 204
Design decisions & tradeoffs
  • Commits events and delivery records atomically in PostgreSQL, eliminating a database-to-queue dual-write gap.
  • Coordinates workers with row locks, tenant concurrency limits, expiring leases, and tokens that reject stale completions.
  • Signs payloads with HMAC, supports overlapping secret rotation, and validates destination IPs with a total request deadline.
  • Preserves attempt history through exponential-backoff retries, failure exhaustion, and idempotent manual replay.

Tradeoff. At-least-once attempts, with explicit receiver deduplication. No promise of exactly-once remote side effects or event ordering.

  • Python
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • Docker
  • uv

LLD · Transaction design

Inventory Reservation System

Correct checkout under contention

02 / LLD

An inventory and order API that keeps stock correct when buyers compete, clients retry, and reservation expiry races with checkout. Domain rules, lock ordering, and an auditable ledger work together.

16 tests · 100 buyers, 10 units, exactly 10 reservations
Design decisions & tradeoffs
  • Reserves multi-product baskets in one transaction, with deterministic product locks and database constraints that prevent overselling.
  • Models confirmation, cancellation, and expiry as explicit transitions; a reservation can only reach one terminal outcome.
  • Uses tenant-scoped idempotency keys and bounded transaction retries to keep duplicate requests from duplicating stock movements.
  • Reconciles materialized stock against inventory movements and active reservations, with a restart-safe expiration worker.

Tradeoff. Pessimistic locks make scarce-stock decisions explicit. Transactions stay short; payment-provider calls are outside this domain.

  • Python
  • FastAPI
  • PostgreSQL
  • Alembic
  • Docker
  • pytest

Full stack · Data integrity

Paytm Payment System

Transactional peer-to-peer wallet

A full-stack wallet for account creation, balance management, recipient discovery, and peer-to-peer transfers, with consistency at the center of money movement.

Design decisions & tradeoffs
  • Protected account operations with JWT authentication and validated API payloads using Zod.
  • Used MongoDB sessions so sender debits and recipient credits commit atomically or roll back together.
  • Built searchable recipient discovery and a focused React transfer experience.
  • React
  • JavaScript
  • Express
  • MongoDB
  • JWT
  • Zod