Skip to main content

Core (Backend)

Tech stack: Java 21, Spring Boot 4.0.3, GraphQL (schema-first), PostgreSQL, Keycloak 26.5.5, Liquibase, MapStruct, Envers.

Package root: com.axvero.ams.core

Commands

  • Build: ./mvnw clean package
  • Validate: ./mvnw compile (tests are not working — do not run them)
  • Dev server: ./run.sh (prod-like), ./run-debug.sh (JDWP 5005)
  • DB: ams-deploy/docker-compose-local.yml — port 5433, db: core
  • Profiles: src/main/resources/application-*.yaml

Database migrations

  • Liquibase is active — every new table or column change requires a changelog file
  • Add src/main/resources/db/changelog/NNNN-description.sql (next sequential number)
  • Register it in db/changelog/db.changelog-master.yaml under databaseChangeLog
  • Use --liquibase formatted sql + --changeset author:id header format (see existing files for pattern)

Hard constraints

  • Do NOT inject CurrentUserContext into services — resolve currentUserId in the controller and pass it as a method parameter
  • BaseEntity uses InheritanceType.JOINED and is extended by User, Organization, Team, Workspace — do NOT dissolve it; that is a dedicated future task
  • Every OrgWorkspace must have an OrgPublicProfile — create one via OrgPublicProfileService.sync() immediately when creating an OrgWorkspace
  • OrgPublicProfile sync: synced=true auto-propagates from private org profile; synced=false is independently managed
  • Role-based data scoping: clients see only their own data; staff see all — checked via ClientService.findClientIdByUserIdAndWorkspaceId()