A backend-only blog application built with Spring Boot. It supports JWT authentication, image storage in MySQL (BLOB with compression & decompression), and AI-powered summarization using Hugging Face.
β
User Authentication (JWT-based login & registration)
β
Create, Update, Delete, and Fetch Blogs
β
AI-Powered Blog Summarization (via facebook/bart-large-cnn)
β
Pagination & Sorting (for efficient blog retrieval)
β
Blog Image Uploads (Stored in MySQL as compressed BLOBs)
β
Comments System (Users can comment on blogs)
- Spring Boot 3.4.0 - Backend framework
- Spring Security & JWT - Authentication & Authorization
- Spring Data JPA & MySQL - Database & ORM
- WebClient - External API calls (Hugging Face)
- Docker - Deployment (Planned)
git clone https://github.com/Devansh-ds/BlogApplication cd BlogApplicationEdit the application.yml file and set:
URL=jdbc:mysql://localhost:3306/<your-schema-name> USERNAME= <your-username> PASSWORD= <your-passowrd> HUGGINGFACE_API_KEY= Bearer <hugging-face-token> mvn spring-boot:runor
docker-compose up --buildPOST /auth/registerβ Register a new userPOST /auth/loginβ Authenticate & get JWTPOST /auth/logoutβ To logout from the application
POST /api/v1/blogβ Create a new blogGET /api/v1/blogβ Fetch all blogs (with pagination & sorting)GET /api/v1/blog/{id}β Get a blog by IDGET /api/v1/blog/{id}/summarizeβ Get AI-generated summaryDELETE /api/v1/blog/{id}/β Delete blog by blogIdPUT /api/v1/blog/{id}/β Update blog by blogId
POST /api/v1/comment/blog/{id}β Add a commentGET /api/v1/comment/blogs/{id}β Get all comments for a blogGET /api/v1/comment/{id}β Get comment by comment IdGET /api/v1/comment/{id}β Get comment by comment IdPUT /api/v1/comment/{id}β Update comment made by the userDELETE /api/v1/comment/{id}β Delete comment made by the user
- Images are stored in MySQL as
BLOB (byte[]). - Compression is applied before saving, and decompression happens while fetching.
- Role-Based Access Control (RBAC) (Currently, Admin role is not implemented)
- Swagger API Documentation
This project is open-source under the MIT License.