Client apps and blocks
An outline; the full description is in docs/architecture.md, Packs and blocks and Client repos.
The typed client
Section titled “The typed client”A client app reaches the host only through the typed client, generated per product from the registry, over the HTTP surface: one route per operation, for staff, customers and the public (ADR 0403, ADR 0415, ADR 0418). Client code never opens the database. A web app on Cloudflare reaches its host by a service binding; the mobile app by HTTP.
Blocks
Section titled “Blocks”A block is a screen, or part of one, in a web or a native skin: a folder with a block.json
naming its pack, skin, operations, files and the blocks it depends on
(ADR 0424). cos add <block> copies it into a client app, where
it is the app’s own; cos diff <block> shows upstream changes. A block holds no rules: the block
lint refuses one that does. Web and native share logic (the hooks), not screens. Every block is in
the reference.
Staff screens
Section titled “Staff screens”A shipped pack may declare staff screens: web blocks the product’s admin builds in and shows to whoever could call the tools that open them. Each pack’s are on its Screens page.
Role clients
Section titled “Role clients”A staff role on a phone (a coach, the rostered team) gets a client holding only its role’s operations and its grants (ADR 0451).
This guide is docs/guides/client-apps-and-blocks.md, written by hand beside the code.