Thanks for your interest in improving the backend for Astroid — the Financial Operating System for autonomous AI agents on Stellar. We develop in the open and welcome issues, discussion, and pull requests.
git clone https://github.com/ASTROIDX556/astroid-api.git
cd astroid-api
npm install
cp .env.example .env # fill in your database and API keys
npx prisma generate # generate the Prisma client
npm run start:dev # start the NestJS dev server
npm run typecheck # strict TypeScript checking
npm run test # run the vitest suitesThe backend is a NestJS modular monolith using TypeScript, Prisma, PostgreSQL, Redis, and BullMQ. Every module is isolated so it can later become its own microservice.
- Strict TypeScript.
strictis on andanyis banned. Prefer generics and precise types. - Module conventions. Every module follows the same structure: controller, service, repository, DTOs, entity, events, validators, types, tests. Consistency is mandatory.
- Thin controllers. Controllers validate input and delegate to services. Business logic lives in services; persistence in repositories.
- Conventional Commits.
feat:,fix:,docs:,test:,refactor:,chore:, etc. - Tests are required for new behaviour. Unit tests use vitest. Never call external services in unit tests.
- Audit trail. Every important action must be logged to the audit module.
npm run typecheck && npm run lint && npm run testall pass.- Database schema changes include a Prisma migration.
- New endpoints are documented with OpenAPI/Swagger decorators.
- Cross-repo contracts (response envelope, entity/enum names) still match
astroid-webandastroid-sdk.
main is always releasable. Use feature/* and fix/* branches and open PRs
against main. See the PRD (Document 3) for the full branching model.
By contributing you agree that your contributions are licensed under the MIT License.