Skip to content
Skip to Content
Developers

Run it

One repository, one Dockerfile with two targets, and the settings each part needs.

Layout

Dockerfile

Local

pnpm install
pnpm dev          # web on :3010 (builds the AI card first)
pnpm dev:worker   # the worker, reading .env.local
pnpm test         # vitest: the state machine, provider outcome maps, request ids
pnpm contracts:test

Docker and Coolify

One image recipe, two targets: web (the Next.js standalone server, health at /api/health) and worker (the bundled worker, healthy while its heartbeat is fresh). Each environment (staging, production) runs a web app, a worker and its own Postgres. Deploy the worker first: it runs the migrations.

Settings

GroupNames
Build (public)NEXT_PUBLIC_APP_ENV, NEXT_PUBLIC_APP_URL, NEXT_PUBLIC_QIE_NETWORK, NEXT_PUBLIC_ESCROW_ADDRESS, NEXT_PUBLIC_TELEGRAM_BOT
DatabaseDATABASE_URL
ChainQIE_NETWORK, ESCROW_ADDRESS, ESCROW_DEPLOY_BLOCK, NGN_FEED_ADDRESS
KeysQUOTE_SIGNER_KEY (web), OPERATOR_KEY, FEED_KEY, REWARDS_KEY (worker)
SecretsSESSION_SECRET, PII_ENC_KEY
ProvidersVTPASS_ENV, VTPASS_API_KEY, VTPASS_PUBLIC_KEY, VTPASS_SECRET_KEY; the FONBNK_* keys
OptionalOPS_WALLETS, DEMO_LINE, TELEGRAM_BOT_TOKEN

Secrets live only in the server's runtime settings, never in the repository.

Contracts

contracts/script/Deploy.s.sol deploys the escrow (limits: 100 QUSDC an order, 2,000 a payment, 5,000 a pot, 20 lines; RECLAIM_DELAY_SECONDS from the environment; a one-day delay on handing over the admin role) and the NGN/USD feed, and refuses any chain but 1990. They will be verified on QIE's Blockscout (--verifier blockscout --verifier-url https://mainnet.qie.digital/api/).

On this page