Skip to content

Manage tasks, users, and comments with roles & permissions. Comprehensive API with Swagger UI & unit tests. Easy setup and ready to explore.

Notifications You must be signed in to change notification settings

tawhidwasik08/drf-task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management System Backend

A Task Management System Backend using Django Rest Framework (DRF) to handle user and task creation, assignment, and comments with API endpoints for user management and data retrieval. Includes Swagger UI integration for API documentation and comprehensive unit-testing coverage.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/tawhidwasik08/drf-task-manager.git
  2. Create a new virtual environment

    python3 -m venv tms_venv
  3. Activate the virtual environment. (For windows)

    tms_venv\Scripts\activate.bat
  4. Install the project dependencies.

    pip install -r requirements.txt
  5. Move to backend/ directory

    cd backend
  6. Setup database

    python manage.py makemigrations
    python manage.py migrate
  7. Run the server

    python manage.py runserver
  • The API should now be accessible at http://localhost:8000/
  • Admin panel should checked for different user role tokens at http://localhost:8000/admin/
    • Superuser name:su_admin_01 , password:12345
    • If any superuser is non existent. Run python manage.py test createsuperuser from /backend/

Usage & Features

  • Users

    • Users can be created freely with any of the 3 roles - admin, manager, team_member. Authentication is not implemented at registration to avoid demo showing complexity.
    • Admin has access to everything except for updating any comment.
    • Manager has access to -
      • Getting all users info
      • Creating, updating, deleting Tasks and task comments
      • Getting info of tasks of which he is the creator
      • Assigning team_members to a task by updating the task
    • Team member has access to
      • Creating, updating and deleting task comments
    • Access token for each user will be generated at registration.
  • Tasks

    • Creator will be auto assigned by the user who is currently authorized
    • Can be filtered through:
      • Assigned to a user_id, completed or not, due date
      • Sort descending or ascending by due date, task id, priority
  • Task Comments

    • Only admin or the creator of the comment can update or delete it.
    • Admin, Task Creator Manager or Task Assignees can only comment on a given task.
  • Others

    • Pagination is done by LimitOffsetPagination. Limit and offset parameters are given in available endpoints.
    • There are 28 test cases. Run python manage.py test from /backend/
    • There is a data generator script. Run python data_generator.py from /backend/

API Documentation

The API documentation is available at Swagger UI for detailed information about the endpoints and request/response formats.

API Endpoints

Method Endpoint Function Role Permission
GET /users/ get multi/single user info Admin, Manager
POST /users/ create new user Unauthorized
GET /tasks/ get tasks info All
POST /tasks/ create a task Admin, Manager
GET /tasks/{task_id}/ get single task info All
PATCH /tasks/{task_id}/ update task Admin, Manager
DELETE /tasks/{task_id}/ delete task Admin, Manager
GET /task-comments/ get task_comments All
POST /task-comments/ create task_comments All
GET /task-comments/{comment_id}/ get single task_comment info All
PATCH /task-comments/{comment_id}/ update a task_comment All
DELETE /task-comments/{comment_id}/ delete a task_comment All

About

Manage tasks, users, and comments with roles & permissions. Comprehensive API with Swagger UI & unit tests. Easy setup and ready to explore.

Topics

Resources

Stars

Watchers

Forks

Languages