A comprehensive Task Management System built with Spring Boot, leveraging JWT-based authentication, role-based authorization, and PostgreSQL for production. This project is designed to streamline task management, offering robust features for both users and administrators.
- JWT-Based Authentication:
- Secure and scalable authentication mechanism using JSON Web Tokens (JWT).
- Ensures all endpoints are protected and accessible only to authenticated users.
- Role-Based Access Control:
- Differentiates functionalities based on roles (Admin, User).
- Admins can manage users and tasks system-wide, while users can manage their own tasks.
- CRUD Operations:
- Create, update, delete, and retrieve tasks.
- Tasks include attributes like title, description, category, priority, status, and due date.
- Filtering and Search:
- Users can filter tasks by title, category, status, priority, and date range.
- Admins can view and filter all tasks across the system.
- Task Summary Reports:
- Users can view task summaries, including category-wise distribution.
- Admins can generate system-wide task summaries (e.g., tasks by priority, category, and status).
- User Management:
- View all users in the system.
- Update user roles and delete users.
- Task Oversight:
- View all tasks with advanced filtering capabilities.
- Generate reports for better system insights.
- Comprehensive Logs:
- Tracks user actions such as creating, updating, or deleting tasks.
- Logs admin actions like role updates or user deletions.
- Admin View:
- Admins can access audit logs for accountability and monitoring.
- Development:
- Uses H2 in-memory database for fast prototyping and local development.
- Production:
- Employs PostgreSQL for robust and scalable data storage.
-
Clone the repository:
git clone <repository-url> cd task-management-system
-
Build the project:
mvn clean install
-
Run with the development profile:
java -Dspring.profiles.active=dev -jar target/task-management-system-0.0.1-SNAPSHOT.jar
-
Access the application:
- Swagger UI: http://localhost:8080/swagger-ui.html
- Postman Documentation: Task Management System Postman Collection
- H2 Console: http://localhost:8080/h2-console/
-
Set up PostgreSQL with Docker:
docker pull postgres docker run --name my_postgres \ -e POSTGRES_USER=<your-username> \ -e POSTGRES_PASSWORD=<your-password> \ -e POSTGRES_DB=task_management_system \ -p 5432:5432 -d postgres
-
Configure the
application-prod.properties
file:spring.datasource.url=jdbc:postgresql://localhost:5432/task_management_system spring.datasource.username=<your-username> spring.datasource.password=<your-password> spring.jpa.hibernate.ddl-auto=update
-
Run the application with the production profile:
java -Dspring.profiles.active=prod -jar target/task-management-system-0.0.1-SNAPSHOT.jar
-
Access the application:
- Swagger UI: http://localhost:8080/swagger-ui.html
- Postman Documentation: Task Management System Postman Collection
-
Connect to PostgreSQL:
docker exec -it my_postgres psql -U <your-username> -d task_management_system
-
Run SQL Queries:
\c task_management_system SELECT * FROM users; SELECT * FROM tasks; SELECT * FROM audit_logs;
- Set up the project using Spring Boot with required dependencies.
- Configure development and production profiles for H2 and PostgreSQL.
- Implement basic user authentication and role-based access control.
- Develop CRUD operations for task management.
- Add filtering and search functionality for tasks.
- Create summary reports for users and admins.
- Implement user management functionalities.
- Develop system-wide task management and reporting for admins.
- Integrate an audit log system to track user and admin actions.
- Use Swagger to document all APIs for better testing and collaboration.
- Write unit and integration tests using JUnit and Mockito.
Access API documentation via Swagger UI and Postman at:
- Backend: Spring Boot, Spring Security, Spring Data JPA.
- Database: H2 (Development), PostgreSQL (Production).
- Authentication: JWT.
- API Documentation: Swagger/OpenAPI.
- Testing: JUnit, Mockito.
- Containerization: Docker.
src/
├── main/
│ ├── java/
│ │ └── com.example.task_management_system/
│ │ ├── controller/ # REST Controllers
│ │ ├── model/ # Entity Classes
│ │ ├── repository/ # Repositories
│ │ ├── service/ # Service Interfaces and Implementations
│ │ └── security/ # Security Configurations
│ └── resources/
│ ├── application.properties # Main Configuration
│ ├── application-dev.properties # Development Configuration
│ └── application-prod.properties # Production Configuration
└── test/
└── java/
└── com.example.task_management_system/
├── controller/ # Controller Tests
├── service/ # Service Tests
└── repository/ # Repository Tests
This project is licensed under the Apache License.
Special thanks to all supporters who made this project a success! 🚀