Express + TypeScript API for the Fluxora treasury streaming protocol. Provides REST endpoints for streams, health checks, and (later) Horizon sync and analytics.
- API Gateway — REST API for stream CRUD and health
- Streams API — List, get, and create stream records (in-memory placeholder; will be replaced by PostgreSQL + Horizon listener)
- Ready to extend with JWT, RBAC, rate limiting, and streaming engine
- Node.js 18+
- TypeScript
- Express
- Node.js 18+
- npm or pnpm
npm install
npm run devAPI runs at http://localhost:3000.
npm run dev— Run with tsx watch (no build)npm run build— Compile todist/npm start— Run compileddist/index.js
| Method | Path | Description |
|---|---|---|
| GET | / |
API info |
| GET | /health |
Health check |
| GET | /api/streams |
List streams |
| GET | /api/streams/:id |
Get one stream |
| POST | /api/streams |
Create stream (body: sender, recipient, depositAmount, ratePerSecond, startTime) |
All responses are JSON. Stream data is in-memory until you add PostgreSQL.
src/
routes/ # health, streams
index.ts # Express app and server
Optional:
PORT— Server port (default: 3000)
Later you can add DATABASE_URL, REDIS_URL, HORIZON_URL, JWT_SECRET, etc.
- fluxora-frontend — Dashboard and recipient UI
- fluxora-contracts — Soroban smart contracts
Each is a separate Git repository.