deal-delivery
A multi-tenant SaaS delivery orchestration platform. It lets any business — online stores, restaurants, pharmacies, ERPs — request and manage deliveries without building its own logistics system: pricing, driver dispatch, delivery lifecycle, tracking, cash collection, and financial settlement, plus APIs for external integrations.
Built as a modular monolith on the Better-T-Stack (Next.js + tRPC + Prisma + Better Auth).
New here? Read docs/PRODUCT.md for the vision and domain, then docs/ARCHITECTURE.md for the system shape, and docs/ROADMAP.md for what we build first.
Portals
All four portals live in the single apps/web app as App Router route groups, sharing one API,
auth, and database:
- Merchant — create & track deliveries, manage API keys/webhooks, view invoices & usage.
- Driver (PWA) — availability, delivery offers, execution, wallet & settlements.
- Admin — manage merchants/drivers, monitor & assign deliveries, pricing, settlements.
- Tracking — public, no-auth delivery tracking by code.
Stack
- TypeScript end-to-end
- Next.js 16 (App Router) — the four portals + PWA
- tRPC — type-safe API, organized into domain modules
- Prisma 7 + PostgreSQL — data, with row-level multi-tenancy (
merchantId) - Better Auth — authentication (roles: ADMIN, MERCHANT, DRIVER)
- shadcn/ui (base-lyra) + Tailwind CSS v4 — shared UI in
packages/ui - next-intl — full localization (no hardcoded strings)
- Redis + BullMQ — background jobs (offer expiry, webhooks, notifications) (added as slices need it — see roadmap)
- Turborepo — monorepo builds