This Spring Boot Backend Portfolio shows modern Java development practices and enterprise-grade architecture patterns. Built to demonstrate scalability and maintainability in real-world scenarios, it implements:
- Hexagonal Architecture (Ports and Adapters) for flexible and maintainable design
- Comprehensive testing strategy with 100% code coverage
- Server-side rendering capabilities using Thymeleaf for hybrid applications
The project serves as both a technical demonstration and a practical template for building robust microservices.
- Spring Boot application
- RESTful API endpoints with Swagger documentation
- Environment-specific configurations
- Docker containerization
- Thymeleaf templating engine
- JUnit test suite with JaCoCo coverage
- UML diagrams
- Github Actions
- Gradle (wrapper included)
- IDE with Java support (e.g., IntelliJ IDEA, Eclipse, VS Code)
- Java Development Kit (JDK) version 21
- Docker
Follow these steps to get the project up and running locally as developer
profile:
- Clone the repository
- Start the SpringBoot App by running the following command:
./gradlew bootRun
- Test the API endpoint using any REST client with the following request:
curl --location --request GET 'http://localhost:8080/api/v1/health'
- You can also use the Swagger UI at
http://localhost:8080/api/v1/swagger-ui/index.html
Follow these steps to get the project up and running locally as pre-prod
profile:
- Clone the repository
- Modify environment variables in the
.env
file. - Start the Docker Container by running the following command:
docker compose up -d --build
- Test the API endpoint using any REST client with the following request:
curl --location --request GET 'http://localhost:8080/api/v1/health'
- You can also use the Swagger UI at
http://localhost:8080/api/v1/swagger-ui/index.html
Follow these steps to get the project up with prod
profile:
- Clone the repository
- Setup environment variables from
.env
file into system environment variables in the server. - Start all the services associated with the application.
- Start Docker Container.
- Test the API endpoint using any REST client with the following request:
curl --location --request GET '{base_url}/api/v1/health'
- You can also use the Swagger UI at
{base_url}/api/v1/swagger-ui/index.html
To run the tests for this project, execute the following command:
.\gradlew test
To view the test coverage report, open the index.html
file located inside the build\reports\jacoco\test\html
folder (generated by the previous command).
-
Port 8080 already in use
- Solution: Modify the port in application.yml or stop the conflicting service
-
Docker container fails to start
- Solution: Check Docker logs using
docker logs <container_name>
- Solution: Check Docker logs using
-
JDK version mismatch
- Solution: Ensure
JAVA_HOME
points to JDK 21
- Solution: Ensure
-
Gradle build fails
- Solution: Run
./gradlew clean build --refresh-dependencies
- Solution: Run
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request