The Project Planner API is a Django-based application designed for managing projects, tasks, subscriptions, and notifications. It provides a robust backend solution that supports user authentication, project and task management, real-time notifications, and an admin dashboard for comprehensive oversight. This API is built with scalability and performance in mind, making it suitable for various project management needs.
- User Authentication with JWT: Secure user authentication using JSON Web Tokens (JWT).
- Project Management: Create, update, delete, and manage projects with assigned members.
- Task Management with Comments: Manage tasks, including comments and status updates.
- Subscription Management: Handle user subscriptions and payment integrations.
- Real-time Notifications: Send and receive real-time notifications using WebSockets.
- Admin Dashboard: Comprehensive admin interface for managing users, projects, tasks, and subscriptions.
- API Documentation with Swagger/ReDoc: Detailed API documentation for easy integration.
- Filters: Advanced filtering options for projects, tasks, and notifications.
- Searching: Full-text search functionality across projects, tasks, and users.
- Pagination: Paginated responses for large datasets to improve performance.
- Throttling: Rate limiting to prevent abuse and ensure fair usage of the API.
- Project Invitations via Email: Invite users to join a project via email. Registered users can join directly by clicking the link, while unregistered users will be prompted to register first and then automatically join the project.
project_planner/
├── apps/
│ ├── admins/
│ ├── notifications/
│ ├── projects/
│ ├── subscriptions/
│ ├── tasks/
│ └── users/
├── core/
│ ├── permissions.py
│ ├── signals.py
│ ├── tasks.py
│ └── services/
│ └── mail_service.py
├── media/
├── static/
├── templates/
├── .gitignore
├── generate_keys.py
├── manage.py
├── Project Planner API.yaml
└── requirements.txt
-
Clone the repository
git clone https://github.com/NAHIAN-19/project_planner.git cd project_planner
-
Set up a virtual environment
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies
pip install -r requirements.txt
To set up the environment variables, run the following command to generate a .env
file:
python generate_keys.py
Make sure to update the .env
file with your Redis password, email settings, and Stripe keys.
- Install Redis
sudo apt-get install redis-server
- Start Redis
redis-server
- Install Redis
brew install redis
- Start Redis
redis-server
- Install Redis: Follow the instructions from the Redis for Windows repository.
- Start Redis: Run the Redis server executable.
-
Run Celery Worker (Terminal - 2)
celery -A project_planner worker --loglevel=info
-
Run Celery Beat (Terminal - 3)
celery -A project_planner beat --loglevel=info
-
Create Migrations
python manage.py makemigrations
-
Apply Migrations
python manage.py migrate
To run the application, use the following command:
python manage.py runserver
The API documentation is available at:
- Swagger UI:
/api/v1/schema/swagger-ui/
- ReDoc:
/api/v1/schema/redoc/
User Management
-
POST /api/v1/users/register/
- User registration- Request Body:
{ "username": "abc", "email": "[email protected]", "password": "project123", "password2": "project123" }
- Response:
{ "message": "Registration successful. Please verify your email.", "email": "[email protected]" }
- Request Body:
-
POST /api/v1/users/login/
- User login- Request Body:
{ "username": "abc", "password": "project123" }
- Response:
{ "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "username": "abc", "email": "[email protected]", "role": "user" }
- Request Body:
-
POST /api/v1/users/logout/
- User logout- Response:
{ "message": "Logged out successfully" }
- Response:
-
POST /api/v1/users/otp/verify/
- Verify OTP for registration- Request Body:
{ "email": "[email protected]", "otp": "726729", "purpose": "REGISTRATION" }
- Response:
{ "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "username": "abc", "email": "[email protected]", "role": "user" }
- Request Body:
-
GET/PUT /api/v1/users/profile/
- User profile management
Project Management
-
GET/POST /api/v1/admins/projects/
- List/Create projects- Request Body:
{ "name": "New Project", "description": "Project description", "members": [2] }
- Response:
{ "id": 1, "name": "New Project", "description": "Project description", "created_at": "2024-12-21T22:42:26.389065+06:00", "total_tasks": 0, "status": "not_started", "due_date": "2024-12-31T00:00:00+06:00", "total_member_count": 1, "owner": { "id": 1, "username": "abc" }, "members": [ { "id": 1, "user": "abc", "joined_at": "2024-12-21T22:42:41.135085+06:00", "membership_url": "http://127.0.0.1:8000/api/v1/projects/memberships/1/", "role": "owner" }, { "id": 2, "user": "jhon", "joined_at": "2024-12-21T22:42:41.145085+06:00", "membership_url": "http://127.0.0.1:8000/api/v1/projects/memberships/2/", "role": "owner" } ] }
- Request Body:
-
GET/PUT/DELETE /api/v1/admins/projects/{id}/
- Retrieve/Update/Delete project
Task Management
-
GET /api/v1/tasks/
- List tasks- Response:
{ "count": 3, "next": null, "previous": null, "results": [ { "id": 1, "name": "task001", "due_date": "2026-01-01T00:00:00+06:00", "status": "completed" }, { "id": 2, "name": "task002", "due_date": "2025-01-10T19:38:50+06:00", "status": "overdue" }, { "id": 3, "name": "task003", "due_date": null, "status": "not_started" } ] }
- Response:
-
GET/PUT/DELETE /api/v1/tasks/{id}/
- Retrieve/Update/Delete task
For support, please open an issue in the GitHub repository.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix (
git checkout -b feature/YourFeature
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push your changes (
git push origin feature/YourFeature
). - Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.