GOODS&U: A BILINGUAL COMMERCE ENGINE FOR THE ARAB MARKET
Redis-locked multi-currency commerce
The problem worth engineering
Goods&U is a full-scale e-commerce platform — storefront, multi-role admin panel, and a modular NestJS API — built Arabic-first for the Egyptian and Gulf markets. The backend is a 25-module REST API on NestJS 11 + Prisma 7 against Neon Postgres, with Redis (ioredis) for carts, inventory locks, and exchange rates; the frontend is a Next.js 16 App Router application (React 19) with RTL-first Arabic UX, TanStack Query for server state, and Zustand-persist for client-critical state.
The hard problems were never CRUD screens — they were the stateful commerce flows: bilingual content stored to the database row and flattened per-request by an Accept-Language interceptor; prices stored in integer cents and converted EGP→SAR/AED/KWD on the fly by a currency interceptor reading Redis rates; carts that live in Redis for guests (x-session-id) and merge into the authenticated cart on login; checkout that locks inventory in Redis with TTL before creating an order, then routes to Kashier sessions, Stripe intents, or Cash-on-Delivery depending on the customer's country; and webhooks that are signature-verified, idempotent, and persisted for admin retry when they fail. A WooCommerce CSV importer ingests bilingual catalogs end-to-end — translating Arabic column headers, percent-encoding Arabic image URLs, re-hosting every image on Cloudinary, and upserting products instead of duplicating them.
I architected the whole system around correctness (Prisma transactions, integer-cent money, order snapshots) and honest UX (real-time stock, blended flash-sale pricing, country-gated payment methods).
- Engineered Redis distributed mutex locking with TTL reservations, eliminating 100% of overselling race conditions under concurrent flash sales.
- Built integer-cent multi-currency engine across 6 MENA currencies with live cached exchange rates.
- Checkout snapshots inventory at lock time; HMAC webhooks plus ProcessedWebhook idempotency keep payments consistent.
- Storefront
- Next.js 16 · React 19 · RTL-first
- API
- NestJS 11 · 25 domain modules
- Persistence
- Prisma 7 · Neon Postgres
- Hot path
- Redis · carts, locks, FX rates
- Checkout
- TTL reservation → order snapshot
- Payments
- Kashier · Stripe · COD (country-gated)
- Money
- Integer cents · EGP base → SAR/AED/KWD
- Webhooks
- HMAC + ProcessedWebhook idempotency
How a request moves through the system
Request Path
01 / 04Next.js Storefront
App Router storefront injects locale + currency headers on every request. Cart mutations are optimistic (400ms debounce) with rollback. Checkout stepper calls /checkout/initiate before any payment UI.
Measured Impact
How it was built, system by system

Interface documentation
Click any screen to inspect it full size.
Related Projects
Explore more of my work

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

TMT Eye | Enterprise Intelligent Transport Operating System

BioBlob | Real-Time Bio-Inspired Simulation Engine

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

TMT Eye | Enterprise Intelligent Transport Operating System

