A REST API build using spring boot for the roadmap challenge. This project is designed to manage blog posts, allowing users to create, read, update, and delete their posts.
It implements a modern backend architecture with a focus on clean code, separation of concerns, and best practices in API design.
The project follows a standard layered architecture:
- Controller Layer: Manages HTTP requests and maps them to service calls. Includes OpenAPI annotations for documentation.
- Service Layer: Handles business logic and performs conversions between Entities and DTOs.
- Repository Layer: Uses Spring Data JPA for easy and efficient database interaction.
- Entity Layer: Defines the
BlogPostentity representing the database structure. - DTO Layer: Contains request and response records to ensure a clear separation between internal data models and API contracts.
- Docker and Docker Compose
- Clone the repository
- Build and launch the application:
docker compose -f compose-dev.yaml up --build - Access the API documentation at: http://localhost:8080/swagger-ui/index.html
To execute the automated integration tests: Bash
./mvnw test
docker run -d --name postgres-db -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -e POSTGRES_DB=blogdb -p 5432:5432 postgres:16
This project is licensed under the terms of the GNU General Public License v3.0. See the LICENSE file for details.