API gateway and server for LiquiFact — the global invoice liquidity network on Stellar. This repo provides the Express-based REST API for invoice uploads, escrow state, and (future) Stellar/Horizon integration.
Part of the LiquiFact stack: frontend (Next.js) | backend (this repo) | contracts (Soroban).
- Node.js 20+ (LTS recommended)
- npm 9+
-
Clone the repo
git clone <this-repo-url> cd liquifact-backend
-
Install dependencies
npm ci
-
Configure environment (optional for local dev)
cp .env.example .env # Edit .env if you need Stellar/Horizon/DB settings
| Command | Description |
|---|---|
npm run dev |
Start API with watch mode |
npm run start |
Start API (production-style) |
npm run lint |
Run ESLint on src/ |
Default port: 3001. After starting:
- Health: http://localhost:3001/health
- API info: http://localhost:3001/api
liquifact-backend/
├── src/
│ └── index.js # Express app, routes (health, invoices, escrow)
├── .env.example # Env template (PORT, Stellar, DB placeholders)
├── eslint.config.js
└── package.json
GitHub Actions runs on every push and pull request to main:
- Lint —
npm run lint - Build check —
node --check src/index.js(syntax)
Ensure your branch passes these before opening a PR.
- Fork the repo and clone your fork.
- Create a branch from
main:git checkout -b feature/your-featureorfix/your-fix. - Setup locally:
npm ci, optionallycp .env.example .env. - Make changes. Keep the style consistent:
- Run
npm run lintand fix any issues. - Use the existing Express/route patterns in
src/index.js.
- Run
- Commit with clear messages (e.g.
feat: add X,fix: Y). - Push to your fork and open a Pull Request to
main. - Wait for CI to pass and address any review feedback.
We welcome docs improvements, bug fixes, and new API endpoints aligned with the LiquiFact product (invoices, escrow, Stellar integration).
MIT (see root LiquiFact project for full license).