App structure
How the Seed Exact app is assembled: one root contract, one data module, shared UI, and the conventions that let eight packages share them.

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

app.contract

The root contract

Tabs, stacks, modals, the follow action

app.contract routes

Navigation and routes

hm:// scheme and web URLs

app.json

Deep links and URL handling

Source merging, grants, the answer dispatcher

app.ts

The data module

Avatar, StatusLine, tokens, design rules

ui.contract, app.tamber, DESIGN.md

Shared components and visual design

Epochs, signed stamps, owner checks, tasks

app.contract

State, refresh and stale-reply patterns

// >>> pkg:<name> blocks, file naming, how to add things

both root files

Package conventions and ownership blocks

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.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Comments