Subham Haldar
workno source

Zonely — Two-Sided Expert Marketplace

Sole backend architect · Jun 2024 – Dec 2024

Zonely — a two-sided expert marketplace with live audio, chat and billing. Ledger, sessions and payments pillars over a Node.js, TypeScript, Fastify, MySQL, Prisma, Firebase and Cashfree stack.

The complete backend for a two-sided consultation marketplace with live audio sessions, real-time chat and ledger-based billing — greenfield to go-live, built solo.

Scope

I architected and delivered the entire backend alone — from an empty repository to a live product — across 48 database migrations and 390+ merged pull requests.

Zonely architecture: a mobile client calls a Fastify API backed by auth, user, session and transaction services; webhooks and a one-minute reconciliation cron drive the session and transaction services, which use MySQL via Prisma, object storage, and Cashfree, telephony, Firebase, OTP messaging and Aadhaar KYC integrations.
System architecture

The wallet ledger

Balances are derived from an append-only transaction ledger rather than stored in a column. This eliminates write-race conditions between concurrent session charges and top-ups, and keeps the full transaction history as an auditable source of truth.

Session termination

An idempotent dual-path termination flow — webhook-driven for voice calls, client-triggered for chat — with a per-minute reconciliation job as a safety net for missed provider webhooks.

Payment gateway migration

Mid-project I led the migration from Razorpay/RazorpayX to Cashfree across both payment collection and payouts, without disrupting existing payouts and preserving the existing transaction ledger and requiring no changes to session or balance logic. I also shipped a backward-compatible admin refund mechanism that needed no mobile client release.

Integrations

I owned the integration of five external services — Exotel telephony, payments, OTP and messaging, Firebase real-time chat, and Surepass for Aadhaar-based expert KYC.

Built with

Node.jsTypeScriptFastifyMySQLPrismaFirebaseCashfreeExotelPM2MoesifZod