Skip to content
Rubén García García
All projects
In development

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

  1. Next.js (Server Components)
  2. Typed REST client
  3. Express BFF
  4. Product provider

Decisions

  1. An Express BFF

    Next only talks to its own BFF, which normalises provider data. URL configuration stays on the server.

  2. Runtime validation at every boundary

    Type guards validate input, the provider response and the public response. Prices are stored as integer cents.

  3. 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.

  4. 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

Atelier Horizon watch product page with price, reference and availability (desktop).Atelier Commerce home page with the Horizon collection headline and its call to action (desktop).Atelier Horizon watch product page with price, reference and availability (mobile).Product 404 page: "Watch not found" with a link back to the collection (desktop).

Links

Next projectAMAIA QA