This is a single Spring Boot Maven application. Production code is under
src/main/java/xyz/subho/clone/twitter/, organized by responsibility:
controller, service, repository, entity, model, security, config,
exception, and utility. Runtime profiles and other resources are in
src/main/resources/. Tests mirror the Java package tree under
src/test/java/. Docker Compose files provide MySQL/Adminer and full-stack
development; .github/workflows/ contains CI definitions.
./mvnw clean verify- format, compile, test, and package the application../mvnw test- run the JUnit/Spring Boot test suite../mvnw spotless:apply- apply Google Java Format through Spotless../mvnw spring-boot:run -Dspring-boot.run.profiles=dev- run locally with the development profile.docker compose up -d- start the full stack; usedocker compose -f docker-compose.dev.yml up -dfor database dependencies only. On Windows, usemvnw.cmdequivalents.
Use Java 25, four-space indentation, Google Java Format, and imports instead of
inline fully qualified names. Classes and interfaces use PascalCase; methods,
fields, and variables use camelCase; constants use UPPER_SNAKE_CASE.
Preserve Controller -> Service -> Repository layering, expose DTO/model
types rather than JPA entities, use Jakarta validation, and annotate service
and repository contracts with JSpecify nullability.
Add unit tests for new service logic and integration tests for new endpoints.
Name tests after the behavior they verify, and run ./mvnw test before pushing.
Use mvnw jacoco:report to inspect coverage changes.
Use concise Conventional Commit subjects such as feat:, fix:, docs:, or
chore:. Sign commits with git commit -s. Before requesting review, rebase
onto master, ensure PR Checker is green, update Swagger/OpenAPI metadata for
API changes, remove debug logs/TODOs, and include a focused description plus
linked issue context where applicable.
Use the authenticated Principal for current-user behavior; never hardcode
user IDs or generate replacement IDs. Keep secrets in environment variables or
local profile configuration, never in commits. Follow CODE_OF_CONDUCT.md and
CONTRIBUTING.md for project policies.