A fullstack blogging platform for students to document their learning journey. Features user registration, posts with media, subscriptions, likes, comments, and admin moderation tools.
- Authentication: JWT-based auth with role-based access (USER/ADMIN)
- User Management: Registration, login, profiles, subscriptions
- Posts: CRUD operations with media upload support
- Interactions: Likes, comments, notifications
- Reports: User reporting system for moderation
- Admin Panel: User and post management, report handling
- Responsive UI: Built with Angular Material
- Feed System: Posts from subscribed users
- Profile Pages: Personal and public user profiles
- Post Management: Create, edit, delete posts with media
- Admin Dashboard: Moderation tools
- Backend: Java 17, Spring Boot 3.3.4, MySQL, JPA/Hibernate, JWT
- Frontend: Angular 21, TypeScript, Angular Material
- Database: MySQL 8.0
- Build Tools: Maven, npm
- Java 17+
- Node.js 18+
- MySQL 8.0
- Docker (optional, for MySQL)
# Start MySQL container
docker run --name blog-mysql \
-e MYSQL_ROOT_PASSWORD=1234 \
-e MYSQL_DATABASE=01blog_db \
-v ${PWD}/mysql-data:/var/lib/mysql \
-p 3306:3306 \
-d mysql:latest
# Connect to MySQL
docker exec -it blog-mysql mysql -u root -p1234 01blog_db- Install MySQL 8.0
- Create database:
blog_db - Update
backend/src/main/resources/application.propertieswith your credentials
cd backend
# Install dependencies
./mvnw clean install
# Run the application
./mvnw spring-boot:runThe backend will start on http://localhost:8081
Default Admin Account:
- Email:
admin@blog.com - Password:
admin123
cd frontend
# Install dependencies
npm install
# Start development server
npm startThe frontend will start on http://localhost:4200
POST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/users/profile/{username}- Get user profilePOST /api/users/subscribe/{userId}- Toggle subscriptionGET /api/users/subscriptions- Get subscribed usersGET /api/users/admin- Get all users (Admin only)DELETE /api/users/admin/{userId}- Delete user (Admin only)
POST /api/posts- Create postGET /api/posts/feed- Get feed postsGET /api/posts/user/{username}- Get user's postsPUT /api/posts/{postId}- Update postDELETE /api/posts/{postId}- Delete postPOST /api/posts/{postId}/like- Toggle likeGET /api/posts/{postId}/comments- Get post commentsPOST /api/posts/{postId}/comments- Add commentDELETE /api/posts/comments/{commentId}- Delete commentGET /api/posts/admin- Get all posts (Admin only)DELETE /api/posts/admin/{postId}- Delete post (Admin only)
POST /api/reports- Create reportGET /api/reports- Get all reports (Admin only)
├── backend/
│ ├── src/main/java/com/example/demo/
│ │ ├── controller/ # REST controllers
│ │ ├── model/ # JPA entities
│ │ ├── repository/ # Data repositories
│ │ ├── service/ # Business logic
│ │ ├── dto/ # Data transfer objects
│ │ ├── config/ # Configuration classes
│ │ └── clobalException/ # Global exception handling
│ └── src/main/resources/
│ └── application.properties
├── frontend/
│ ├── src/app/
│ │ ├── components/ # Angular components
│ │ ├── services/ # Angular services
│ │ ├── guards/ # Route guards
│ │ └── app.config.ts # App configuration
│ └── src/styles.css # Global styles
└── mysql-data/ # MySQL data volume
# Backend tests
cd backend && ./mvnw test
# Frontend tests
cd frontend && npm test# Backend
cd backend && ./mvnw clean package
# Frontend
cd frontend && npm run build- JWT token authentication
- Password encryption (BCrypt)
- Role-based access control
- CORS configuration
- Input validation
- SQL injection prevention
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License.
Client ↓ Security Filter Chain 🔐 ↓ Custom Filters (JWT) ↓ DispatcherServlet ↓ Controller ↓ Service ↓ Repository (DB) ↓ Response ↑