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.
Home
Introduce the brand, route to the range, build trust.
- Hero
- Trust strip
- Categories
- Featured bikes
- Editorial
- Why SAVA
- Service CTA
Collection / PLP
Filter, compare and choose a bike.
- Breadcrumb
- Page header
- Category filters
- Sort
- Product grid
- Support CTA
Product / PDP
Understand the bike, choose options, add to cart.
- Breadcrumb
- Gallery
- Buy box
- Tabs (overview/specs/sizing)
- Related bikes
Cart
Review items, adjust quantity, proceed to checkout.
- Breadcrumb
- Title
- Line items
- Order summary
- Checkout CTA
- Cross-sell
Checkout payment
Choose a payment method, pay, confirm the order.
- Minimal checkout shell
- Steps
- Contact + delivery
- Payment methods
- Method panel
- Pay CTA
- Summary
- Confirmation
Account
View orders, addresses and warranty registrations.
- Account shell
- Side nav
- Overview cards
- Orders table
- Address book
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.
- Minimal checkout shell: logo, secure cue, return to cart, no storefront navigation.
- Three-step progress with Payment active; completed steps show a brand check.
- Title and one-sentence reassurance above the form.
- Contact and delivery summary, editable in place.
- Payment methods as radio cards: card, Apple Pay, Tabby, Tamara, cash on delivery.
- Method-specific panel: card fields, wallet explanation, instalment schedule or COD fee.
- Primary pay button labelled with the exact total; processing state with spinner.
- Sticky order summary with items, delivery, VAT note and total.
- 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.
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.
