This README only covers how to run the project locally.
webapp/- Vite + React frontend package
- frontend env file lives at
webapp/.env
server/- Node API package
- source files live in
server/src/ - Docker files live in
server/ - backend env file lives at
server/.env
- Node.js 20+
- npm
- A MongoDB instance for the API
- A browser wallet supported by WalletConnect or an injected wallet
- Optional but required for full social linking:
- a Discord OAuth application
- a GitHub OAuth application
- a Telegram app and bot
- a public X/Twitter account for tweet-based verification
- Web app:
http://localhost:5173 - API:
http://localhost:3001 - MongoDB in the local Docker stack:
mongodb://localhost:27017
There are two example env files in the repo:
webapp/.env.exampleserver/.env.example
Use them like this:
webapp/.env- used by the Vite web app when you run
npm run devinsidewebapp/
- used by the Vite web app when you run
server/.env- used by the Node API when you run
npm run devornpm run startinsideserver/
- used by the Node API when you run
Create webapp/.env with the values from webapp/.env.example.
Required values:
VITE_API_BASE_URL- use
http://localhost:3001
- use
VITE_TARGET_CHAIN_IDVITE_TARGET_CHAIN_NAMEVITE_TARGET_CHAIN_RPC_URLVITE_TARGET_CHAIN_BLOCK_EXPLORER_URLVITE_TARGET_CHAIN_NATIVE_CURRENCY_NAMEVITE_TARGET_CHAIN_NATIVE_CURRENCY_SYMBOLVITE_TARGET_CHAIN_NATIVE_CURRENCY_DECIMALSVITE_WALLETCONNECT_PROJECT_ID
Note:
- The frontend no longer fetches user process stats from the chain.
- The frontend does not need the process registry address or start block anymore.
VITE_TARGET_CHAIN_RPC_URLis still used by the wallet/network client setup in the browser.- If you want to protect a private RPC, put that private endpoint in
ONCHAIN_RPC_URLon the backend and use a public RPC inVITE_TARGET_CHAIN_RPC_URL.
Create server/.env with the values from server/.env.example.
Required values:
APP_SESSION_SECRETMONGODB_URI- use
mongodb://mongo:27017/quests_dashboardwhen the API runs inside Docker Compose - use
mongodb://localhost:27017/quests_dashboardwhen the API runs locally and only Mongo runs in Docker
- use
MONGODB_DB_NAMEONCHAIN_PROCESS_REGISTRY_ADDRESSONCHAIN_PROCESS_REGISTRY_START_BLOCKONCHAIN_RPC_URLSEQUENCER_API_URLQUESTS_FILE_PATH- optional override for the quest catalog JSON file
- default local value can stay
./quests.json - if you run the API in Docker, keep the file inside
server/so the image copies it
PROVIDER_TOKEN_ENCRYPTION_SECRETFRONTEND_APP_URL- use
http://localhost:5173
- use
PORT- use
3001
- use
TRAEFIK_API_DOMAIN- Docker production hostname used by the Traefik router rule
- example:
quests-api.davinci.ninja
Discord values:
DISCORD_CLIENT_IDDISCORD_CLIENT_SECRETDISCORD_BOT_TOKEN- optional, only needed to enable Discord channel message counting
DISCORD_GUILD_IDDISCORD_TARGET_CHANNEL_IDDISCORD_REDIRECT_URI- use
http://localhost:3001/api/connections/discord/callback
- use
Sequencer values:
SEQUENCER_API_URL- use the DaVinci sequencer base URL for your environment
GitHub values:
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRETGITHUB_REDIRECT_URI- use
http://localhost:3001/api/connections/github/callback
- use
GITHUB_TARGET_ORGANIZATION- example:
vocdoni
- example:
GITHUB_TARGET_REPOSITORIES- comma-separated
owner/repositorylist - example:
vocdoni/davinciNode,vocdoni/davinciSDK
- comma-separated
Telegram values:
TELEGRAM_APP_JWT_SECRETTELEGRAM_BOT_TOKENTELEGRAM_CHANNEL_USERNAMETELEGRAM_CLIENT_IDTELEGRAM_CLIENT_SECRETTELEGRAM_REDIRECT_URI- use
http://localhost:3001/api/connections/telegram/callback
- use
If you want Discord, GitHub, Telegram, and Twitter linking to actually work locally, configure the provider apps with these callback URLs:
- Discord redirect URI:
http://localhost:3001/api/connections/discord/callback
- GitHub redirect URI:
http://localhost:3001/api/connections/github/callback
- Telegram redirect URI:
http://localhost:3001/api/connections/telegram/callback
If you leave the example placeholder values in place, the app and API can still boot, but Discord, GitHub, and Telegram login/linking will fail until real credentials are configured.
Twitter does not require any extra env vars or an OAuth application in this version. The API verifies a public proof tweet through X's oEmbed endpoint.
This is the best path if you want the fastest edit-refresh loop and hot reloading.
cd server && npm install
cd ../webapp && npm installCreate:
webapp/.envserver/.env
For this setup, make sure your backend env points to Mongo on your host:
MONGODB_URI=mongodb://localhost:27017/quests_dashboard
MONGODB_DB_NAME=quests_dashboarddocker compose -f server/docker-compose.yml --profile local up -d mongoMongo will be available at:
mongodb://localhost:27017/quests_dashboard
cd server && npm run devThe API will be available at:
http://localhost:3001- health check:
http://localhost:3001/health
In a second terminal:
cd webapp && npm run devOpen:
http://localhost:5173
docker compose -f server/docker-compose.yml --profile local stop mongoUse this if you already have Mongo available outside Docker.
cd server && npm install
cd ../webapp && npm installCreate:
webapp/.envserver/.env
Use the example files as the source of truth.
Run MongoDB however you prefer locally.
Examples:
- a local MongoDB service already installed on your machine
- a hosted MongoDB instance
- a one-off local Docker container
If you use a local Mongo container or local Mongo service, point MONGODB_URI in server/.env to that instance.
Example:
MONGODB_URI=mongodb://localhost:27017/quests_dashboard
MONGODB_DB_NAME=quests_dashboard
ONCHAIN_PROCESS_REGISTRY_ADDRESS=0x0000000000000000000000000000000000000000
ONCHAIN_PROCESS_REGISTRY_START_BLOCK=0
ONCHAIN_RPC_URL=https://eth.llamarpc.comcd server && npm run devThe API will be available at:
http://localhost:3001- health check:
http://localhost:3001/health
In a second terminal:
cd webapp && npm run devOpen:
http://localhost:5173
Once both processes are running:
- Connect your wallet.
- Sign in with the wallet.
- Connect Discord, GitHub, and Telegram if you configured real provider credentials.
- Connect Twitter by generating a proof code, posting it in a tweet, and pasting the tweet URL back into the app.
- Verify the linked identity statuses and live stats load.
Use this if you want to run the server inside Docker while keeping the web app local.
Create:
server/.env
Docker Compose loads server/.env into the api service with env_file.
For a local Mongo container:
docker compose -f server/docker-compose.yml --profile local up -d mongodocker compose --env-file server/.env -f server/docker-compose.yml --profile prod up --build apicd webapp && npm run devdocker compose -f server/docker-compose.yml --profile prod down
docker compose -f server/docker-compose.yml --profile local stop mongoRun tests:
cd server && npm test
cd ../webapp && npm testRun lint:
cd webapp && npm run lintBuild the web app:
cd webapp && npm run buildValidate the Compose file:
docker compose --env-file server/.env -f server/docker-compose.yml --profile local configCheck:
- the API is running on
http://localhost:3001 VITE_API_BASE_URLmatches the API URLFRONTEND_APP_URLmatches the real browser origin
Check:
- the provider client credentials are real
- the redirect URIs exactly match the local callback URLs
- the API is reachable publicly by your browser at
http://localhost:3001
Check:
MONGODB_URIMONGODB_DB_NAME- that the Mongo instance is reachable from wherever the API is running
That usually means the stack is healthy but still using placeholder provider values. Add real Discord, GitHub, and Telegram credentials to server/.env and restart the stack.