D2C commerce · Seller app · Storefronts

Multi-tenant Commerce Platform

A platform that puts small Indian manufacturers online: each seller gets a branded store on their own subdomain, an app to run orders, shipping and money, and a team behind them that onboards and supports every store.

Role
Freelance · full-stack engineering, end to end
Platforms
Seller app · Team admin · Buyer storefronts · REST API · Blog & docs
Stack
TypeScript · Hono · Node.js · PostgreSQL · Supabase Auth · React 19 · Vite · TanStack Query · Tailwind · Astro · Razorpay · Turborepo
  • Multi-tenant architecture
  • Payments & ledgers
  • Logistics
  • Website builder
  • RBAC
  • Monorepo & CI/CD
Website builder with a kitchenware store in live preview, plus the store and checkout on mobile

Product screens with sample data. Names and figures inside the screens are illustrative.

01

The problem

Small manufacturers sell well offline but struggle online: no store of their own, no logistics, cash-on-delivery money that arrives late and doesn't add up, and returns that quietly eat the margin. They needed one place to sell, ship and get paid, with a team that sets it all up for them.

~315
API endpoints
80
Database tables
12
Storefront designs
02

What I built

01

A store of their own in an afternoon

Sellers pick one of 12 designs, set their brand, hero and home sections, and see the real store in a live preview. Every store runs from one build on its own subdomain or custom domain.

  • Product card styles and colour presets
  • Draft and versioned website content
  • Custom domains through Cloudflare nameservers
Website builder with brand, hero and home sections beside a live store preview
02

Orders that move one step at a time

Orders flow from To accept to Completed, with RTO and returns tracked to the end. Booking a courier compares live rates by the seller's priority and ships from the warehouse that holds most of the order's value.

  • Delivery issues and RTO in their own queues
  • Returns with inspection and courier claims
  • Serial returners blocked across every store
Order stages with a courier booking modal comparing live rates
03

Labels and GST invoices that print together

A 4 × 6 thermal label with a barcoded AWB and tracking QR, printed with a tax invoice that splits CGST and SGST or IGST by place of supply.

Shipping label with barcode and QR beside a GST tax invoice
04

Festivals sellers can switch on

Eight paid festival add-ons, from a diya and rangoli header and sale countdown to gift wrap at checkout. Each loads only while it's active, in its own error boundary, so a broken add-on can't take a store down.

05

A team admin that runs the business

The team sells, onboards and supports every seller: a lead funnel with demos and payment links, a fail-closed go-live review, COD remittances, refunds, weight disputes and about 24 reports.

Go-live review with five checks and a confirmed package

03 Advanced engineering

Money that always reconciles

Every rupee passes through buyer payments, couriers, cash on delivery, refunds and payouts. The platform is built so each of those can retry, arrive late or arrive twice, and the seller's balance is still right.

  1. 01Checkout, prices recomputed on the server
  2. 02Online, half or COD
  3. 03Courier booked from the right warehouse
  4. 04Tracking by webhook and hourly poll
  5. 05Return window closes
  6. 06Credit to an append-only ledger
  7. 07Monday payout
Wallet with balance, money on its way and an append-only ledger

Seller wallet with sample data.

A ledger that can't be edited

Database triggers block updates and deletes on ledger entries, and idempotency keys stop a retried event from posting twice. Corrections are new entries.

Refunds from either side

A refund finalises once whether the staff action or the payment webhook arrives first.

COD that adds up

Courier remittances are matched to orders by AWB against the expected amount, and every mismatch is flagged for a person to resolve.

Tracking that only moves forward

Webhooks and the hourly poll share one entry point, so shipment status is idempotent and never goes backwards.

Weight disputes in slabs

Courier weight charges are reconciled in 15-day cycles and 0.5 kg slabs, and the difference is debited transparently.

Safe by default

Every route checks a permission and the seller's scope; every body is validated with a schema; rate limits guard login, signup, checkout and public forms.

API
Hono on Node · ~315 endpoints · 14 domains
Data
PostgreSQL · 80 tables · partitioned logs
Apps
React 19 · Vite · 94 routes
Storefronts
12 designs · one build for every store
Payments
Razorpay · COD · half payment · payouts
Logistics
Live courier rates · labels · RTO · returns
Quality
CI gate · 400-line file guard · tests on money
Deploy
Ships changed apps only · health check · rollback
04

Key decisions

  1. Money moves one way

    An append-only ledger with idempotency keys means the balance can always be explained, line by line.

  2. One build, every store

    A single storefront build renders all sellers by subdomain, so a fix ships to every store at once.

  3. Fail closed

    Go-live, bot checks and payments refuse by default; nothing is assumed to be ready.