Atelier Commerce
A composable watch storefront with a BFF and end-to-end typed contracts.
- My role
- Personal project
- Stack
- Next.js 16, React 19, TypeScript, Express, OpenAPI, Vitest, Playwright, GitHub Actions
Context
A learning project with a fictional brand, used to practise and explain frontend integration decisions from end to end.
Problem
A commerce frontend depends on external providers that can be slow or return unexpected data. The product page has to render on the server and fail in a safe, explainable way.
How data flows
- Next.js (Server Components)
- Typed REST client
- Express BFF
- Product provider
Decisions
An Express BFF
Next only talks to its own BFF, which normalises provider data. URL configuration stays on the server.
Runtime validation at every boundary
Type guards validate input, the provider response and the public response. Prices are stored as integer cents.
Explicit, safe errors
Typed JSON 400, 404, 500, 502 and 504 responses that never expose raw bodies or stack traces. Timeouts are bounded per call and request IDs are correlated with the provider.
Documented contracts and decisions
A shared package with types, client and OpenAPI for both provider and BFF, plus ADRs for each significant decision.
Outcome
The first milestone (a fully integrated product page) passes 19 Vitest tests (contracts, client and real HTTP integration) and 2 Chromium E2E tests in CI. Next come the catalogue with URL filters, then cart and orders.
Screenshots



