Backend for Frontend
Introduction
Orchestr is the powerful data-composition framework at the heart of Laioutr. It is designed to be a flexible and powerful tool for building scalable data layer applications with a focus on type safety, data composition, and modular architecture.
Core Concepts
Orchestr is built around four main handler types that work together to provide a complete data layer solution:
- Action Handlers: Handle mutations and side effects
- Query Handlers: Fetch and return entity IDs
- Query Templates: Preview data for queries in the Studio
- Link Handlers: Define relationships between entities
- Component Resolvers: Resolve specific data components for entities
Orchestr caches API data at three levels (queries, links, component resolvers) to reduce latency and backend load. See Caching for strategies, cache keys, and how to use the cache in your own handlers.
Tokens
As orchestr does not know which app is responsible for a given action, query, link, or component, it uses tokens to identify them.
Tokens can be thought of as "contracts" between the frontend, orchestr and the apps. Each token is a unique identifier that is used to identify the action, query, link, or component.
Action Token
Query Token
Sitemap
Generate XML sitemaps for your Laioutr frontend to help search engines discover and index your pages. Automatically includes pages from your runtime config and integrates with robots.txt.
Recipes
Patterns and gotchas from building connectors against real commerce backends. Each recipe captures one problem we hit and the approach that worked.