Skip to content

Agentpay-Org/Agentpay-backend

Repository files navigation

AgentPay Backend

API gateway, metering, and billing backend for the AgentPay protocol (machine-to-machine payments on Stellar).

Overview

  • Stack: Node.js, Express, TypeScript
  • Endpoints: Health check, version, and placeholders for usage/billing APIs

Prerequisites

  • Node.js 18.18+
  • npm

Setup for contributors

  1. Clone the repo (or add remote and pull):

    git clone <repo-url> && cd agentpay-backend
  2. Install dependencies:

    npm install
  3. Verify setup:

    npm run build
    npm test
  4. Run locally:

    npm run dev

    Server runs at http://localhost:3001. Try GET /health and GET /api/v1/version.

Project structure

agentpay-backend/
├── src/
│   ├── index.ts          # Express app and routes
│   └── health.test.ts    # Tests
├── package.json
├── tsconfig.json
└── .github/workflows/
    └── ci.yml            # CI: build, test

Commands

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

CI/CD

On push/PR to main, GitHub Actions runs:

  • npm ci
  • npm run lint
  • npm run build
  • npm test

Contributing

  1. Fork the repo and create a branch.
  2. Make changes; ensure npm run lint, npm run build, and npm test pass.
  3. Open a pull request. CI must pass before merge.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors