~/adnan-ahmed
Adnan Ahmed
All projects

SOUQ (ሱቅ) Marketplace

Live

Multi-vendor Ethiopian e-commerce platform with a 500-concurrency zero-oversell two-phase reservation engine and Chapa ETB escrow payments.

ReactTypeScriptNode.jsMongoDBChapa APITailwind CSS

Live Application: pp1-marketplace.vercel.app
Source Repository: github.com/PROFESSOR-ADNAN/pp1-marketplace

The problem

In Ethiopia, a massive volume of peer-to-peer commerce happens informally inside Telegram channels and Facebook groups. This creates severe friction for both sides: buyers face rampant payment fraud without escrow guarantees, while sellers struggle with chaotic manual order logging, lost inventory counts, and untracked bank transfer screenshots.

The solution

SOUQ (ሱቅ, "shop" in Amharic) is a modern multi-vendor e-commerce marketplace built specifically for the Ethiopian retail ecosystem. It provides independent merchants with structured digital storefronts, automated inventory management, and an escrow-protected checkout flow settling transactions in Ethiopian Birr (ETB) via Chapa (Telebirr, CBE Birr, and cards).

Engineering highlights

  • Atomic two-phase inventory reservation engine: Flash sales can overwhelm stock counters. SOUQ implements an atomic two-phase reservation engine that temporarily holds stock during checkout and auto-releases it if payment expires. Tested and verified with 500 simulated concurrent purchase attempts against 50 available stock units, resulting in exactly 50 fulfilled reservations, 450 clean rejections, and zero negative stock occurrences.
  • Chapa ETB payment escrow: Implemented automated payment callbacks with Chapa. Funds remain held securely until the order lifecycle reaches confirmed delivery, preventing merchant fraud and disputed bank transfers.
  • Multi-vendor catalog & cart state machine: Dynamic multi-seller cart management supporting mixed-vendor baskets, per-merchant order dispatching, and persistent browser session synchronization.
  • Strict TypeScript contracts: Shared end-to-end interface definitions between backend routes and frontend UI components, guaranteeing consistent request/response schemas.

Review & architectural takeaways

In e-commerce, user-facing speed means nothing if concurrent stock reservations are flawed. Designing the inventory system around atomic updates ($inc with $gte balance bounds) rather than application-layer checks ensured that SOUQ remains robust even under heavy checkout stampedes.