Executive Summary
Independent retailers in emerging markets lose 15-30% revenue margins to traditional multi-vendor marketplaces while losing direct ownership of customer relationships, data isolation, and immediate payout settlement.
OPNMRT provides isolated digital storefronts on subdomains (storename.opnmrt.com) or custom domains. Sellers connect their own Paystack/Flutterwave API keys for direct P2P settlement with zero platform commissions, while Radar filters rider pools by Local Government Area (LGA) for sub-hour deliveries.
Core Capabilities & System Highlights
Multi-Tenant Storefront Engine
Single application serving all sellers securely with row-level data isolation (`tenantId`/`storeId`) at the database layer.
Bring Your Own Keys (BYOK) P2P Payments
Sellers link Paystack or Flutterwave API keys directly. Payouts settle straight to seller accounts with zero platform escrow or commission fees.
Radar Hyper-Local LGA Logistics
Filters delivery rider pools specifically by Local Government Area (LGA), pairing merchants with neighborhood riders for sub-hour turnarounds.
AI Storefront Assistant
Integrates Gemini API for automated product description generation, sales analytics summaries, and inventory restock forecasting.
System Architecture & Specs
Next.js App Router (apps/web)
Dynamic SSR storefronts rendering product catalogues with React Query server state, Zustand client state, and Radix UI / Framer Motion aesthetics.
NestJS Domain-Driven Architecture (apps/api)
Segmented REST API (Public, Seller, Buyer, Admin) with Redis Pub/Sub events (ORDER_CREATED, STOCK_UPDATED) and Socket.IO WebSockets.
@opnmrt/shared Package (packages/shared)
Unified TypeScript interfaces, Zod validation schemas, and currency utilities shared seamlessly across web and api workspace packages.
PostgreSQL & Prisma Multi-Tenant Schema
Enforces strict row-level tenant isolation using tenant foreign keys, backed by Redis session caching and rate-limiting.
Key Engineering Trade-offs & Operational Notes
Subdomains and custom domains resolve tenants dynamically via Next.js middleware and NestJS interceptors.
The platform handles cart logic and metadata tracking without sitting between sellers and their revenue.
Radar hyper-local logistics avoid cross-city dispatch errors and solve last-mile delivery challenges.
Tech Stack & Role Matrix
Every library and framework in OPNMRT (Open Merchant Retail Tech) was chosen with intentional architectural trade-offs to balance speed, type safety, security, and scalability.
| Technology | Category | System Role | Performance Rationale |
|---|---|---|---|
| Next.js | Framework | Storefront & Merchant Dashboard UI | Delivers rapid initial page loads, dynamic domain routing, and SEO optimization for merchant stores. |
| NestJS | Framework | Modular Domain-Driven API Backend | Structured enterprise backend handling complex order lifecycle state machines and WebSocket events. |
| PostgreSQL | Database | Relational Multi-Tenant Data Store | Guarantees strict ACID compliance and inventory stock integrity under high concurrency. |
| Prisma | ORM | Type-Safe Multi-Tenant Database Mapping | Enforces strict tenant isolation across product catalogues, orders, and customer records. |
| Flutterwave | Payments | Direct BYOK African Gateway Settlement | Allows sellers to receive card, bank transfer, and mobile money payouts directly. |
| Paystack | Payments | Direct BYOK Merchant Payout Routing | Instant direct seller payout settlement without platform escrow or fee deductions. |
| Socket.IO | Real-time | Live Chat & Order Event Transport | Enables buyer-seller trust chat and real-time order status updates. |
Live Preview & Showcase
Metrics & Reliability
Platform Commission
Direct merchant settlement without transaction markups
Delivery Turnaround
Achieved via Radar LGA-filtered rider pool dispatch
Monetization Model
Software subscription tiers (Free vs Paid Custom Domain)
