A blogging backend built with Spring Boot: JWT-secured authentication, posts, and comments, exposed as a clean REST API.
- Auth — registration and login issuing JWTs, enforced by a custom
JwtAuthFilteron top of Spring Security - Posts — full CRUD, scoped to the authenticated author
- Comments — comments attached to posts, with their own endpoints
- DTO mapping — dedicated mappers keep entities out of the API surface
- Error handling — centralised
ApiExceptionHandlerreturning consistent JSON errors - Containerised — Docker Compose for the database
| Layer | Technology |
|---|---|
| Language | Java |
| Framework | Spring Boot, Spring Security, Spring Data JPA |
| Auth | JWT |
| Infra | Docker Compose |
| Build | Maven |
controller -> service -> repository -> entity
|
+-- dto + mapper
+-- config (SecurityConfig, JwtAuthFilter)
+-- exception (ApiException -> ApiExceptionHandler)
Prerequisites: JDK 17+, Docker, Maven
git clone https://github.com/native-99/Blog-Powered-with-AI.git
cd Blog-Powered-with-AI/Blog
docker compose up -d # start the database
./mvnw spring-boot:runThe API runs on http://localhost:8080.
- Unit and integration tests
- OpenAPI/Swagger documentation
- Pagination and search on posts