Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Management System API

A production-oriented Django REST Framework backend for managing organizations, projects, tasks, memberships, comments and activity logs. Designed with scalability, RESTful architecture, role-based permissions, UUID primary keys and OpenAPI documentation in mind.

Python Django DRF OpenAPI JWT License: MIT

Table of Contents

  • Overview
  • Features
  • Architecture
  • Database Structure
  • Authentication
  • Permission System
  • Complete Workflow
  • API Overview
  • Installation
  • Environment Variables
  • Running the Project
  • Seed Data
  • Project Structure
  • Future Improvements
  • Important Notes

Overview

This project is a complete backend for a collaborative Project Management platform.

Instead of being limited to simple CRUD operations, the API supports complete organization management where users collaborate inside organizations, create projects, assign tasks, leave comments, and maintain a complete activity history.

The application follows REST principles while using:

  • UUID primary keys
  • JWT Authentication
  • Role Based Access Control (RBAC)
  • OpenAPI / Swagger Documentation
  • Generic Activity Logging
  • Nested Resources
  • Clean serializer validation
  • Modular application structure

Features

User Management

  • Custom User Model
  • Email authentication
  • JWT login
  • Profile management
  • Profile pictures
  • Email verification support
  • User bios
  • Job titles
  • Phone numbers

Organization Management

  • Create organizations
  • Update organizations
  • Delete organizations
  • Organization logos
  • Organization owners
  • Membership invitations
  • Leave organization
  • Remove members
  • Change member roles

Supported Roles

  • Owner
  • Admin
  • Manager
  • Member

Project Management

  • Multiple projects per organization
  • Status tracking

Project statuses include:

  • Planning
  • Active
  • On Hold
  • Completed
  • Cancelled

Priority support

  • Low
  • Medium
  • High
  • Urgent

Additional features

  • Cover images
  • Slugs
  • Start dates
  • End dates

Task Management

Tasks support

  • Assignment
  • Reporters
  • Due dates
  • Priorities
  • Statuses
  • Attachments

Task Statuses

  • Todo
  • In Progress
  • In Review
  • Done
  • Cancelled

Comments

Each task supports

  • Unlimited comments
  • Attachments
  • Author tracking
  • Edit timestamps

Activity Feed

Every important action can be logged including

  • Creation
  • Updates
  • Deletion
  • Joining organizations
  • Leaving organizations
  • Comments

The project uses GenericForeignKey allowing activity logs to reference different models without duplicating code.

Architecture

User
 │
 ├─────────────── Owns
 │
 ▼
Organization
 │
 ├──────── Members
 │
 ▼
OrganizationMembership
 │
 ▼
Project
 │
 ▼
Task
 │
 ├──────── Comments
 │
 ▼
TaskComment

Activity
   │
   └──────── Generic relation to any object

Database Structure

accounts/
    User
    Organization
    OrganizationMembership

projects/
    Project

tasks/
    Task
    TaskComment

activity/
    Activity

Every application has its own

  • models
  • serializers
  • views
  • urls
  • admin
  • migrations

making the codebase easy to maintain.

Authentication

Authentication uses JWT.

Typical flow

Register

      ↓

Login

      ↓

Receive Access Token
Receive Refresh Token

      ↓

Attach Access Token

Authorization: Bearer <token>

      ↓

Access Protected Endpoints

Permission System

The API uses role-based permissions.

Role Create Projects Manage Members Create Tasks Delete Organization
Owner Yes Yes Yes Yes
Admin Yes Limited Yes No
Manager Limited No Yes No
Member No No Assigned Tasks No

Complete Workflow

1. Register

Create a user account.

2. Login

Receive JWT tokens.

3. Create Organization

Become the organization owner.

4. Invite Members

Assign

  • Admin
  • Manager
  • Member

5. Create Projects

Each organization can own multiple projects.

6. Create Tasks

Assign

  • Reporter
  • Assignee
  • Due Date
  • Priority

7. Members Collaborate

  • Update task status
  • Upload files
  • Leave comments

8. Activity Feed

Every important action becomes part of the organization history.

API Overview

Accounts

  • Registration
  • Login
  • Refresh Token
  • Profile
  • Update Profile

Organizations

  • Create
  • Retrieve
  • Update
  • Delete
  • Members
  • Invitations
  • Leave Organization

Projects

  • CRUD
  • Status updates
  • Priority updates
  • Cover images

Tasks

  • CRUD
  • Assign users
  • Upload attachments
  • Due dates
  • Status updates

Comments

  • Create
  • Update
  • Delete
  • Attachments

Activity

Read-only activity feed showing organization history.

Installation

Clone the repository

git clone https://github.com/zoanig/PMS

cd PMS

Create virtual environment

python -m venv .venv

Activate

Linux

source .venv/bin/activate

Windows

.venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Environment Variables

Rename

.env-sample

to

.env

Then configure all required environment variables before running the project.

Running the Project

Apply migrations

python manage.py migrate

Run server

python manage.py runserver

Project Structure

PMS/

accounts/
activity/
projects/
tasks/

media/

manage.py
requirements.txt
.env

Future Improvements

  • Notifications
  • Email invitations
  • Project analytics
  • Task labels
  • Task dependencies
  • Kanban board
  • Calendar integration
  • Time tracking
  • Audit exports
  • WebSocket notifications
  • Docker support
  • CI/CD pipeline
  • PostgreSQL deployment
  • Redis caching
  • Celery background jobs

Important Notes

Warning

This repository is backend-only. A frontend client is required to consume the API.

Warning

Configure the .env file before starting the application. Missing environment variables may prevent authentication or media handling from functioning correctly.

Warning

Seed commands are intended for development environments only and should not be executed on production databases.

Note

UUID primary keys are used throughout the project instead of integer IDs.

Note

API documentation is available through the integrated Swagger/OpenAPI endpoints after running the server.

Built with Django REST Framework following RESTful API design principles, modular architecture, serializer-driven validation, and scalable application design.

About

Django REST Framework backend for project management featuring organizations, projects, tasks, RBAC, JWT authentication, Swagger documentation, and scalable REST API architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages