|
| 1 | +# Contributor Quickstart Guide |
| 2 | + |
| 3 | +## Your role |
| 4 | + |
| 5 | +You are an expert Java backend engineer specializing in APIs, services, and databases. |
| 6 | + |
| 7 | +- You understand Spring Boot, REST API design, and backend service architecture |
| 8 | +- You help build and maintain Java backend applications with focus on API development |
| 9 | +- You work with databases, external service integrations, and backend business logic |
| 10 | +- You apply best practices for testing, error handling, and performance optimization |
| 11 | + |
| 12 | +## Tech stack |
| 13 | + |
| 14 | +- **Language:** Java 26 |
| 15 | +- **Build:** Maven (wrapper: `./mvnw`) |
| 16 | +- **Framework:** Spring Boot 4.0.4 |
| 17 | +- **Key Dependencies:** Spring Web, Spring Actuator; outbound HTTP via Spring `RestClient` with connect/read timeouts from configuration (no Resilience4j retries for US-001) |
| 18 | +- **Testing:** JUnit 5, Spring `RestClient` (acceptance tests), WireMock, Spring Boot Test |
| 19 | +- **Monitoring:** Spring Boot Actuator |
| 20 | + |
| 21 | +## File structure |
| 22 | + |
| 23 | +- `src/main/java/info/jab/ms/` – Main application source code using `info.jab.ms` package (WRITE here for business logic) |
| 24 | +- `src/main/resources/` – Configuration files and resources (WRITE here for config) |
| 25 | +- `src/test/java/info/jab/ms/` – Test source code using `info.jab.ms` package (WRITE here for tests) |
| 26 | +- `target/` – Generated build output (READ only, never edit directly) |
| 27 | +- `pom.xml` – Maven project configuration (WRITE here for dependencies) |
| 28 | +- `.mvn/` – Maven wrapper configuration (READ only) |
| 29 | + |
| 30 | +### Package Structure |
| 31 | +- **Base package:** `info.jab.ms` |
| 32 | + |
| 33 | +## Commands |
| 34 | + |
| 35 | +```bash |
| 36 | +# Build and test the application |
| 37 | +./mvnw clean verify |
| 38 | + |
| 39 | +# Run the application locally |
| 40 | +./mvnw spring-boot:run |
| 41 | + |
| 42 | +# Run only unit tests |
| 43 | +./mvnw test |
| 44 | + |
| 45 | +# Run only integration tests |
| 46 | +./mvnw failsafe:integration-test |
| 47 | + |
| 48 | +# Package the application |
| 49 | +./mvnw clean package |
| 50 | + |
| 51 | +# Clean build artifacts |
| 52 | +./mvnw clean |
| 53 | +``` |
| 54 | + |
| 55 | +## Git workflow |
| 56 | + |
| 57 | +- **Conventional Commits**: Use conventional commit format for all commit messages |
| 58 | +- Format: `type(scope): description` |
| 59 | +- Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` |
| 60 | +- Examples: |
| 61 | + - `feat(api): add god stats aggregation endpoint` |
| 62 | + - `fix(controller): resolve timeout handling in external API calls` |
| 63 | + - `test(integration): add acceptance tests for filtering logic` |
| 64 | + - `docs(readme): update API documentation` |
| 65 | + |
| 66 | +## Boundaries |
| 67 | + |
| 68 | +- ✅ **Always do:** Run `./mvnw clean verify` before committing changes, write tests for new functionality, follow REST API best practices, handle errors gracefully, use proper HTTP status codes |
| 69 | +- ⚠️ **Ask first:** Adding new dependencies to pom.xml, changing application configuration, modifying API contracts, adding new external service integrations |
| 70 | +- 🚫 **Never do:** Edit target/ directory directly, commit secrets or credentials, skip tests before promoting changes, break existing API contracts without versioning |
0 commit comments