Set up a machine and run the app
A contributor wants to take a Mac from nothing to the app running in a simulator and a browser, with tests passing.

As a contributor, I want to set up my Mac and see the app run in a simulator and a browser, so that I can change it and check my change myself.

Situation

I have a Mac with Xcode and a clone of the Seed repository. I have never built the mobile app and have no signing certificates.

What I do

    Install Bun 1.4.2 and clone Exact beside the Seed repository.

    From the app's folder, point EXACT2 at that clone and check out the commit named in exact.rev.

    Install Exact's packages and run its setup once.

    Run bun install --frozen-lockfile, then bun run test.

    Run bun exact.mjs ios --sim 'iPhone 18 Pro' --run.

    Run bun exact.mjs web for the quick loop in a browser.

What I should see

    bun run test passes before anything native is built.

    The simulator opens Seed on the Read tab with the four tabs at the bottom.

    The first native build takes ten to fifteen minutes. Later ones take a minute or two.

    The browser shows the same app and reloads each time I save a file.

    bun exact.mjs --help lists every command: web, ios, test, agent, verify, contract and the app's own server.

    The interface tests start their own local server and refuse to run if one is already answering.

    setup --check prints one row per requirement, with what is installed, what is wanted and the fix.

    From the repository root, pnpm mobile:install does the whole setup in one command.

    The simulator needs no signing. Signing material lives only on the build Mac.

    With several simulators booted I name one with --sim or EXACT_SIM.

    A different Bun version is refused, and an Exact checkout at another commit is refused by the one command setup.

When something goes wrong

    The launcher prints "no exact2 at" followed by a path and "EXACT2 names the checkout": the Exact clone is not where the launcher looks. I set EXACT2 to its full path and run the command again.

    The build breaks after I pull: the pinned Exact commit moved. I check out the new commit from exact.rev and run Exact's setup again.

Not included

Trace

Story US-TEAM-03, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

This story is about the team's tooling. No design page takes part.

Implementation

Page

Part it plays

Development environment

Section parent: what a machine needs, the commands, the layout and the two hosts

Setting up a machine

Prerequisites, the first run step by step, setup --check and common failures

Commands and verbs

Every verb of bun exact.mjs, the app's server verb, package scripts and root scripts

Repository layout

The annotated tree of the app directory and what is generated or ignored

Simulators and devices

Build, run, drive, test and verify on a simulator or phone

The web host for development

The browser loop, what it is for and what it cannot prove

Clipper and the Ion simulator

The team's build Mac and the agent's dedicated simulator

The Exact framework

How the app pins and consumes Exact

Dependencies

The locked dependencies bun install brings

The data module runtime (Hermes)

The Hermes bundles setup installs

The local test server

The local server Exact starts for tests

Bun unit tests

The first thing to run on a new machine

Signing and credentials

Signing lives only on the build Mac

Current limits and known gaps

iOS and web hosts only

Code

File

What

README.md L6-21

Development: the first run commands

exact.mjs L9-18

EXACT2 resolution, the no exact2 error and the pinned Bun

exact.rev

the pinned Exact commit

package.json L4-8

build, start and test scripts

package.json L25-25

packageManager bun@1.4.2

app.json L19-24

hosts: web and iOS 17.0, iPhone and iPad

app.json L32-37

the server command and no scratch database

AGENTS.md L3-22

the generated instructions: verbs, setup --check, verify

tools/test-server/index.ts

the server started by bun exact.mjs server

bun.lock

the frozen lockfile

Tests

File

What it checks

tools/test-server/routes.test.ts

the local test server's proxy, CORS and refusals

app.test.contract

"the four tabs are there and each opens" (the first UI test to run on a new machine)

Delivery

Delivered by #1470.

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

Unsubscribe anytime

Comments