Skip to main content

Environments

Clutch Protocol can run locally via Docker or on the public stage deployment.

Local development

Start the full stack with clutch-deploy:

git clone https://github.com/clutchprotocol/clutch-deploy.git
cd clutch-deploy
cp .env.example .env
docker compose up -d
ServiceURL
Hub APIhttp://localhost:3000
API healthhttp://localhost:3000/health
GraphQLhttp://localhost:3000/graphql
Demo apphttp://localhost:5173
Explorer UIhttp://localhost:5174
Explorer APIhttp://localhost:8088
Node 1 WSws://localhost:8081/ws
Grafanahttp://localhost:3030
Seq logshttp://localhost:5341

SDK connection:

const sdk = new ClutchHubSdk('http://localhost:3000', publicKey);

Demo app (standalone clone):

git clone https://github.com/clutchprotocol/clutch-hub-demo-app.git
cd clutch-hub-demo-app
npm install
VITE_API_URL=http://localhost:3000 npm run dev

Stage (public testnet)

The stage deployment uses Cloudflare and nginx in front of the stack:

ServiceURL
Demo apphttps://app-stage.clutchprotocol.io
Hub APIhttps://api-stage.clutchprotocol.io
Node 1wss://node1-stage.clutchprotocol.io/ws
Node 2wss://node2-stage.clutchprotocol.io/ws
Node 3wss://node3-stage.clutchprotocol.io/ws

SDK connection:

const sdk = new ClutchHubSdk('https://api-stage.clutchprotocol.io', publicKey);

The demo app auto-detects stage URLs: when served from app-stage.clutchprotocol.io, it uses api-stage.clutchprotocol.io automatically.

Production demo

ServiceURL
Marketing sitehttps://clutchprotocol.io
Documentationhttps://docs.clutchprotocol.io
Demo apphttps://demo.clutchprotocol.io
Alpha

Stage and demo environments are for testing. APIs and endpoints may change.

Environment variables

Hub API

Loaded from config/{env}.toml with APP_ prefix overrides. Key settings:

SettingDefault (local)Description
ws_addr0.0.0.0:3000HTTP bind address
clutch_node_ws_urlws://127.0.0.1:8081/wsNode WebSocket
faucet_enabledtrue (deploy)Enable /faucet
jwt_secretJWT signing secret

See API Configuration.

Demo app

VariableDescription
VITE_API_URLHub API base URL
VITE_PUBLIC_NODE_ENDPOINTSComma-separated node WS URLs for network info tab

Explorer

VariableDescription
VITE_EXPLORER_API_URLExplorer backend URL (default http://localhost:8088)

Faucet

On test networks, fund wallets before creating ride requests:

await sdk.requestFaucet(publicKey);

Requires faucet_enabled = true and a funded faucet account on the server. See Faucet.

Choosing an environment

Use caseEnvironment
Local developmentDocker compose on localhost
Integration testingStage URLs
Learning / demoStage demo app or local stack
Block explorerLocal :5174 or deploy with compose