The bet
Reproduce the apple.com feel — millimetre-precise scrolling, products in 3D — while taking payment through Mobile Money on the Cameroonian market.
Architecture
A Turborepo monorepo built on a single Zod contract (@repo/shared) that generates the types, the API DTOs and the form resolvers. Front end and back end speak the same language: changing the contract breaks compilation where it should, not in production.
packages/shared— Zod schemas → types + DTOs + XAF formatterapps/api— NestJS 10 + Prisma + PostgreSQL (JWT argon2)apps/web— Next.js 15 + React 19 + Tailwind v4
Key decisions
- Prices recomputed server-side at checkout: the client cart says what, never how much. Stock is decremented transactionally — no overselling.
- Mobile Money through an aggregator (MTN MoMo / Orange Money), sandbox mode by default, payment callback over an HMAC-SHA256 signed webhook.
- Showroom: Lenis (smooth scroll), GSAP (timelines synchronised to the scroll), React Three Fiber + drei (3D products).
Stack
Next.js 15 · NestJS 10 · Prisma · PostgreSQL · GSAP · Lenis · React Three Fiber · Turborepo
Full write-up: iPhone Cameroon: an Apple-style showroom that takes Mobile Money.