- Java:
21 - Build tool:
Maven 3.8.6+ - Required quality gate before merge:
mvn verify - Coverage gate is enforced by JaCoCo during
verify.
- Keep platform modules (
platform.bukkit,platform.velocity) thin. - Put persistence/business behavior in
backend.service. - Keep settings validation in
backend.config. - Keep repository responsibilities in
api.repository. - New built-in data domains must be feature-toggleable through
DataRegistrySettings.
Data domains can be disabled in config.yml under features:
online-statusconnection-infosessionsname-historyservice-registry
When a feature is disabled:
- Its entities are not registered in ORM bootstrap.
- Services for that domain must no-op and avoid database writes.
Database profile policy:
- Player-facing domains must use the player profile connection (
database.profiles.players.connection-id). - Service-facing domains must use the service profile connection (
database.profiles.services.connection-id). - Keep domains independent; do not couple optional feature tables into the core identity schema.
- Prefer exposing read-side helper methods via
DataRegistry#newServiceRegistryService()for cross-feature service discovery instead of duplicating raw queries.
- Create entity class in
api.entities. - Create repository abstraction in
api.repositoryif needed. - Add a focused service in
backend.service. - Add a feature toggle in
DataRegistryFeature,DataRegistrySettings, andDataRegistrySettingsLoader. - Wire feature-aware behavior in runtime startup (
DataRegistryand platform module). - Add unit tests for settings parsing, service behavior, and runtime registration.
- Never log raw unbounded user input without sanitization.
- Keep privacy-sensitive fields opt-in (
persist-ip-address,persist-virtual-host). - Prefer strict input normalization and bounded field lengths.
- Use
SafeConstructor+ constrainedLoaderOptionsfor YAML parsing.
-
mvn verifypasses locally. - New behavior is documented in
README.mdand/or config comments. - New domain changes are feature-toggleable.
- Failure paths are logged with sanitized values only.
- Added/updated tests cover success and failure paths.