Paid workflow gateway API: x402-style payment verification on Base (USDC), settlement, and KeeperHub workflow execution. Built with Express, TypeScript, and Node 20+.
cp .env.example .env
# Edit .env — at minimum set X402_RECEIVING_ADDRESS and BASE_SETTLEMENT_PRIVATE_KEY for full execute flow.
npm ci
npm run devThe server listens on PORT (default 3001). See .env.example for all variables.
| Command | Description |
|---|---|
npm run dev |
Run with tsx watch (hot reload) |
npm run lint |
ESLint, type-aware (tsconfig.eslint.json) |
npm run build |
Compile TypeScript to dist/ |
npm start |
Run compiled dist/index.js |
npm test |
Run Vitest (HTTP tests via supertest) |
npm run test:watch |
Vitest watch mode |
| Method | Path | Notes |
|---|---|---|
GET |
/health |
Liveness JSON |
GET |
/health/ready |
Readiness metadata (checks for key env) |
GET |
/workflows |
Listed workflow definitions |
POST |
/workflows/:workflowId/execute |
Validates body, x402 payment, settlement, KeeperHub call |
Full request/response notes: docs/api-contract.md. Optional WORKFLOW_RATE_LIMIT_PER_MINUTE env applies a per-IP limit to POST /workflows/.../execute only.
Implementation lives under src/ (server.ts, routes/, services/).
npm run lint uses ESLint 9 flat config (eslint.config.mjs) with typescript-eslint recommendedTypeChecked, backed by tsconfig.eslint.json (includes src/, test/, and vitest.config.ts). Production tsc still uses tsconfig.json (src/ only).
Hosted deployment guides (Docker, Ubuntu, AWS App Runner) live in docs/ — start with the deployment index.
Pull requests and pushes to main run npm ci, npm run lint, npm run build, and npm test via .github/workflows/ci.yml.
- lendpay-app — repay wizard UI
- lendpay-gateway-algorand-dorkfi — on-chain execution path
- lendpay-index — repo map (
docs/cross-repo.md)