SaaS · Commerce InfrastructureFull-Stack Engineering Case Study

OPNMRT (Open Merchant Retail Tech)

A multi-tenant e-commerce SaaS platform functioning as an intelligent storefront engine. Features a pnpm monorepo (apps/web Next.js, apps/api NestJS), BYOK direct payment settlement (Paystack & Flutterwave with 0% platform commission), and Radar hyper-local LGA logistics.

Multi-Tenant E-Commerce SaaS PlatformLive System
https://www.opnmrt.com/● verified system
OPNMRT (Open Merchant Retail Tech) interface preview
Technical Case Study

Viewing System

OPNMRT (Open Merchant Retail Tech)

ProjectsExecutive Summary
01

Executive Summary

The Business Challenge

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.

The Architectural Solution

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 Data Isolation01

Multi-Tenant Storefront Engine

Single application serving all sellers securely with row-level data isolation (`tenantId`/`storeId`) at the database layer.

Direct Settlement02

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.

Hyper-Local Delivery03

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 Commerce Intelligence04

AI Storefront Assistant

Integrates Gemini API for automated product description generation, sales analytics summaries, and inventory restock forecasting.

02

System Architecture & Specs

Frontend Storefront
Next.jsReact QueryZustandTailwind CSSFramer Motion

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.

Backend Microservices
NestJSNode.jsTypeScriptSocket.IORedis Pub/Sub

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.

Shared Workspaces
pnpm WorkspacesTypeScriptZod

@opnmrt/shared Package (packages/shared)

Unified TypeScript interfaces, Zod validation schemas, and currency utilities shared seamlessly across web and api workspace packages.

Database Layer
PostgreSQLPrisma ORMRedis

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

01. One engine, separate storefronts

Subdomains and custom domains resolve tenants dynamically via Next.js middleware and NestJS interceptors.

02. Zero fund holding

The platform handles cart logic and metadata tracking without sitting between sellers and their revenue.

03. Built for West African retail

Radar hyper-local logistics avoid cross-city dispatch errors and solve last-mile delivery challenges.

03

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.

TechnologyCategorySystem RolePerformance Rationale
Next.jsFrameworkStorefront & Merchant Dashboard UIDelivers rapid initial page loads, dynamic domain routing, and SEO optimization for merchant stores.
NestJSFrameworkModular Domain-Driven API BackendStructured enterprise backend handling complex order lifecycle state machines and WebSocket events.
PostgreSQLDatabaseRelational Multi-Tenant Data StoreGuarantees strict ACID compliance and inventory stock integrity under high concurrency.
PrismaORMType-Safe Multi-Tenant Database MappingEnforces strict tenant isolation across product catalogues, orders, and customer records.
FlutterwavePaymentsDirect BYOK African Gateway SettlementAllows sellers to receive card, bank transfer, and mobile money payouts directly.
PaystackPaymentsDirect BYOK Merchant Payout RoutingInstant direct seller payout settlement without platform escrow or fee deductions.
Socket.IOReal-timeLive Chat & Order Event TransportEnables buyer-seller trust chat and real-time order status updates.
04

Live Preview & Showcase

05

Metrics & Reliability

0%

Platform Commission

Direct merchant settlement without transaction markups

< 60 min

Delivery Turnaround

Achieved via Radar LGA-filtered rider pool dispatch

SaaS

Monetization Model

Software subscription tiers (Free vs Paid Custom Domain)

Start a Project

Ready to engineer your next product?

Available for full-stack web applications, SaaS platform development, and senior technical consulting.