Every mobile-money payment, verified the second it arrives.
An Android handset forwards each bKash, Nagad and Rocket confirmation to a token-authenticated webhook. Milliseconds later it is a structured, deduplicated transaction on the ledger — no screenshots, no spreadsheets, no taking a student’s word for it.
- Two-app monorepo
- Express 5 · SvelteKit 2
- Payment platforms
- bKash · Nagad · Rocket
- Data entry
- None
Before this existed, a payment was verified by squinting at a screenshot.
Nihonova Academy takes course fees over mobile money. The verification step — not the payment — was the part that broke.
- Student pays, screenshots the confirmation, sends the image on WhatsApp
- Staff open the bKash, Nagad or Rocket app and hunt for a matching line
- Transaction ID is retyped into a spreadsheet, one digit at a time
- A forwarded screenshot from last week reads exactly like a new one
- Nobody can say what came in today without adding it up by hand
- The handset forwards the confirmation the moment it arrives
- The parser resolves platform, amount, sender and trxId in milliseconds
- The row is written to that platform’s collection — no typing anywhere
- A repeat of the same trxId is rejected by the index before it is stored
- Today, this week and this month are already totalled on the dashboard
From a phone in Dhaka to a row on the ledger.
Four hops, all of them automatic. The slowest part of the whole chain is the mobile network delivering the SMS.
The SMS lands
A payment text arrives on the academy handset. The forwarder app picks it up and posts the raw body onward — no screenshots, no manual entry.
Authenticated webhook
The shared secret is compared against WEBHOOK_SECRET in constant time before a single byte is parsed. An unset secret in production fails closed, not open.
Parsed to structure
One of three regex parsers pulls out amount, sender, fee, balance and trxId — and converts the SMS’s Bangladesh local time to UTC on the way in.
Stored & deduped
Written to that platform’s own collection. A unique index on trxId makes a redelivered SMS a no-op, so a retry can never double-count a payment.
Three providers. Three formats. One shape.
bKash writes one long line, Nagad writes labelled lines, Rocket masks the sender to an account tail. Each gets its own parser, and all three land in the same normalised document. Hover a value to trace it across.
You have received Tk 500.00 from 01712345678. Fee Tk 0.00. Balance Tk 1,200.00. TrxID AB1234CDEF at 08/06/2026 14:32
Send Money, Cash In and merchant Pay Bill each have their own pattern.
Three decisions that carry the whole thing.
Money makes correctness non-negotiable. These are lifted verbatim from the running server — the file each one lives in is named beside it.
A retried SMS cannot double-count a payment.
Idempotency is a database constraint, not a lookup-then-write. There is no window between the check and the insert for a second delivery to slip through.
apps/server/src/models/createPaymentModel.js
What the system promises, at any volume.
- 6 SMS shapes
- bKash alone prints four: Send Money, Cash In, merchant Pay Bill and internet-banking deposit. Nagad and Rocket add one each. Every shape has its own tested regex.
- 1 unique index
- Deduplication is a constraint on trxId, not a lookup. The forwarder may redeliver the same text forever; the ledger absorbs it and answers 200.
- +06:00 every roll-up
- Timestamps store as UTC and every per-day aggregate groups in Bangladesh time, so a payment made at 1 AM is counted on the day the student made it.
- 0 tokens in JavaScript
- The dashboard session is an httpOnly cookie no script can read, behind credentialed CORS that echoes one exact origin and never a wildcard.
Twelve modules, named as the repo names them.
Two apps, no shared root package. The server never renders a page; the dashboard never touches the database.
Untrusted input, checked before it is read
One collection per platform, unique on trxId
Credentialed JSON, no token in JavaScript
The ledger, live.
Totals by day, week and month; volume split by platform; and a searchable ledger where a student’s transaction ID resolves in one keystroke. Below is the real interface — access is staff-only, so this is where it can be seen.
Designed and built by Moshiur Rahman.
Sole engineer and designer: the SMS parsers, the webhook API, the aggregation queries, the design system and every screen of the dashboard. Built for a real academy taking real course fees, and running in production.
- Role
- Full-stack · design
- Scope
- Server, dashboard, design system
- Users
- Academy admin staff
- Status
- In production
- Node.js
- Express 5
- Mongoose 9
- MongoDB
- SvelteKit 2
- Svelte 5 runes
- TanStack Query v6
- Chart.js
- Tailwind v4
- Design tokens
- JetBrains Mono
- Vercel
- adapter-vercel
- Node 20