- This template can be used as a base layer for a single-module Maven project.
- Make the project easy to maintain with 7 issue templates.
- Quick-start documentation with an extraordinary README structure.
- Manage issues with 20 issue labels.
- Make community healthier with all the guides like code of conduct, contributing, support, security...
- Learn more with the official GitHub guide on creating repositories from a template.
- To start using it, click Use this template to create your new repository.
A service created for implementing the servicename API...
Java 21, Maven, Spring Boot
# Clone the repository
git clone https://github.com/dimdnk/standard-maven-single-project-layout.git my-service
# Navigate to project directory
cd my-service
# Install git hooks
pnpm install
# Start local dev services dependencies
docker compose -f compose.yaml up -d
# Run the application in dev mode
mvn spring-boot:run -Dspring-boot.run.profiles=local -P dev
Variable | Description | Default |
---|---|---|
LOGGING_LEVEL_ROOT |
Set default logging level | INFO |
The application contains different test layers according to the Test Pyramid.
Unit tests are the base of the pyramid. They should make up the biggest part of an automated test suite.
To run JUnit tests, use:
mvn clean test
The next layer, integration tests, test all places where your application serializes or deserializes data. Application Service's REST API, Repositories, or calling third-party services are good examples.
Run this to enable integration tests, powered by testcontainers:
mvn clean verify -P use-testcontainers
The minimum percentage of code coverage required for the workflow to pass is 80%.
Conventional changelog located here.
...
Please follow Contributing page.
Please follow Code of Conduct page.
...
This project is licensed under the Apache License. See the LICENSE file for more details.
- Java: OpenJDK 21 LTS
- Maven: Build automation with Spring Boot parent POM
- Spring Boot: Web framework with modulith architecture
- Docker: Containerization with Docker Compose for local services
- pnpm: Node.js package manager (v22.15.0+ required)
- Maven Wrapper:
mvnw
for consistent Maven execution
- Prettier: Code formatting with Java plugin support
- Stylelint: CSS/SCSS linting
- Checkstyle: Java code style enforcement
- JaCoCo: Code coverage (90% minimum requirement)
- ArchUnit: Architecture testing
- Qulice: Optional comprehensive quality checks
- Cursor Rules: Predefined code quality rules for Java development covering:
- Maven best practices
- Object-oriented design
- Spring framework
- Security guidelines
- Performance optimization
- Functional programming
- Testing standards
lint
: Run stylelint checksprettier:check/write
: Format validation/applicationprepare
: Install Husky git hooksrelease
: Automated releases with conventional changelognode_modules:clear
: Clean Node dependencies
- Husky: Git hooks management
- lint-staged: Pre-commit linting
- Commitizen: Conventional commit messages
- Commitlint: Commit message validation
- Dependabot: Automated dependency updates
- Build validation: Node.js project builds
- Commit message checks: Conventional commit enforcement
- PR title validation: Standardized pull request titles
- Template setup: Repository initialization automation
- Unit Tests: JUnit-based (
mvn clean test
) - Integration Tests: Testcontainers support (
mvn clean verify -P use-testcontainers
) - Architecture Tests: Spring Modulith validation
- Test Coverage: 90% minimum threshold
- 7 Issue Templates: Structured issue reporting
- 20 Issue Labels: Comprehensive labeling system
- Community Files: Contributing guidelines, Code of Conduct, Security policy
- Conventional Changelog: Automated release notes
- default: Standard development
- dev: With Spring Boot DevTools
- production: Optimized for deployment
- use-qulice: Enhanced quality checks
- use-testcontainers: Integration testing