twizrr is a Nigerian social commerce marketplace for shoppers and store owners. Stores list products, shoppers discover and buy through the web app or WhatsApp, and every transaction is escrow-protected until delivery is confirmed.
The MVP is focused on B2C social commerce:
- Shopper signup, browsing, cart, checkout, orders, and delivery confirmation.
- Store owner signup, store setup, product listing, order management, and payouts.
- Paystack escrow payments with webhook verification.
- Ledger-backed money movement tracking.
- BullMQ workers for checkout reminders, auto-confirmation, notifications, payouts, and async channel work.
- WhatsApp shopper assistant for product discovery, search, and order updates.
- Cloudinary image handling.
- Gemini / Google AI assisted product search and intent handling.
- Tier 1 auto verification and Tier 2 identity/NIN verification.
- Admin tools for moderation, verification, disputes, payouts, users, inventory, and operations.
Deferred or removed from the MVP:
- Supplier/B2B workflows.
- RFQ and quote flows.
- Trade financing / BNPL.
- Direct payments outside escrow.
- Tier 3 / CAC verification.
- Review and reorder systems.
- Sentry.
- Mobile app.
twizrr/
├── apps/
│ ├── backend/ # NestJS API, workers, channels, integrations
│ └── web/ # Next.js App Router frontend
├── packages/
│ └── shared/ # Shared TypeScript types, enums, constants, utilities
├── docker-compose.yml # Local services
├── pnpm-workspace.yaml # Workspace package config
├── turbo.json # Turborepo config
└── README.md
The backend is a NestJS modular monolith with clear boundaries:
core/: infrastructure setup such as config, Prisma, Redis, health checks, logging, throttling, and static assets.channels/: external entry points such as WhatsApp and USSD.integrations/: third-party provider clients such as Paystack, Cloudinary, Resend, Meta WhatsApp, AI, Shipbubble, Prembly, and Google Places.domains/: high-level domain composition boundaries for commerce, orders, money, users, social, and platform concerns.modules/: active business modules such as auth, product, cart, order, payment, payout, ledger, merchant/store, verification, upload, notifications, and admin.queue/: BullMQ queues and processors.
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, React 18, Tailwind CSS, React Query |
| Backend | NestJS 10, TypeScript |
| Database | Neon PostgreSQL with Prisma |
| Cache and Queues | Redis, BullMQ |
| Payments | Paystack |
| Messaging | Meta WhatsApp Cloud API, Africa's Talking |
| AI | Gemini / Google AI, Google Vision, Vertex AI |
| Resend | |
| Images | Cloudinary |
| Monorepo | pnpm workspaces, Turborepo |
Prerequisites:
- Node.js 20+
- pnpm
- Docker Desktop if using local services
- Backend and web environment files
Install dependencies:
pnpm installStart local services when you want local infrastructure:
docker compose up -d postgres redisDocker is optional for local development. The backend can run directly with pnpm and connect either to managed/cloud Redis or to the local Docker Redis service.
Redis options for local development:
- Managed/cloud Redis: set
REDIS_URLto a Redis protocol URL such asrediss://.... - Local Docker Redis: run
docker compose up -d redisand setREDIS_URL=redis://localhost:6379.
docker compose up -d redis starts Redis infrastructure only. It does not start
the backend dev server because the compose file does not define a backend app
service.
Set up environment files:
- Copy
apps/backend/.env.exampletoapps/backend/.env. - Copy
apps/web/.env.exampletoapps/web/.env.local.
Run database migrations for local development:
cd apps/backend
pnpm exec prisma migrate dev
pnpm exec prisma db seedRun the apps:
cd apps/backend
pnpm run dev
cd ../web
pnpm run devOr from the repo root:
pnpm --filter @twizrr/backend dev
pnpm --filter @twizrr/web devBackend: http://localhost:4000
Frontend: http://localhost:3000
Backend:
cd apps/backend
npx prisma validate --schema=prisma/schema.prisma
npx tsc --noEmit
pnpm run lint
pnpm run buildWeb:
cd apps/web
npx tsc --noEmit
pnpm run lint
pnpm run buildShared package:
cd packages/shared
pnpm run build- Use Prisma migrations for shared environments.
- Do not use
prisma db pushon shared Neon databases. - Application queries use the pooled database URL.
- Migrations use the direct database URL.
- Money is stored as BigInt kobo values.
- Ledger entries are append-only.
Use this checklist for dev-branch deployment verification only. This is not the production launch plan.
Current dev deployment targets:
- Vercel deploys
apps/webfrom thedevbranch. - Render deploys
apps/backendfrom thedevbranch. - Use generated Vercel and
onrender.comURLs only. - Do not configure custom domains yet.
- Do not deploy from
mainfor Twizrr yet;mainstill contains old Swifta state and is not production-ready for Twizrr.
Branch strategy:
- Feature branches merge into
dev. - Dev deployment verifies the integrated Twizrr app before promotion.
- Pre-launch promotion remains:
dev->staging->beta. - DNS and custom domains (
twizrr.com,api.twizrr.com) wait untilmainis ready and the Hostinger/Vercel/Render domain setup is approved.
Deployment order:
- Merge to
dev. - GitHub Prisma migration workflow runs
prisma migrate deployagainst the dev Neon branch. - Render backend deploy runs after migrations are applied.
- Vercel web deploy points to the Render dev backend URL.
Never run prisma db push or prisma migrate dev against shared environments.
Vercel dev web environment:
NEXT_PUBLIC_API_URL= generated Render dev backend URL.NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY= Paystack public test key for dev.WEB_URL= generated Vercel URL or approved dev web URL.
Render dev backend environment:
DATABASE_URL= Neon pooled dev database URL.DIRECT_URL= Neon direct dev database URL for Prisma migrations.REDIS_URL= managed Redis protocol URL (redis://orrediss://), notredis://localhost:6379and not the Upstash REST HTTPS URL.JWT_ACCESS_SECRETandJWT_REFRESH_SECRET, or the currently supported JWT fallback secret names.PAYSTACK_SECRET_KEY,PAYSTACK_PUBLIC_KEY, andPAYSTACK_WEBHOOK_SECRET.RESEND_API_KEYand email sender configuration.CLOUDINARY_CLOUD_NAME,CLOUDINARY_API_KEY, andCLOUDINARY_API_SECRET.CORS_ORIGINSandFRONTEND_URLset to the generated Vercel dev URL.- Optional provider keys needed by the enabled dev flows, such as Google/Gemini AI, WhatsApp, Shipbubble, Prembly, Google Places, Africa's Talking, and admin bootstrap values.
Health check expectations:
- Render uses
/healthfor backend readiness. /healthchecks both database and Redis availability.- The Render dev service will fail readiness if
DATABASE_URL,DIRECT_URL, or managed RedisREDIS_URLis wrong or unreachable. - Keep
/healthas the dev Render health check unless the backend intentionally separates liveness from dependency readiness later.
- Every order is escrow-protected.
- Paystack webhooks must be verified before order/payment state changes.
- Store payouts happen only after shopper delivery confirmation or auto-confirmation.
- Direct payment support is not part of the MVP.
The active MVP cleanup removed legacy supplier, RFQ, quote, trade-financing,
waitlist, review, reorder, direct-payment, Sentry, Tier 3, and CAC flows from
active source code. See TWIZRR_CLEANUP_REPORT.md for the detailed cleanup log.
Built by codedDevs.
Proprietary. All rights reserved.