Developer Quickstart
Run the entire Agentic Market stack locally in one command or test individual workspaces.
Agentic Market is organized as a Bun + Foundry monorepo. You can boot the entire local arena—including Cancun Anvil, deployed BinaryEngine, seeded live and resolved markets, INV-1 solvency verification, ElysiaJS API, and Next.js storefront—with a single command.
Prerequisites
| Tool | Minimum Version | Purpose |
|---|---|---|
| Bun | >= 1.2 | Root tooling, app/, agenticmarket/, workers/, docs-site/ |
Foundry (forge, cast, anvil) | Latest stable | Solidity 0.8.28 compilation, unit/fuzz/invariant tests, local EVM |
| Git | >= 2.40 | Branching & .husky hooks |
1-Command Local Full-Stack Arena
# Install root dev tooling and activate repository git hooks
bun install
git config core.hooksPath .husky
# Boot Anvil (31337) + deploy contracts + seed 5 markets + verify INV-1 + start API & Storefront
bun run dev:localNever run bunx husky init
Running bunx husky init overwrites .husky/pre-commit and removes secret scanning, brand compliance, and build gates. Only git config core.hooksPath .husky is needed.
Local Development URLs
| Surface | URL |
|---|---|
Storefront (agenticmarket/) | http://localhost:3000 |
Agent Read Layer API (app/) | http://localhost:3001 |
| Scalar Interactive API Reference | http://localhost:3001/docs |
| Read-Only MCP Server | POST http://localhost:3001/mcp |
Fumadocs Portal (docs-site/) | http://localhost:3002 |
Monorepo Workspaces
| Workspace | Stack | Port | Verification Commands |
|---|---|---|---|
contract/ | Solidity 0.8.28, Foundry (cancun, via_ir), Solady | — | forge fmt --check && forge build --sizes && forge test |
app/ | Bun, ElysiaJS, TypeBox, @elysiajs/openapi, Viem | 3001 | bunx tsc --noEmit && bun test |
workers/ | Bun, Viem (isolated least-privilege workers) | — | bunx tsc --noEmit && bun test |
agenticmarket/ | Next.js 16.4.6 App Router, React 19.3, Tailwind v4 | 3000 | bunx tsc --noEmit && bun test && bun run lint && bun run build |
docs-site/ | Next.js 16.4.6, Fumadocs, KaTeX, Tailwind v4 | 3002 | bunx tsc --noEmit && bun run build |
Running Individual Workspaces
cd contract
forge build --sizes
forge test
bun scripts/export-abis.ts
bun scripts/verify-anvil-e2e.tscd app
bun install
cp env.example .env
bun test
bunx tsc --noEmit
bun run devcd workers
bun install
cp env.example .env
bun test
bunx tsc --noEmit
bun run src/index.ts --mode=watcher --oncecd agenticmarket
bun install
cp env.example .env.local
bun test
bun run lint
bun run build
bun run devcd docs-site
bun install
cp env.example .env.local
bunx tsc --noEmit
bun run build
bun run devAutomated Full-Stack Smoke Test
To run the same end-to-end Anvil + INV-1 + API + Storefront smoke test used in GitHub Actions CI:
bun scripts/dev-local.ts --smoke-test