Skip to main content

Examples & Recipes

Task-oriented, copy-paste-ready examples for common Archibald application patterns. Each recipe is a complete, working slice of an application — not an API reference. For the full option surface behind a recipe, follow the links into the API reference and guides.

Recipes in this section

Fetching and caching data

useFetch basics — keys, actions, loading and error states — plus the difference between refetch and invalidate, and an optimistic update with useMutation and the DataClient.

Building a product listing page

A category listing with useSearch: products, facets driven by URL query parameters, pagination, and a type-ahead search box with useSearchQuerySuggestions.

Login, session and route protection

A login form with useLogin, reading the user with useUser/useIsLoggedIn, logging out, reading the session server-side with getSession, and a protected-route pattern.

More recipes elsewhere

  • CMS recipes — content slots, component mapping, preview, and other content-management patterns.
  • End-to-end testing — writing and running Cypress and Playwright e2e tests against an Archibald app.