Skip to content

Frontend conventions

The frontend conventions, as the Evolve team gives them to coding agents. See Conventions for how to install them.

ConventionWhat it covers
evolve-site-e2eDecide whether something belongs in an end-to-end test at all, then write it — the scope rule, API-first setup with reversible operations, and which device/market/browser combinations a spec runs in.
evolve-site-featureWire an `@evolve-storefront/feature-*` package into a page in this repo — install, providers, messages, owning the query, rendering the view with `renderItem` and slots, and knowing when to stop.
evolve-site-formPut a form exported by an `@evolve-storefront/feature-*` package on a page — render it, wire submit to the feature's mutation hook, feed server errors back through the same display path, and extend fields.
evolve-site-messagesAdd or change user-facing copy, scope what reaches the browser, add a locale, or localize a URL segment.
evolve-site-proxyEdit the storefront's `proxy.ts` — Next 16's renamed middleware.
evolve-site-renderingChoose how a route renders and whether its response may be cached — the three page patterns, the anonymous-document rule, and what must be in the first synchronous HTML flush.
evolve-site-themingStyle this storefront to the brand by picking the cheapest mechanism that does the job — tokens, messages, role CSS and surfaces, or CSS on `data-component` hooks.