- Post Management - CRUD posts with pagination and sorting support.
- Comments Management - CRUD comments for posts.
- Authentication and Authorization - Register, Login and Security.
- Secure using database authentication.
- Build Login/SignIn
- Build Register/SingUp
- Use JWT based authentication
- Implement Role-based security for admin and user roles
- Category Management - CRUD categories.
- Exceptions Handling and Validations
- Versioning using different strategies.
- Java platform: Java 17+
- Java Frameworks: Spring
- Token Based Authentication: JWT
- Build Tool: Maven
- IDE: Eclipse with STS
- Server: Tomcat embedded server
- Database: MySQL database
- REST Client: Postman
- Post
- CRUD
- Pagination and Sorting
- Comment
- CRUD
- One post to Many comments mapping
- User
- Register and Login
- JWT
- Category
- CRUD
flowchart LR
A[Postman\nClient] <--DTO\nJSON--> B[Controller\nLayer] <--> C[Bussines/Service\nLayer] <--> D[DAO\nRepository\nLayer] <--> E[DB]
- Main
- Controller
- Configs
- Dto
- Entity
- Exception
- Repository
- Service
- Implementation
- Security
- Utils
- ModelAssembler
erDiagram
POST {
bigint id pk
varchar title
varchar description
varchar content
bigint category_id fk
}
COMMENTS {
bigint id pk
varchar body
varchar email
varchar name
bigint post_id fk
}
CATEGORIES {
bigint id
varchar name
varchar description
}
CATEGORIES ||--|{ POST : belongs
POST ||--|{ COMMENTS : contains
USERS {
bigint id pk
varchar email
varchar name
varchar password
varchar username
}
USER_ROLES {
bigint user_id
bigint role_id
}
ROLES {
bigint id pk
varchar name
}
USERS ||--|{ USER_ROLES : a
USER_ROLES }|--|| ROLES : a