Smart Sheba
Commerce and rewards platform with a ledger-backed wallet, health cards and a rank and commission engine, built solo.
About 430 API paths, 130+ migrations and 5,800+ backend tests.
Backend, operator dashboard and customer storefront on one Postgres core. A spendable wallet runs on an append-only double-entry ledger; referral and placement trees feed a configurable rank and commission engine with a purpose-built frontend for tracing and auditing payouts; points-based bundles, health cards and entrepreneur packages sit alongside a customer storefront with dropshipping. Sales Force v2 adds ranks, rank-up rewards and a net-profit split behind a feature switch, with integrity checks and reconciliation that prove every taka is accounted for. Also: EPS payments, SMS and Telegram alerts, AI ID-card extraction to autofill KYC, and Inngest durable workflows. About 430 API paths over 110+ data models.

| level | share | payout |
|---|---|---|
| L1 direct referrer | % | 100.00 |
| L2 second tier | % | 62.50 |
| L3 third tier | % | 50.00 |
| L4 fourth tier | % | 37.50 |
| platform remainder | 0.01 | |
| payouts + remainder = pool | 250.01 balanced | |
In integer minor units every share is floored and the remainder is assigned explicitly, so the ledger reconciles exactly, every time.
This is a client system, shown as an architecture narrative only: no source code, credentials, or user data are exposed.
Problem
A single product needed a storefront, a spendable wallet with a real transaction ledger, a health-card program, and separate operator tooling, normally several teams’ worth of surface area.
Constraint
One engineer; a wallet ledger has to stay correct and auditable under concurrency, where a naive balance update loses money.
Decision
Split the system into customer, dashboard, super-admin, and control-plane services over one Postgres core, and modeled the wallet as an append-only ledger rather than a mutable balance field.
Tradeoff
An append-only ledger is more code and more careful queries than a single balance column, but it is the only version that stays correct and auditable.
Result
A live multi-app platform shipped and maintained solo. (Architecture narrative, no user or financial data shown.)