Egapy Enterprise ERP
An all-in-one operations platform that connects online storefronts, multiple warehouses, regional shipping couriers, and payment collection for high-volume retail merchants.
Zero duplicate records generated during high-concurrency webhook retries
Unified NestJS API, Next.js Merchant Portal/Landing, and Next.js Super-Admin
Relational Prisma schema spanning multi-tenancy, logistics, POS, and financial accounting
Native connectors across Shopify, WooCommerce, Bosta, Mylerz, Kashier, Twilio, and Meta WhatsApp
01: Operational Challenge & Concurrency Bottleneck
I architected and led the engineering of the 3-application platform: the core API engine, the merchant portal, and the governance console. I designed the multi-tenant database schema, external courier adapters, and payment settlement workflows.
Retailers selling across multiple online sales channels struggle with stockouts from unlinked sales streams, delayed courier handoffs, and untracked cash-on-delivery settlements. Existing tools rarely combine real-time warehouse inventory reservations with regional shipping integrations and automated financial reconciliation.
Preventing race conditions during simultaneous webhook order bursts across warehouses, stopping double-credit errors during concurrent courier cash reconciliations, and enforcing tenant isolation on a shared relational database.
I engineered an ACID-compliant transactional pipeline using deterministic idempotency keys and pre-transaction bulk reads to minimize lock contention. I implemented a 5-stage tenant resolution middleware and built a polymorphic factory pattern for courier integrations with unified district-level geographic normalization.
Core Subsystem Modules & Domain Isolation
Order Ingestion & Deduplication Pipeline
Pre-fetches product catalogs and customer entities outside active transactions before executing atomic order creation, customer linking, and ledger attribution inside an isolated ACID boundary.
5-Stage Tenant Resolution Gateway
Hierarchical fallback resolver identifying tenant contexts across secure cookies, custom tenant headers, URL path segments, and subdomain host headers.
Dynamic Courier Dispatch Factory
Polymorphic provider abstraction normalizing disparate courier APIs into a unified shipment protocol with automated waybill generation.
Quota & Limit Guards
Execution guards enforcing real-time daily/monthly order quotas, SKU thresholds, and role-based staff seat caps with zero database overhead.
Tenant-Scoped WebSocket Gateway
JWT-authenticated gateway enforcing tenant-isolated rooms for instant order status broadcasts, inventory movement alerts, and staff chat.
Architectural Capabilities & Engineered Workflows
Multi-Channel Store Sync
Automatically imports orders and synchronizes stock levels across external stores with zero duplicate records.
Automated Courier Dispatch
Generates waybills, calculates shipping rates, and dispatches parcels directly through regional couriers.
Multi-Warehouse Inventory & POS
Tracks SKU stock movements across multiple storage hubs and supports in-person barcode checkout.
Returns & Exchanges (RMA)
Tracks customer returns and automatically updates restock ledgers upon warehouse check-in.
Cash-on-Delivery Ledger
Reconciles courier payouts, flags collection discrepancies, and attributes profit per order.
Subscription Billing & Quotas
Manages merchant plan tiers, monthly order volume limits, and staff seat permissions.
Interactive Admin GIS Zoning
Lets platform operators draw delivery zones and manage courier tariffs on interactive maps.
Team Notifications
Dispatches real-time order status updates and customer notification messages.
System Topology & Architectural Data Flow
Public Marketing Landing & Onboarding
SEO-optimized bilingual landing portal driving merchant conversion, plan selection, and self-service registration.
Merchant Operations Dashboard & POS
Operational web portal handling order fulfillment, barcode POS scanning, RMA flows, and warehouse movements.
Super-Admin Governance Console
Platform console with interactive GIS geofencing, subscription auditing, and multi-country configurations.
Core NestJS API Engine & Gateway
5-stage tenant resolver, RBAC limit guards, and business logic orchestrator processing synchronous requests and asynchronous webhooks.
Polymorphic Logistics & Carrier Hub
Courier abstraction layer standardizing shipment dispatching, warehouse pickups, tracking webhooks, and COD auditing.
Real-Time WebSocket Gateway
Tenant-isolated Socket.io broker distributing instant team notifications, live order status transitions, and team chat.
PostgreSQL Database (ACID Layer)
Multi-tenant relational schema (80+ models) managing foreign key constraints, double-entry ledgers, and audit logs.
Production Technology Matrix & Ecosystem
Next Steps & Technical Inquiries
Looking for a systems architect or full-stack engineer for your next high-throughput platform? Let's discuss architecture and technical requirements.