Backend

evergreenLast update on Sep 1, 2026
Download .md

Backend

Target backend: Spring Boot service with PostgreSQL, Flyway, security, and contract verification.

Responsibilities

  • Enforce authentication and authorization.
  • Validate API requests.
  • Apply domain rules in transactions.
  • Own database migrations.
  • Ingest append-only asset events idempotently.
  • Expose read models for web and mobile.
  • Emit audit records for sensitive operations.

Target Stack

ConcernChoice
RuntimeJava LTS
FrameworkSpring Boot
DatabasePostgreSQL
MigrationsFlyway
Integration testsTestcontainers
API contractOpenAPI
ObservabilityActuator, structured logs, trace IDs

Package Shape

apps/backend/src/main/java/.../
├── asset/
├── auth/
├── custody/
├── maintenance/
├── document/
├── finance/
├── compliance/
└── shared/

Prefer business modules over technical-only folders.

Build Targets

Planned commands:

./gradlew test
./gradlew bootRun
./gradlew bootBuildImage

Required Tests

  • Domain unit tests.
  • Repository integration tests with Testcontainers.
  • REST validation and contract tests.
  • Authorization tests for every protected endpoint.
  • Migration tests against realistic data.

Security Notes

  • Never expose JPA entities as API responses.
  • Never log passwords, tokens, or secrets.
  • Configure CORS only for known web origins.
  • Use narrow database privileges in staging and production.