Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.1 KB

File metadata and controls

42 lines (30 loc) · 1.1 KB

Backend Contribution Guide

This guide covers app-specific standards for apps/backend. The backend integrates with Stellar/Soroban. For migration details, see Stellar Migration Notes.

Setup

cd apps/backend
npm install

Daily Commands

# Lint and auto-fix
npm run lint

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Run in watch mode
npm run start:dev

Standards

  • Follow NestJS module boundaries and keep business logic in services.
  • Validate DTOs and keep API contracts explicit.
  • Add tests for behavior changes and bug fixes.
  • Keep migrations and schema-related changes coordinated.

Done for Backend Changes

  • npm run lint passes.
  • npm run test passes (and npm run test:e2e when endpoints change).
  • API-facing changes include DTO/docs updates.
  • Relevant docs are updated.
  • Security-facing API changes keep the standardized error contract aligned with { code, message, details, requestId }.
  • Public endpoint changes document any rate-limit env vars and include throttling or validation coverage when behavior changes.