Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

103 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TechBlog API - Spring Boot Backend

A production-ready TechBlog Backend REST API built using Spring Boot, Spring Security (JWT), MySQL/TiDB, and WebSocket. It powers a modern blogging platform with secure authentication, profile management, posts, comments, likes, follow system, notifications, OTP verification, and real-time updates.


Features

Authentication

  • User Registration
  • Login with JWT Authentication
  • Secure Password Encryption (BCrypt)
  • Email OTP Verification
  • Forgot Password
  • Reset Password

User Management

  • Update User Profile
  • Upload Profile Picture
  • Search Users
  • User Dashboard
  • View User Profile

Posts

  • Create Post
  • Update Post
  • Delete Post
  • View All Posts
  • View User Posts

Likes

  • Like Post
  • Unlike Post
  • Real-time Like Count

Comments

  • Add Comment
  • Delete Comment
  • View Comments

Follow System

  • Follow User
  • Unfollow User
  • Followers List
  • Following List

Notifications

  • Real-time Notifications
  • WebSocket Integration
  • STOMP Messaging
  • SockJS Support

File Upload

  • Upload Profile Images
  • Static Resource Serving
  • Image Persistence
  • Production File Handling

Security

  • JWT Authentication
  • Spring Security
  • Stateless Sessions
  • BCrypt Password Encoding
  • Protected REST APIs
  • CORS Configuration

Tech Stack

Backend

  • Java 21
  • Spring Boot
  • Spring Security
  • Spring Data JPA
  • Hibernate
  • Maven

Database

  • TiDB Cloud (MySQL Compatible)

Authentication

  • JWT
  • BCrypt

Email

  • Brevo SMTP

Real-Time

  • WebSocket
  • STOMP
  • SockJS

Deployment

  • Render
  • Docker

Project Structure

src
 ├── config
 ├── controller
 ├── dto
 ├── entity
 ├── repository
 ├── security
 ├── service
 ├── websocket
 └── util

Major Modules

  • Authentication
  • OTP Verification
  • User Management
  • Posts
  • Likes
  • Comments
  • Follow System
  • Notifications
  • Profile Upload
  • JWT Security

REST APIs

Authentication

POST /api/users/register
POST /api/users/login
POST /api/users/verify
POST /api/users/forgot-password
POST /api/users/reset-password

User

GET    /api/users/me
PUT    /api/users/update
POST   /api/users/upload
GET    /api/users/search

Posts

GET    /api/posts
POST   /api/posts
PUT    /api/posts/{id}
DELETE /api/posts/{id}

Comments

POST   /api/comments
DELETE /api/comments/{id}

Likes

POST /api/likes/toggle

Follow

POST /api/follow/{id}
DELETE /api/follow/{id}

Notifications

GET /api/notifications

🔐 Security Flow

Register
      ↓
OTP Verification
      ↓
Login
      ↓
JWT Token
      ↓
Protected APIs

Deployment

Backend is deployed on Render.

Database is hosted on TiDB Cloud.


👨‍💻 Author

Aakash Prasad Chaurasiya

  • Java Full Stack Developer
  • Spring Boot Developer
  • Backend & Scalable Systems Enthusiast

Portfolio: https://www.aakashchaurasiya.com.np


⭐ Future Improvements

  • Bookmark Posts
  • Saved Posts
  • Admin Panel
  • Analytics Dashboard
  • Image Compression
  • AWS S3 Storage
  • Docker Compose
  • Kubernetes Deployment
  • Redis Cache
  • Rate Limiting

About

Full-stack TechBlog platform built with Spring Boot and React. Features JWT authentication, OTP-based user verification, profile image upload, and CRUD operations for posts and comments. Includes responsive UI, secure APIs, and modern dashboard design for seamless user experience.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages