WhatsApp-native sales tracking and checkout provisioning for Nigerian micro-businesses
DevCareer Γ Nomba Hackathon 2026
TradeChat turns a merchant's existing WhatsApp number into a full point-of-sale system. Merchants log sales in plain language via WhatsApp, the bot parses and confirms the transaction, generates a Nomba payment link or virtual account for the customer, and reconciles payment status via Nomba webhooks. A companion web dashboard surfaces sales history, revenue, and outstanding orders β while a daily summary is also pushed back into WhatsApp so merchants never have to leave the channel they already live in.
π Full Architecture & Security Note: For a deep-dive technical breakdown of our WhatsApp/Magic Link authentication, HMAC-SHA256 webhook signature verification (
NombaSignatureGuard), idempotency guarantees (WebhookAuditService), and our ACID double-entry financial ledger (LedgerService), see our Architecture and Security Documentation.
Customer/Merchant (WhatsApp)
β
βΌ
Twilio WhatsApp Business API ββ(webhook)βββΊ NestJS Backend
β
ββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
Gemini (parsing) PostgreSQL Nomba API
(Prisma) (Checkout / VA)
β β
βΌ βΌ
Next.js Dashboard Nomba Webhooks
(Vercel) (payment status)
β
βΌ
NestJS β Twilio β Merchant
Core loop:
- Merchant sends a free-text sale message on WhatsApp
- Twilio forwards it to a NestJS webhook endpoint
- Gemini extracts structured data (item, qty, price, customer)
- Bot echoes parsed data back for merchant confirmation
- On confirmation, backend creates a Nomba checkout link / virtual account
- Link is sent to the customer via the merchant
- Nomba webhook fires on payment β backend updates transaction status
- Confirmation messages sent to both merchant and customer
- Dashboard and daily WhatsApp summary reflect the settled transaction
| Layer | Choice |
|---|---|
| Messaging | Twilio WhatsApp Business API |
| AI parsing | Google Gemini 2.5 Flash (@google/genai) |
| Payments | Nomba Checkout API + Virtual Accounts + Webhooks |
| Backend | NestJS (Node.js 24 / TypeScript) |
| ORM / DB | Prisma + PostgreSQL |
| Cache / Queue | Upstash Redis + BullMQ |
| Dashboard | Next.js 16 + Tailwind CSS v4 + Shadcn UI |
| Auth | Custom WhatsApp OTP + Magic Links (JWT/Cookies) |
| Monitoring | Sentry (APM & Profiling) + Logtail / Winston |
| Hosting (backend) | Railway |
| Hosting (dashboard) | Vercel |
This is a Turborepo monorepo managed with pnpm.
tradechat/
βββ apps/
β βββ backend/ # NestJS API β webhook receiver, Nomba integration, BullMQ jobs
β βββ web/ # Next.js merchant dashboard
βββ packages/
β βββ ui/ # Shared React component library
β βββ eslint-config/ # Shared ESLint configuration
β βββ typescript-config/ # Shared tsconfig.json bases
βββ turbo.json
βββ pnpm-workspace.yaml
- Node.js 20+
- pnpm 9+
- A PostgreSQL database (Railway recommended)
- An Upstash Redis instance
git clone https://github.com/Harrylever/tradechat.git
cd tradechat
pnpm installCopy the example environment files for both the backend API and the web dashboard:
# Backend setup
cp apps/backend/.env.example apps/backend/.env
# Web dashboard setup
cp apps/web/.env.example apps/web/.env.local| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
TWILIO_ACCOUNT_SID |
Twilio account SID |
TWILIO_AUTH_TOKEN |
Twilio auth token |
TWILIO_WHATSAPP_NUMBER |
Twilio sender number e.g. whatsapp:+14155238886 |
GEMINI_API_KEY |
Google AI Studio API key |
NOMBA_ACCOUNT_ID |
Nomba parent account UUID |
NOMBA_SUBACCOUNT_ID |
Nomba sub-account UUID |
NOMBA_CLIENT_ID |
Nomba OAuth client ID |
NOMBA_CLIENT_SECRET |
Nomba OAuth client secret |
NOMBA_WEBHOOK_SECRET |
Nomba webhook signature key |
NOMBA_DEFAULT_EMAIL |
Default customer email (e.g. orders@...) |
REDIS_URL |
Upstash Redis connection string |
SENTRY_DSN |
Sentry error monitoring DSN |
LOGTAIL_SOURCE_TOKEN |
Better Stack / Logtail source token |
LOGTAIL_INGESTING_HOST |
Logtail ingesting host |
JWT_SECRET |
Internal secret for dashboard β backend auth |
JWT_EXPIRES_IN |
JWT expiration duration (e.g. 7d) |
WEB_APP_URL |
Web dashboard URL (e.g. http://localhost:3000) |
ALLOWED_ORIGINS |
CORS allowed origins comma-separated list |
PORT |
Server port (default 3001 or 3002) |
| Variable | Description |
|---|---|
NEXT_PUBLIC_API_URL |
Base URL of the backend API (default http://localhost:3001) |
NEXT_PUBLIC_WHATSAPP_BOT_NUMBER |
WhatsApp bot contact number without + or whatsapp: (e.g. 14155238886) |
# Run migrations
cd apps/backend
pnpm dlx prisma migrate deploy
# Generate Prisma client
pnpm dlx prisma generateRun all apps in parallel from the monorepo root:
turbo devOr target a specific app:
turbo dev --filter=backend
turbo dev --filter=web# Build everything
turbo build
# Build a specific app
turbo build --filter=backendThe backend exposes a REST API with a global api/v1 prefix and Swagger documentation:
-
Documentation & Health
GET /api/v1/docsβ Interactive Swagger UIGET /api/v1/healthβ Service health check
-
Webhooks (No Auth / Signature Verified)
POST /api/v1/webhook/twilioβ Inbound WhatsApp messages & status updates from TwilioPOST /api/v1/webhook/nombaβ Payment event webhooks from Nomba (HMAC signature verified)
-
Authentication (
/api/v1/auth)POST /api/v1/auth/otp/requestβ Request a WhatsApp one-time password (OTP)POST /api/v1/auth/otp/verifyβ Verify OTP and receive JWT session cookie / tokenPOST /api/v1/auth/magic/consumeβ Consume a single-use magic link token
-
Merchants (
/api/v1/merchants)GET /api/v1/merchants/meβ Get authenticated merchant profileGET /api/v1/merchants/me/statsβ Get sales volume, success rates, and transaction countsPATCH /api/v1/merchants/meβ Update merchant profile and Nomba settings
-
Transactions (
/api/v1/transactions)GET /api/v1/transactions/meβ List transactions filtered by status or limitGET /api/v1/transactions/:idβ Get single transaction details and webhook audit trail
-
Withdrawals & Bank Accounts (
/api/v1/withdrawals)GET /api/v1/withdrawals/me/balanceβ Get available balance in NairaPOST /api/v1/withdrawalsβ Submit a payout / withdrawal requestGET /api/v1/withdrawals/meβ List withdrawal request historyGET /api/v1/withdrawals/me/bank-accountβ Get saved settlement bank accountPUT /api/v1/withdrawals/me/bank-accountβ Save or update settlement bank account details
Build window: July 1β7, 2026 Submission deadline: July 18, 2026 Track: Build Track - Virtual accounts as Infrastructure, Integrations & Plugins
- Merchant onboards entirely via WhatsApp in under 5 minutes
- A sale message produces a live Nomba checkout link within 60 seconds
- Nomba webhook triggers merchant confirmation within 10 seconds of payment
- Dashboard reflects real-time transaction data
- Daily WhatsApp summary sends on schedule
- π Architecture and Security Note β Exhaustive technical breakdown of authentication, HMAC webhook signature verification, data isolation, and our ACID double-entry ledger model.
- π₯ Live Demo Video β 2-3 minute walkthrough of the WhatsApp bot and merchant dashboard.
- π¨ Design System & Guidelines β Visual design tokens, typography, and UI guidelines.
Note: We're supposed to include testing credentials, and I honestly wish I could β but this is not that kind of application. TradeChat is built on real infrastructure that requires live WhatsApp numbers, active Nomba merchant accounts, and Twilio webhooks β things that can't meaningfully be mocked with a static test login. The best honest way to evaluate it is to watch the live demo and, if you have access to the stack, spin it up yourself with real credentials.
-
Watch the Live Demo Video β Start here. The Loom walkthrough covers the full merchant flow end-to-end: WhatsApp onboarding, sale logging, Nomba checkout link generation, payment confirmation, and dashboard view.
-
Review the Architecture β Read the Architecture and Security Documentation for a full breakdown of how the system handles authentication, HMAC webhook signature verification, idempotency, and the ACID double-entry ledger.
-
Spin up the backend locally β Clone the repo, copy the environment files (
apps/backend/.env.exampleβ.env), fill in your own credentials for Twilio, Nomba, Gemini, PostgreSQL, and Redis, then run:pnpm install cd apps/backend && pnpm dlx prisma migrate deploy turbo dev --filter=backend
-
Expose your local server via ngrok β Nomba and Twilio webhooks need a publicly reachable URL. Use ngrok or a similar tunnel to expose your local port and update your Twilio and Nomba webhook settings accordingly.
-
Send a sale message on WhatsApp β Using a WhatsApp number linked to your Twilio sandbox, message the bot in plain language (e.g. "Sold 2 bags of rice to Chidi for 8500"). Confirm the parsed result when the bot echoes it back.
-
Complete a test payment β Use the Nomba checkout link or virtual account number generated by the bot to make a real or sandbox payment. Watch for the confirmation messages to come back through WhatsApp.
-
Open the merchant dashboard β Navigate to the web app, log in via WhatsApp OTP, and verify that the transaction appears with the correct status and ledger entry.
| Name | Role |
|---|---|
| Dean | Full-stack / AI integration |