Case study · E-commerce
Fashion Corner
Multi-store fashion commerce with a bilingual EN/AR storefront, an operations console, and inventory settlement between the platform and partner stores.
- Role
- Architecture & full-stack development
- Company
- Matamix International
- Category
- E-commerce
- Deliverables
- API · Admin console · Storefront
01Overview
A multi-vendor modest-fashion platform delivered as three coordinated repositories — a NestJS/Prisma API, an admin console, and a next-intl storefront — built around store settlements, warehouse-level stock reservations and a backend-for-frontend auth layer.
02Context
Several partner stores sell through one platform. Each needs its own inventory, stock settlement and fulfilment tracking; customers need a storefront that is genuinely bilingual — English and Arabic, including right-to-left layout.
03Problem
Selling on behalf of multiple stores means stock can’t be a single number and money can’t be a single ledger. The platform has to know which warehouse holds a unit, hold it while a customer checks out, and track what the platform owes each partner store after commission.
04Solution
A NestJS/Prisma API models warehouses, locations, reservations and stock transactions alongside per-store agreements and settlements. An admin console manages stores, catalog, orders, coupons and settlements. A next-intl storefront delivers cart, wishlist, coupons, reviews and checkout in both languages. The two Next.js apps talk to the API through a backend-for-frontend layer so raw JWTs never reach the browser.
05Architecture
- 1
Storefront
Bilingual Next.js app — cart, wishlist, checkout, reviews
- Next.js 16
- next-intl
- TanStack Query
- 2
Admin console
Stores, catalog, orders, coupons, settlements, reports
- Next.js
- 3
BFF proxy
Server-side routes hold the session; JWTs stay off the client
- Next.js route handlers
- 4
Commerce API
Catalog, inventory reservations, orders, settlements, audit logs
- NestJS 11
- Prisma 6
- 5
Data
Relational store plus cache
- MySQL
- Redis
06Engineering decisions
- A
Backend-for-frontend authentication
Both Next.js apps proxy API calls through their own server routes, so the browser holds a session rather than a bearer token. It removes a whole class of token-theft issues most storefronts accept by default.
- B
Reservations, not just stock counts
Inventory is tracked per warehouse and location, with explicit reservations and stock transactions — so a unit in a customer’s checkout isn’t sold twice, and every movement is auditable.
- C
Settlement as a first-class model
Store agreements and settlements are modelled directly, making commission and payouts between the platform and each partner store a query instead of a spreadsheet.
- D
i18n from the routing layer up
The storefront is locale-routed with next-intl, so Arabic isn’t a translation pass bolted on at the end — layout direction and content switch together.
07Key features
- Multi-store inventory: warehouses, locations, stock reservations and transactions
- Store agreements and settlements with per-store commission and payout tracking
- Product catalog with variants, attributes, categories and images
- Bilingual EN/AR (RTL) storefront with cart, wishlist, coupons and reviews
- Audit logs and reporting in the admin console
08Challenges
- Keeping stock correct across multiple stores and warehouses while customers hold items in checkout.
- Supporting right-to-left Arabic as a first-class experience alongside English.
- Protecting API credentials in two separate browser-facing applications.
09Technology
- NestJS 11
- Prisma 6
- MySQL
- Redis
- Next.js 16
- next-intl
- TanStack Query
- TypeScript
10Screens
Screenshots for this project are being prepared. A live walkthrough is available on request.
Ask for a walkthrough