Pages are assembled from recipes.

A good brief says what the page must do. These recipes say how it should look, what it must include and how to verify it, so an agent can finish without a design loop.

Six rules that prevent drift.

Start from a recipe, not a blank file.

Every new page maps to a pattern here. Copy its anatomy and data shape, then change the content, not the design language.

Use tokens. Never raw hex.

Colour, spacing, type and radius come from globals.css. If a value is missing, add a token first; do not inline #EB1256 in a component.

One primary action per view.

The red button is the thing you want the user to do. Everything else is outline, ghost, secondary or a link.

Compose, do not re-style.

Use ProductCard, Price, OrderSummary, CheckoutSteps and PaymentForm. Do not rebuild a product card with a div grid.

Cover every state.

Default, hover, focus, selected, loading, empty, error and success. A page is not done when the happy path renders.

Money, dates and phones are formatted centrally.

Use formatAED, tabular-price and orderNumber. Never hand-format currency or invent an order ID.

The page library.

Reference routes are built and verified. Recipe-only pages have a defined anatomy but no route yet.

Reference

Home

Introduce the brand, route to the range, build trust.

  1. Hero
  2. Trust strip
  3. Categories
  4. Featured bikes
  5. Editorial
  6. Why SAVA
  7. Service CTA
Reference

Collection / PLP

Filter, compare and choose a bike.

  1. Breadcrumb
  2. Page header
  3. Category filters
  4. Sort
  5. Product grid
  6. Support CTA
Reference

Product / PDP

Understand the bike, choose options, add to cart.

  1. Breadcrumb
  2. Gallery
  3. Buy box
  4. Tabs (overview/specs/sizing)
  5. Related bikes
Reference

Cart

Review items, adjust quantity, proceed to checkout.

  1. Breadcrumb
  2. Title
  3. Line items
  4. Order summary
  5. Checkout CTA
  6. Cross-sell
Reference

Checkout payment

Choose a payment method, pay, confirm the order.

  1. Minimal checkout shell
  2. Steps
  3. Contact + delivery
  4. Payment methods
  5. Method panel
  6. Pay CTA
  7. Summary
  8. Confirmation
Recipe only

Account

View orders, addresses and warranty registrations.

  1. Account shell
  2. Side nav
  3. Overview cards
  4. Orders table
  5. Address book
Compose from commerce components; no route yet.

Payment: choose, pay, confirm.

This is the worked example the system was built around. A brief with three verbs becomes a complete page because every layer already knows its job.

  1. Minimal checkout shell: logo, secure cue, return to cart, no storefront navigation.
  2. Three-step progress with Payment active; completed steps show a brand check.
  3. Title and one-sentence reassurance above the form.
  4. Contact and delivery summary, editable in place.
  5. Payment methods as radio cards: card, Apple Pay, Tabby, Tamara, cash on delivery.
  6. Method-specific panel: card fields, wallet explanation, instalment schedule or COD fee.
  7. Primary pay button labelled with the exact total; processing state with spinner.
  8. Sticky order summary with items, delivery, VAT note and total.
  9. Confirmation state: order number, method, total, delivery window and next steps.

Why it works

  • The checkout shell removes storefront distractions.
  • Progress is explicit: cart → details → payment.
  • Method cards carry the provider name, what it does and the brand mark.
  • The pay button always shows the exact amount, including COD fees.
  • The summary is the single source of truth and stays in view.
  • Success is a page state, not a toast that disappears.
Open the reference

The page spec an agent receives.

This is the level of detail that removes back-and-forth. Fill the blanks; do not redesign what is already decided.

## Page spec

Route: /checkout/payment
Goal: let the customer choose a payment method, pay, and see confirmation.

Data:
- cart items + subtotal (from Medusa cart)
- shipping address + delivery method
- enabled payment providers

Must use:
- checkout layout (minimal shell)
- CheckoutSteps (current = 3)
- PaymentForm / payment-method radio cards
- OrderSummary (items, delivery, VAT included, total)

States:
- default (card selected)
- method selected (panel swaps)
- processing (button spinner, disabled)
- validation error (inline, field-level)
- success (order confirmation, no page reload)

Copy:
- "Choose how you would like to pay."
- "VAT included. Free delivery across the UAE."

Do not:
- add a second primary button
- invent payment provider icons
- change tokens or add a second typeface
- ship without the success state

The page QA checklist.

  • Renders at 375, 768 and 1280 without horizontal scroll.
  • Exactly one primary action; all other actions are secondary.
  • All interactive elements reachable and operable by keyboard.
  • Focus rings visible on light and ink surfaces.
  • Every control has a visible label, not just a placeholder.
  • Loading, empty, error and success states exist.
  • Money uses Price or formatAED; totals reconcile with the summary.
  • No raw hex, arbitrary font sizes or new font families.
  • Images have meaningful alt text; decorative images are hidden.
  • Copy follows the voice rules: direct, concrete, no hype.

Do

  • Start from the closest recipe and keep its anatomy.
  • Use the composites; they already encode the rules.
  • Add missing capabilities to the system, then consume them.
  • Test the empty, loading, error and success states.

Don't

  • Invent a new card, badge or price style.
  • Add a second display font, accent colour or dark mode.
  • Use arbitrary values like text-[17px].
  • Ship a happy-path-only page.