Skip to content

Repository files navigation

ArdaLink API

Voice, intelligence pipeline, ground-truth capture

ArdaLink API is the request-facing service: it composes voice calls, runs the drought intelligence pipeline, captures herder ground truth, and serves data APIs to the operator dashboard and public Talk app.

Node TypeScript Express pnpm License


Quickstart

# Requires Node 24 and pnpm 9
pnpm install
cp .env.example .env       # edit with your credentials
pnpm run dev               # starts Express on :3000

curl http://localhost:3000/api/healthz

Open http://localhost:3000/api/docs for the interactive API.


What this service does

Capability Endpoint
Intelligence pipeline (NDVI delta → call decision) POST /api/trigger-check
Current drought status snapshot GET /api/status
Voice call bridge (phone) WS /api/voice-stream
Voice call bridge (browser) WS /api/browser-voice-stream
Africa's Talking callback (returns <Stream>) POST /api/voice-callback
One-shot call token POST /api/call-tokens
Ground truth reports GET /api/ground-truth/recent
Pastoralist directory CRUD `GET
Health probe GET /api/healthz

Full route list: docs/02-API.md.


Repository layout

ardalink-api/
├── src/
│   ├── index.ts            # Express bootstrap
│   ├── app.ts              # middleware chain
│   ├── routes/             # intelligence, voice, ground-truth, …
│   ├── lib/                # openai, satellite, climate, memory, …
│   └── middlewares/        # auth, rate limit, origin guard
├── lib/
│   ├── api-spec/           # canonical OpenAPI (single source of truth)
│   ├── api-zod/            # generated Zod schemas
│   ├── api-client-react/   # generated React Query hooks (consumed by ardalink-web)
│   └── db/                 # Drizzle ORM (PostgreSQL public schema)
├── tests/                  # vitest (unit + integration + contract)
├── docs/                   # 8-doc CTO navigation
├── Dockerfile
└── package.json

Documentation

Start with docs/00-EXECUTIVE-INDEX.md (5 min).


Sister repos


License

Proprietary — all rights reserved. Contact the maintainer before any reuse or distribution.

About

Request-facing voice and intelligence API for ArdaLink: drought checks, pastoralist ground truth, Africas Talking call flows, browser voice, and contract-first OpenAPI services.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages