Local development
The whole stack runs in Docker. You can also run a single frontend against the dockerised backend.
1. Install
corepack enable && corepack prepare [email protected] --activate
git clone <repo> axon-mvp && cd axon-mvp
pnpm install
2. Configure
Copy the env template and fill what you need:
cp .env.example .env # if present; otherwise see docs/TENANT_VALUES_TEMPLATE.env
Most partner integrations have sandbox defaults or fail closed when unset. The values you'll usually want locally:
| Key | Why |
|---|---|
DATABASE_URL |
Postgres (the compose default points at the postgres container) |
JWT_SECRET, AXON_SERVICE_TOKEN |
Auth between gateway/services |
NEXT_PUBLIC_PRIVY_APP_ID, PRIVY_APP_ID, PRIVY_APP_SECRET |
Wallets/auth — required |
NEXT_PUBLIC_RPC_URL, ESCROW_CONTRACT_ADDRESS |
Base Sepolia + escrow |
SUMSUB_APP_TOKEN, SUMSUB_SECRET_KEY |
KYC (sandbox) |
AI_PROVIDER=openai, OPENAI_API_KEY, AI_MODEL=gpt-4o |
AI |
USDC_IS_MOCK=true, USDC_TREASURY_PRIVATE_KEY |
Testnet MockUSDC + auto‑funding |
COLLECTION_WALLET_ADDRESS, COLLECTION_WALLET_PRIVATE_KEY |
Instant‑funding sweeps |
3. Bring up the backend
pnpm docker:up # docker compose up -d (postgres, redis, db-migrate, all services, gateway)
docker compose logs -f api-gateway
db-migrate runs prisma migrate deploy once and exits — that's expected. The gateway listens on 3000; services have no published ports (gateway‑only by design).
4. Run a frontend
pnpm --filter web dev # Next.js on http://localhost:4300
pnpm --filter admin dev # Admin on http://localhost:4200
Point the web app's NEXT_PUBLIC_API_URL at the gateway (http://localhost:3000).
Ports
| Service | Port |
|---|---|
| Web | 4300 |
| Admin | 4200 |
| API gateway | 3000 |
| Backend services | 3001–3012 (internal only) |
| Postgres | 5432 (localhost‑bound) |
| Redis | 6379 (localhost‑bound) |
Common commands
pnpm build # turbo build (packages first)
pnpm --filter <app> typecheck # type-check one app
pnpm --filter "./packages/*" build # build shared packages (regenerates Prisma client)
pnpm docker:down # tear down
# Prisma (run from packages/db, the CLI isn't hoisted to root):
cd packages/db && node_modules/.bin/prisma migrate dev --name <change>
cd packages/db && node_modules/.bin/prisma studio
Tips & gotchas
- If a wagmi hook throws "Cannot read properties of undefined",
NEXT_PUBLIC_PRIVY_APP_IDis missing. - Regenerate the Prisma client (
pnpm --filter "./packages/*" build) after editing the schema. - The legacy
shell/mfe-*apps are not in the default build — ignore them unless you set thelegacy-mfecompose profile. - To get test USDC, onboarding auto‑funds new wallets with MockUSDC + a little ETH on testnet (
USDC_IS_MOCK=true); keep the treasury wallet topped up from a Base Sepolia faucet.