Prerequisites
Use Node.js 24 or later, pnpm 10.33.0, Foundry 1.5.1, and PostgreSQL 16. Docker is convenient for the database. Use a disposable local wallet and database for development.1. Clone and install
2. Start PostgreSQL
docker start spoke-postgres rather than creating a duplicate.
3. Create local environment files
NEXT_PUBLIC_* variables.
4. Start Anvil
Run in its own terminal:8545 with chain ID 31337.
5. Deploy the local contracts
In a second terminal, privately setDEPLOYER_PRIVATE_KEY to a funded, disposable Anvil account, then run:
PROTOCOL_ADDRESS and TOKEN_ADDRESS, and the web application’s NEXT_PUBLIC_PROTOCOL_ADDRESS and NEXT_PUBLIC_DEMO_TOKEN_ADDRESS.
6. Run the application
http://localhost:3040. The API listens at http://localhost:8740; routes use the /v1 prefix. API startup runs its migrations against the configured database.
Configuration that must agree
The default local database URL uses
127.0.0.1:54332/spoke. The default local indexer mode is direct_rpc; the production deployment uses Envio ingestion and verified projection.