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.

User stories

The code described here exists to deliver these stories. Each story lists this page in its Trace (traceability).

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

Unsubscribe anytime

Connections0
The data module (app.ts) ยท Child document ยท Outgoing linkThe data module (app.ts)Deep links and URL handling ยท Child document ยท Outgoing linkDeep links and URL handlโ€ฆNavigation and routes ยท Child document ยท Outgoing linkNavigation and routesPackage conventions and ownership blocks ยท Child document ยท Outgoing linkPackage conventions and โ€ฆState, refresh and stale-reply patterns ยท Child document ยท Outgoing linkState, refresh and staleโ€ฆThe root contract (app.contract) ยท Child document ยท Outgoing linkThe root contract (app.cโ€ฆShared components and visual design ยท Child document ยท Outgoing linkShared components and viโ€ฆLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentLinked document ยท Outgoing linkLinked documentApp structureApp structure
Citations 0Children & links 16

Loading child documentsโ€ฆ

Connections show where other documents or comments link to this document.

Related documents

Loading connectionsโ€ฆ