Mitoshi見通しDocs
Open app
For builders

Run Mitoshi locally

The repository's layout, the commands that build and check it, and the configuration each app needs.

Checked 2026-10-13 · app 11d85e0

The repository is private. If you have access, this is the layout and the loop.

Layout

contracts/     Foundry (Tempo + evm profiles); deployments/<chainId>/<area>.json
packages/      @cwf/core (pure rules) · markets (all chain I/O) · clients (generated) · db · brain · tokens
services/ops   every keeper on runActor, one HTTP server
web/           the Next.js 16 app
mobile/        the Expo shell (iOS and Android) around the site
docs-site/     these docs — their own pnpm root and Dockerfile
scripts/       codegen, invariants, keys, deploy, live drives, e2e
infra/         env examples (names only), secrets' names, Coolify notes
docs/          plan, stage files, decisions, acceptance evidence, specs, design

The loop

Node 24 and pnpm 11.24.

pnpm install
pnpm dev                # the web app
pnpm ops:start          # ops (dry run unless DRY_RUN=0)
pnpm db:migrate         # Postgres migrations
CheckCommand
Types, every packagepnpm typecheck
Repository invariants (chain I/O only in markets, no float money, files ≤ 400 lines, relay coverage, …)pnpm invariants
Generated ABIs and addresses up to datepnpm codegen:check
Unit testspnpm test
Contractspnpm contracts:build, pnpm contracts:test
All of it, as CI runs itpnpm ci

Configuration

infra/env/web.testnet.example and ops.testnet.example list every variable by name — RPC endpoints, Postgres and Redis, the relay's fee payer, each ops role key, the stream ticket secret, data-provider keys, model keys. Values live only in the Coolify apps; infra/secrets.md names where each comes from. Nothing secret is committed.

Deploy

Web and ops deploy from integration/t1 to the owner's Coolify server, at mitoshi.xyz and ops.mitoshi.xyz (the older testnet. hosts redirect there). These docs build from docs-site/ (its Dockerfile serves port 3000) for docs.mitoshi.xyz. The phone app builds on EAS from mobile/ (the phone app).

These docs

cd docs-site
pnpm install
pnpm dev                # localhost:3156
pnpm check              # content checks against the app, typecheck, build

pnpm check fails when a guide links a page or an app route that doesn't exist, cites a transaction no acceptance record holds or an address no deployment fragment names, or when lib/deployments.json differs from the fragments (pnpm sync:deployments refreshes it). It warns with every app commit since the revision the guides were last checked against (site.revision in lib/site.ts): read those, update the guides, then advance the revision.

On this page