2.4 KiB
2.4 KiB
Repository Guidelines
Project Structure & Module Organization
src/main/java/de/tamse/imageconvertercontains production code withImageConverterApplicationas the entry point.src/main/resourcesstores configuration and static assets; defaults live inapplication.properties.src/test/javamirrors the production package tree for JUnit 5 coverage.prd/holds product-facing documentation;target/is disposable build output.
Build, Test, and Development Commands
./mvnw clean packagecompiles, runs tests, and produces an executable JAR undertarget/../mvnw testexecutes the unit and integration test suite without packaging../mvnw spring-boot:runstarts the application for local development; stop withCtrl+C.- Ensure Java 17 is configured in your IDE and
$JAVA_HOMEbefore invoking the wrapper.
Coding Style & Naming Conventions
- Adopt Spring conventions: classes in PascalCase, methods and fields in camelCase, constants in UPPER_SNAKE.
- Indent with four spaces, let your IDE organise imports, and avoid trailing whitespace.
- Group new components under
de.tamse.imageconverter.<feature>with descriptive names (e.g.,PngToJpegConverter). - Prefer constructor injection for Spring beans and commit only formatted code.
Testing Guidelines
- Use JUnit 5; name test classes with the
*Testssuffix and match package paths. - Limit
@SpringBootTestto scenarios needing the full application context; favour slice or unit tests otherwise. - Run
./mvnw testbefore pushing to catch regressions locally. - Expand coverage around new converters, validators, or data flows you introduce.
Commit & Pull Request Guidelines
- Follow Conventional Commits (e.g.,
feat: add png conversion pipeline) to keep history searchable. - Write imperative subject lines and mention affected modules when helpful.
- Pull requests should include a concise summary, linked issues, and manual verification notes.
- Attach screenshots or sample payloads when changes affect user-visible behaviour or external APIs.
Configuration Tips
- Keep shared defaults in
application.properties; never commit secrets or API keys. - Add environment overrides via
application-<profile>.propertiesand document activation (--spring.profiles.active=dev). - Prefer environment variables or external vaults for sensitive values and note required secrets in PR checklists.