Skip to content

AhdTech-Backend-Intern/Task-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task_Management_System

GitHub repo size GitHub repo file count (file type) GitHub last commit (branch) Version Contributors GitHub pull requests Java Version Maven Version Spring Boot Version JPA Security Validation Web DevTools H2 Database PostgreSQL Lombok JWT Mockito JUnit Docker Postman Swagger

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.

Features

User Authentication & Authorization

  • 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.

Task Management

  • 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).

Admin Capabilities

  • 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.

Audit Logging

  • 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.

Database Support

  • Development:
    • Uses H2 in-memory database for fast prototyping and local development.
  • Production:
    • Employs PostgreSQL for robust and scalable data storage.

Getting Started

Run Locally

  1. Clone the repository:

    git clone <repository-url>
    cd task-management-system
  2. Build the project:

    mvn clean install
  3. Run with the development profile:

    java -Dspring.profiles.active=dev -jar target/task-management-system-0.0.1-SNAPSHOT.jar
  4. Access the application:

Run in Production with PostgreSQL

  1. 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
  2. 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
  3. Run the application with the production profile:

    java -Dspring.profiles.active=prod -jar target/task-management-system-0.0.1-SNAPSHOT.jar
  4. Access the application:

Verify the Database

  1. Connect to PostgreSQL:

    docker exec -it my_postgres psql -U <your-username> -d task_management_system
  2. Run SQL Queries:

    \c task_management_system
    SELECT * FROM users;
    SELECT * FROM tasks;
    SELECT * FROM audit_logs;

Development Steps

1. Initial Setup

  • 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.

2. Core Features Implementation

  • Develop CRUD operations for task management.
  • Add filtering and search functionality for tasks.
  • Create summary reports for users and admins.

3. Admin Features

  • Implement user management functionalities.
  • Develop system-wide task management and reporting for admins.

4. Audit Logging

  • Integrate an audit log system to track user and admin actions.

5. API Documentation

  • Use Swagger to document all APIs for better testing and collaboration.

6. Testing

  • Write unit and integration tests using JUnit and Mockito.

API Documentation

Access API documentation via Swagger UI and Postman at:

Technology Stack

  • Backend: Spring Boot, Spring Security, Spring Data JPA.
  • Database: H2 (Development), PostgreSQL (Production).
  • Authentication: JWT.
  • API Documentation: Swagger/OpenAPI.
  • Testing: JUnit, Mockito.
  • Containerization: Docker.

Directory Structure

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

License

This project is licensed under the Apache License.


Acknowledgments

Special thanks to all supporters who made this project a success! 🚀

About

Final project at my backend internship using Spring Boot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages