Seed Exact is one Exact app made of two root files and a set of feature packages. app.contract holds the routes, every resource, mutation and task, and the view that switches between screens. app.ts is the data module that answers every source the contract asks. This section explains those two files and the rules that keep the packages from colliding inside them.
The pieces
Piece | File | Page |
|---|---|---|
Root component, routes, state, resources, mutations, tasks, actions | ||
Tabs, stacks, modals, the | ||
| ||
Source merging, grants, the | ||
| ||
Epochs, signed stamps, owner checks, tasks | ||
| both root files |
How the parts relate
flowchart TD
json["app.json manifest"] --> root["app.contract root component"]
tamber["app.tamber tokens"] --> root
ui["ui.contract shared components"] --> pkgs["package contracts: read, discuss, activity, agents, me, profile, vault"]
pkgs --> root
root -- "asks sources by name" --> data["app.ts answer dispatcher"]
data --> srcs["src/PKG/sources.ts"]
srcs --> net["HTTP and WebSocket services"]
srcs --> store["Keychain secrets and app files"]The root contract imports screens and shapes from each package contract, declares the data they need, and passes it down as props. A screen never fetches. When the root declares resource docs = readDocs(...), Exact calls answer("readDocs", args, ...) in app.ts, which forwards to the function a package exported from src/<pkg>/sources.ts. Sources run in the data module runtime, under the 100 ms turn budget and the grants that app.ts lists.
The feature packages themselves are described in Feature modules, the remote endpoints in Services the app talks to, and the language in The Contract language.
User stories
The code described here exists to deliver these stories. Each story lists this page in its Trace (traceability).
US-APP-01 The app feels like an iPhone app: Section parent: one root contract, one data module, shared UI
US-TEAM-04 Understand how the app is built: Section parent: one root contract, one data module, shared UI and conventions
In this section
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime