RaidzATTENTION, WITH PROOF.

Local development

Raidz is an npm monorepo with four workspaces and an isolated Docker runtime.

Requirements

  • Node.js >=22.13.0 <23
  • npm
  • Docker Engine and Compose plugin
  • GNU-compatible shell for the documented operator commands

Install and run

npm install
npm run dev

The domain package builds first because the API imports @raidz/domain. The development command then starts Next.js and Fastify concurrently.

Workspace scripts

CommandPurpose
npm run devBuild domain, then start web and API development servers
npm run lintRun every workspace lint script
npm run typecheckBuild domain and type-check workspaces
npm testBuild domain and run workspace tests
npm run buildProduction-build domain, API, bot, and web
npm run checkLint, type-check, test, and build
npm run contracts:testBuild isolated Foundry image and run contract tests
npm run security:checkRun project security checks
npm run brand:exportExport generated brand artifacts

Environment

Copy .env.example only for public, non-secret configuration. The important values are:

VariableMeaning
NEXT_PUBLIC_APP_URLBrowser-visible application URL
API_INTERNAL_URLServer-side web-to-API URL
NEXT_PUBLIC_ROBINHOOD_CHAIN_IDBrowser network, currently 4663
NEXT_PUBLIC_REOWN_PROJECT_IDPublic Reown project identifier; injected at web build time
NEXT_PUBLIC_RAIDZ_TOKEN_ADDRESSMust stay empty until verified deployment
NEXT_PUBLIC_PONS_FACTORY_ADDRESSMust be populated from a current verified source
DATABASE_URLPostgreSQL connection for identity and future marketplace state
REDIS_URLRedis connection; deployed but not yet used by current API code

OAuth secrets, bot credentials, verifier keys, and wallet material must not enter .env, Compose output, source, test snapshots, or logs. Production uses *_FILE variables and read-only mounts.

Docker topology

docker compose -p raidz up --build
docker compose -p raidz ps
docker compose -p raidz logs --tail=200 web api

The base stack starts web, API, PostgreSQL, and Redis. analytics adds ClickHouse. integrations adds the Telegram bot. Resources are project-named and labeled owner=incubator-node and project=raidz.

Tests and fixtures

Web missions and creators in apps/web/components/data.ts are intentional fixtures and must remain labeled. API tests can inject an IdentityStore test double and disable migration. Contract tests run against local test tokens and addresses only.

Before submitting a change, run:

npm run check
npm run contracts:test
docker compose -p raidz config --quiet

If a change touches public copy, confirm pre-launch labels. If it touches economics or signatures, update domain tests, Solidity tests, and these docs together.

Contract-test dependency layout

contracts/Dockerfile.test copies node_modules/@openzeppelin/contracts into its Foundry image. The canonical clean install uses the tracked npm lockfile and materializes that path. A pnpm-style symlink whose target is excluded from the Docker build context can produce COPY failed; in that case, use the repository's documented npm install path in a clean dependency tree or update the container build deliberately rather than weakening .dockerignore broadly.