| description | Get the monorepo running locally in a few minutes. |
|---|
- Node 18+ (Node 20 recommended — CI runs 20).
- A funded Stellar testnet account — friendbot funds one for free.
- Deployed contract ids from
danfo-contracts/scripts/deploy.sh— see Deployment. - Optional: Freighter for the wallet flows, Python 3.10+ for the speech service.
git clone https://github.com/OGRoute/Danfo-AI.git
cd Danfo-AI
npm install # npm workspaces — installs all packages
cp apps/web/.env.example apps/web/.env.local # fill in contract ids + inference endpoint
npm run dev # web app on :3000Open http://localhost:3000. Tap ⭐ for the corrections feed, the mic to talk.
Optional but recommended — run the feed and crank alongside it:
REGISTRY_CONTRACT=C... REWARDS_CONTRACT=C... INDEXER_SECRET_KEY=S... \
npm run dev:indexer # REST API on :8787Run from the repo root:
| Command | Does |
|---|---|
npm run dev |
Web app dev server (apps/web) |
npm run dev:indexer |
Indexer with watch reload |
npm run build |
Production build of the web app |
npm run start |
Serve the production build |
npm run lint |
ESLint on the web app |
npm run typecheck |
tsc --noEmit across every workspace |
Workspaces: apps/web, packages/sdk, indexer. The speech service is Python
and lives outside the npm workspace set.
The app is built to degrade rather than break, and CI enforces it — the web build must succeed with no secrets set. Concretely:
| Missing | Effect |
|---|---|
| Contract ids | Corrections panel shows "Stellar contract not configured"; chat and map still work |
INFERENCE_* |
Chat answers fail; feed and map still work |
YARNGPT_API_URL |
Voice output unavailable; text chat unaffected |
| Indexer | Feed falls back to direct chain reads (slower, same data) |
So you can start with just npm install && npm run dev, see the UI, and add
configuration as you need each feature.
npm run typecheck && npm run lint && npm run buildThose are the three CI gates, plus a gitleaks secret scan. See Contributing.
- Environment variables — every var, what happens without it
- @danfo/sdk — the contract client
- Indexer API — REST endpoints and the crank
- Web app — routes, components, API handlers