Permissionless futarchy on Gnosis.
| Path | Package | Purpose |
|---|---|---|
apps/web |
web |
Participant UI — see apps/web/README.md |
apps/devtools |
@foresight/devtools |
Local dev tools |
apps/indexer |
foresight-indexer |
Envio indexer — see apps/indexer/README.md |
packages/contracts |
@foresight/contracts |
SessionFactory — see packages/contracts/README.md |
packages/session-metadata |
@foresight/session-metadata |
Session display-metadata schema — see its README |
packages/mock-atlas |
@foresight/mock-atlas |
Local Atlas + IPFS gateway (dev/test) — see its README |
Requires Node 22+ and Yarn 4 (corepack enable). The indexer needs Docker.
yarn install
cp apps/web/.env.example apps/web/.env.local # then fill it in
yarn dev # web at http://localhost:3000The web app validates its environment at startup and refuses to boot without it - see apps/web/README.md for what each variable is.
The indexer has its own env file: cp apps/indexer/.env.example apps/indexer/.env — see
apps/indexer/README.md for what each variable does.
The whole local stack — hardhat node, mock-atlas, indexer and web — in one tmux session:
yarn local-stack # start (wipes local deployments + indexed data)
yarn stop-local-stack # stop stackOr the same pieces by hand, in separate terminals:
yarn local-node:contracts # terminal 1: compile + hardhat node
yarn mock-atlas # terminal 2: mock Atlas + IPFS gateway on :4747
yarn indexer:dev # terminal 3: envio indexer + hasura on :8080When running by hand, point the indexer at the mock gateway (ENVIO_IPFS_GATEWAY) and web at
the mock Atlas (NEXT_PUBLIC_ATLAS_URI) — both are in the .env.examples. yarn local-stack
wires all of this for you.
After contract changes while the node is still running: yarn local-node:deploy (redeploy + wagmi codegen).
To populate the stack with data, yarn simulate:session deploys a sample session (mock Seer
markets + example metadata) that the indexer picks up — flags in
packages/contracts/README.md.
See packages/contracts/README.md for deploy and artifact exports.
yarn workspace @foresight/contracts test
yarn workspace foresight-indexer test
yarn test:e2e
yarn format # root files, then turbo per workspace
yarn format:check # same, check onlyMIT © Kleros