Quickstart
Run the Pluto app against the mock API on your machine. About 3 minutes.

- 1Live quotes from the mock API
- 2A real route: 70% Uniswap v4, 30% V3 fork
- 3A dev wallet that signs but never broadcasts
Run it
Browserlocalhost:3000
Pluto appbun run dev
NEXT_PUBLIC_API_URL
Mock API127.0.0.1:4010
openapi.yamlsrc/lib/api/
Mock API
$ bunx @stoplight/prism-cli mock src/lib/api/openapi.yaml -p 4010Pluto app
$ bun run devAnswers are fixed examples from the spec
Start the mock API
The mock serves src/lib/api/openapi.yaml on port 4010.
bunx @stoplight/prism-cli mock src/lib/api/openapi.yaml -p 4010Have the backend repo?
cd pluto-be/api && npm i && npm run mock serves the same contract.Install and configure
# NEXT_PUBLIC_API_URL=http://127.0.0.1:4010
cp .env.example .env.local
bun installStart the app
# http://localhost:3000 → /swap
bun run devEnv vars
The app reads two variables. Everything else (chain, contracts, limits, feature flags) comes from GET /config.
.env.local
- NEXT_PUBLIC_API_URLrequired
- NEXT_PUBLIC_WC_PROJECT_IDoptional
GET /config
Everything else, at runtime
Chain · 99901Contracts · 7Limits · default 0.5% · max 50%Feature flags · 4
Source: .env.example · GET /config
Dev-only tools

- 1Mock API variants: one menu per endpoint
- 2Pick an error, an approval step or a relay state
- 3Dev wallet: reject the next request, or start on the wrong network
- 4The Mock QA button, bottom left in dev builds
Mock QA and the dev wallet are left out of production builds.
Check your work
- 1Types
bun run typecheckAPI drift, wrong props - 2Lint
bun run lintHook misuse, dead code - 3Format
bun run format:checkStyle noise in diffs - 4Unit tests
bun run testBroken maths and rules - 5Build
bun run buildBroken pages and MDX
Source: package.json → scripts
bun run typecheck && bun run lint && bun run format:check && bun test && bun run build