Orchestr

Introduction

Understanding the basics of Orchestr

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:

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

Defines the input and output of an action. Typically used for mutations and side effects like creating an order, adding an item to a cart, etc.

Query Token

Defines the input of a query. Typically used for fetching data from the database. E.g search for products by a string, show products in category.

Link Token

Defines the input a link. Similarly to queries, these can be called on entities to fetch related entities. E.g. get all variants of a product, get all orders for a customer.

Component Token

Defines the schema of a entity component. Entity components describe a subset of data of an entity. E.g. product-prices, category-seo, etc.