Author: NikStack20
Contact: codingnik20@gmail.com
Live Demo: Swagger UI
License: Apache License 2.0
A Spring Boot-based backend blogging application built with industry-grade tech stack and deployed live for seamless testing.
Implements Layered Architecture with DTOs for clean data flow, secure JWT Authentication, and complete REST API support for blog operations.
- Spring Boot
- Spring Web
- Spring Data JPA
- Hibernate
- MySQL Database
- Lombok
- Spring Security + JWT Authentication
- Swagger UI (for API documentation)
- Layered Architecture (Controllers → Services → Repositories)
- Global Exception Handling
- Bean Configuration
- DTOs (Data Transfer Objects) for seamless mapping
This application follows a Layered Architecture ensuring:
- Controller Layer: Handles incoming API requests and delegates to services.
- Service Layer: Business logic implementation through service interfaces and their
implclasses. - Repository Layer: Database interaction via Spring Data JPA.
- Security Layer: JWT-based authentication and authorization.
- DTOs: Used to maintain separation between API layer and entity layer.
- Exception Handling: Centralized error responses with
GlobalExceptionHandler.
- Auth Controller: User registration and login (JWT token generation)
- User Controller: Manage users (CRUD)
- Category Controller: Manage blog categories
- Post Controller: Create, update, delete, view blog posts
- Comment Controller: Add/delete comments on posts
- SavePost Controller: Save posts for later by logged-in users
- Image Upload Controller: Upload images for blog posts
- JWT Authentication for securing APIs
- Spring Security integration
- Token-based access to protected routes
- User ↔ Post: One-to-Many
- Post ↔ Comment: One-to-Many
- Category ↔ Post: One-to-Many
- User ↔ SavePost: Many-to-Many (saved posts feature)
Entity Relationship Diagram available in ApplicationPreview folder.
- Swagger UI screenshot for API testing
- Entity Relationship Diagram
(All available inApplicationPreviewfolder alongsidesrc,.gitignore,.classpathetc.)
- Live on Render: Swagger UI
- Accessible via browser for API testing
- JWT Auth enabled on Swagger UI
- Can be tested using Swagger UI or Postman
- Swagger UI allows live interaction with APIs (requires JWT authentication)
- Works seamlessly with MySQL (local or cloud-hosted).
- Can be extended to other databases like PostgreSQL.
- GitHub Repository: https://github.com/NikStack20/JAVA-Spring-Boot-Project
- LinkedIn: NikStack20
- License: Apache License 2.0