API gateway, metering, and billing backend for the AgentPay protocol (machine-to-machine payments on Stellar).
- Stack: Node.js, Express, TypeScript
- Endpoints: Health check, version, and placeholders for usage/billing APIs
- Node.js 18.18+
- npm
-
Clone the repo (or add remote and pull):
git clone <repo-url> && cd agentpay-backend
-
Install dependencies:
npm install
-
Verify setup:
npm run build npm test -
Run locally:
npm run dev
Server runs at
http://localhost:3001. TryGET /healthandGET /api/v1/version.
agentpay-backend/
├── src/
│ ├── index.ts # Express app and routes
│ └── health.test.ts # Tests
├── package.json
├── tsconfig.json
└── .github/workflows/
└── ci.yml # CI: build, test
| Command | Description |
|---|---|
npm run build |
Compile TypeScript to dist/ |
npm run lint |
Run ESLint over TypeScript source and tests |
npm run format |
Check formatting with Prettier |
npm test |
Build and run tests |
npm run dev |
Run with ts-node |
npm start |
Run production build |
On push/PR to main, GitHub Actions runs:
npm cinpm run lintnpm run buildnpm test
- Fork the repo and create a branch.
- Make changes; ensure
npm run lint,npm run build, andnpm testpass. - Open a pull request. CI must pass before merge.
MIT