{"id":21656834,"url":"https://github.com/khaledashrafh/task-management-system","last_synced_at":"2026-05-07T14:42:17.816Z","repository":{"id":263256236,"uuid":"889269684","full_name":"KhaledAshrafH/Task-Management-System","owner":"KhaledAshrafH","description":"The Task Management System is a robust backend application designed to manage tasks efficiently. It provides a RESTful API for performing CRUD operations on tasks, user authentication and authorization, and additional features such as validation, error handling, search and filtering, and email notifications.","archived":false,"fork":false,"pushed_at":"2024-11-17T10:47:00.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T05:17:43.050Z","etag":null,"topics":["authentication","authorization","email-notification","error-handling","junit","lombok","mapstruct","mockito","mysql","notifications","pagination","spring-boot","spring-data-jpa","spring-security","task-management","testing","validation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhaledAshrafH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-16T00:17:02.000Z","updated_at":"2024-11-17T10:47:04.000Z","dependencies_parsed_at":"2024-11-17T23:30:50.333Z","dependency_job_id":null,"html_url":"https://github.com/KhaledAshrafH/Task-Management-System","commit_stats":null,"previous_names":["khaledashrafh/task-management-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledAshrafH%2FTask-Management-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledAshrafH%2FTask-Management-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledAshrafH%2FTask-Management-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledAshrafH%2FTask-Management-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhaledAshrafH","download_url":"https://codeload.github.com/KhaledAshrafH/Task-Management-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554123,"owners_count":20471173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","email-notification","error-handling","junit","lombok","mapstruct","mockito","mysql","notifications","pagination","spring-boot","spring-data-jpa","spring-security","task-management","testing","validation"],"created_at":"2024-11-25T09:17:45.799Z","updated_at":"2025-10-26T16:43:23.842Z","avatar_url":"https://github.com/KhaledAshrafH.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Task Management System\n\n## Overview\n\nThe **Task Management System** is a robust backend application designed to manage tasks efficiently. It provides a RESTful API for performing CRUD operations on tasks, user authentication and authorization, and additional features such as validation, error handling, search and filtering, and email notifications.\n\n## Features\n\n- **Task Management APIs**: \n  - CRUD operations for managing tasks.\n  - Each task includes a title, description, status (e.g., todo, in progress, done), priority, and due date.\n\n- **User  Authentication and Authorization**: \n  - JWT-based authentication with Spring Security.\n  - Role-based access control (e.g., admin, regular user) to enforce authorization rules.\n\n- **Validation and Error Handling**: \n  - Input validation to ensure data integrity and consistency.\n  - Meaningful error messages for invalid requests or server errors.\n\n- **Search and Filtering**: \n  - Endpoints for searching tasks based on criteria such as title, description, status, and due date.\n  - Filtering options to narrow down task lists.\n\n- **Email Notifications**: \n  - Send email notifications for upcoming task deadlines or important updates.\n  - Configurable SMTP settings for email integration.\n\n- **Pagination Support**: \n  - Efficient management of large datasets by supporting pagination in API responses.\n\n- **Unit Testing**: \n  - Comprehensive unit tests to ensure the reliability and correctness of the application.\n  - Uses JUnit and Mockito for testing service and controller layers.\n\n- **Exception Handling**: \n  - Custom exceptions to handle various error cases gracefully.\n  - Global exception handler to provide meaningful error responses.\n\n## Technology Stack\n\n- **Java 17**\n- **Spring Boot 3.3.5**\n- **Spring Data JPA**\n- **Hibernate**\n- **Spring Security**\n- **MySQL**\n- **Lombok**\n- **MapStruct**\n- **JUnit and Mockito for Testing**\n\n## Project Structure\n\n```\ntask-management-system/\n├── src/\n│   ├── main/\n│   │   └── java/\n│   │       └── banquemisr/\n│   │           └── challenge05/\n│   │               └── taskmanagementsystem/\n│   │                   ├── config\n│   │                   ├── controller\n│   │                   ├── domain\n│   │                   │   ├── dto\n│   │                   │   ├── enums\n│   │                   │   ├── mapper\n│   │                   │   └── entity\n│   │                   ├── exception\n│   │                   ├── repository\n│   │                   ├── security\n│   │                   ├── service\n│   │                   └── util\n│   │                   └── ServletInitializer.java\n│   │                   └── TaskManagementSystemApplication.java\n│   ├── test/\n│   │   └── java/\n│   │       └── banquemisr/\n│   │           └── challenge05/\n│   │               └── taskmanagementsystem\n│   │                   ├── controller/     (Test classes for controllers)\n│   │                   ├── service/        (Test classes for services)\n│   │                   └── TaskManagementSystemApplicationTests.java (Main test class)\n│   └── resources/      (Configuration files and other resources)\n│       └── application.properties\n└── pom.xml               (Project configuration file with dependencies)\n```\n\n## Database Setup\n\n1. **Create the Database**: \n   - Create a new MySQL database named `task_management_system_db`.\n\n2. **Schema Creation**: \n   - The application uses Spring Data JPA and Hibernate to automatically create the necessary tables based on the defined entity classes. Upon the first run, the schema will be generated.\n\n## Getting Started\n\n### Prerequisites\n\n- Java 17 or higher\n- MySQL Server\n- Maven\n- An IDE (e.g., IntelliJ IDEA, Eclipse)\n\n### Installation Steps\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/KhaledAshrafH/task-management-system.git\n   cd task-management-system\n   ```\n\n2. **Configure Database Connection:**\n   Open `src/main/resources/application.properties` and configure the database settings:\n   ```properties\n      spring.application.name=Task Management System\n\n      server.port=8083\n      \n      spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\n      spring.datasource.url=jdbc:mysql://localhost:3306/task_management_system_db\n      spring.datasource.username=root\n      spring.datasource.password=\n      \n      spring.jpa.hibernate.ddl-auto=update\n      spring.jpa.show-sql=true\n      spring.jpa.database=mysql\n      spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect\n      \n      security.jwt.secret-key=3cfa76ef14937c1c0ea519f8fc057a80fcd04a7420 f8e8bcd0a7567c272e007b\n      security.jwt.expiration-time=86400000 # a day\n      \n      spring.mail.host=smtp.gmail.com\n      spring.mail.port=587\n      spring.mail.username=hotelhuborg@gmail.com\n      spring.mail.password=sols uwdt trzn frhs\n      spring.mail.properties.mail.smtp.auth=true\n      spring.mail.properties.mail.smtp.starttls.enable=true\n   ```\n3. **Build the Project:**\n   ```bash\n   mvn clean install\n   ```\n\n4. Run the Application:\n    ```bash\n    mvn spring-boot:run\\\n    ```\n\n## Admin Setup\n\nAfter running the application, you can manually create an admin user by using a database client or through the application’s registration endpoint. For testing purposes, you can register any user using the `/api/v1/auth/register` endpoint.\n\n## Seed Data\n\nThe application includes seed data to cover various use cases. You can populate the database with initial tasks and users by calling the appropriate endpoints after starting the application.\n\n## API Documentation\n\nThe API documentation is available through Swagger UI. Once the application is running, navigate to:\n    ```\n    http://localhost:8083/swagger-ui.html\n    ```\n\n## Endpoints Overview\n\n### Authentication API\n\n- **User  Registration**:\n  - `POST /api/v1/auth/register`\n    - **Request Body**: `RegistrationRequestDTO`\n    - **Description**: Create a new user account.\n    - **Response**: `AuthenticationResponseDTO` (201 Created)\n\n- **User  Authentication**:\n  - `POST /api/v1/auth/login`\n    - **Request Body**: `LoginRequestDTO`\n    - **Description**: Authenticate a user and return a JWT.\n    - **Response**: `AuthenticationResponseDTO` (200 OK)\n\n- **User  Logout**:\n  - `POST /api/v1/auth/logout`\n    - **Description**: Logout the user.\n    - **Response**: No content (204 No Content)\n\n### User API\n\n- **Get All Users**:\n  - `GET /api/v1/admin/users`\n    - **Description**: Get all users (admin only).\n    - **Response**: List of `User  ResponseDTO` (200 OK)\n\n- **Get User Task History**:\n  - `GET /api/v1/users/me/history`\n    - **Description**: Get task history for the current user.\n    - **Response**: List of `TaskHistoryResponseDTO` (200 OK)\n\n- **Get All Notifications for Current User**:\n  - `GET /api/v1/users/me/notifications`\n    - **Description**: Get all notifications for the current user.\n    - **Response**: List of `NotificationResponseDTO` (200 OK)\n\n- **Get All Notifications for Specific User**:\n  - `GET /api/v1/users/{userId}/notifications`\n    - **Path Variable**: `userId`\n    - **Description**: Get all notifications for a specific user.\n    - **Response**: List of `NotificationResponseDTO` (200 OK)\n\n- **Delete Notification**:\n  - `DELETE /api/v1/users/me/notifications/{notificationId}`\n    - **Path Variable**: `notificationId`\n    - **Description**: Delete a notification by ID.\n    - **Response**: No content (204 No Content)\n\n- **Mark Notification as Read**:\n  - `PUT /api/v1/users/me/notifications/{notificationId}`\n    - **Path Variable**: `notificationId`\n    - **Description**: Mark a notification as read.\n    - **Response**: Message indicating success (200 OK)\n\n### Task API\n\n- **Create Task**:\n  - `POST /api/v1/tasks`\n    - **Request Body**: `TaskCreationDTO`\n    - **Description**: Create a new task.\n    - **Response**: `TaskResponseDTO` (201 Created)\n\n- **Assign Task**:\n  - `POST /api/v1/tasks/assign`\n    - **Request Body**: `TaskCreationDTO`\n    - **Description**: Assign a new task (admin only).\n    - **Response**: `TaskResponseDTO` (201 Created)\n\n- **Update Task**:\n  - `PUT /api/v1/tasks/{id}`\n    - **Path Variable**: `id`\n    - **Request Body**: `TaskUpdateDTO`\n    - **Description**: Update an existing task.\n    - **Response**: `TaskResponseDTO` (200 OK)\n\n- **Get Task by ID**:\n  - `GET /api/v1/tasks/{id}`\n    - **Path Variable**: `id`\n    - **Description**: Retrieve a specific task by ID.\n    - **Response**: `TaskResponseDTO` (200 OK)\n\n- **Get All Tasks**:\n  - `GET /api/v1/tasks`\n    - **Query Parameters**: `page`, `size`\n    - **Description**: Retrieve all tasks (admin only, supports pagination).\n    - **Response**: List of `TaskResponseDTO` (200 OK)\n\n- **Get All Created Tasks**:\n  - `GET /api/v1/tasks/created`\n    - **Query Parameters**: `page`, `size`\n    - **Description**: Retrieve all tasks created by the current user (supports pagination).\n    - **Response**: List of `TaskResponseDTO` (200 OK )\n\n- **Get All Assigned Tasks**:\n  - `GET /api/v1/tasks/assigned`\n    - **Query Parameters**: `page`, `size`\n    - **Description**: Retrieve all tasks assigned to the current user (supports pagination).\n    - **Response**: List of `TaskResponseDTO` (200 OK)\n\n- **Get All Assigned Tasks for User**:\n  - `GET /api/v1/tasks/assigned/{userId}`\n    - **Path Variable**: `userId`\n    - **Query Parameters**: `page`, `size`\n    - **Description**: Retrieve all tasks assigned to a specific user (supports pagination).\n    - **Response**: List of `TaskResponseDTO` (200 OK)\n\n- **Delete Task by ID**:\n  - `DELETE /api/v1/tasks/{id}`\n    - **Path Variable**: `id`\n    - **Description**: Delete a task by ID.\n    - **Response**: No content (204 No Content)\n\n- **Search and Filter Tasks**:\n  - `GET /api/v1/tasks/search`\n    - **Query Parameters**: `title`, `desc`, `status`, `priority`, `from`, `to`\n    - **Description**: Search and filter tasks based on various criteria.\n    - **Response**: List of `TaskResponseDTO` (200 OK)\n\n- **Get Task History**:\n  - `GET /api/v1/tasks/{taskId}/history`\n    - **Path Variable**: `taskId`\n    - **Description**: Get the history of a specific task.\n    - **Response**: List of `TaskHistoryResponseDTO` (200 OK)\n\n## Conclusion\n\nThe Task Management System is a comprehensive solution for managing tasks with a focus on security, usability, and maintainability. By following the instructions above, you can set up and interact with the API effectively. The inclusion of unit tests and exception handling ensures a robust application design. For any issues or contributions, feel free to open an issue or pull request on the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledashrafh%2Ftask-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhaledashrafh%2Ftask-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledashrafh%2Ftask-management-system/lists"}