TaskPilot - Full-Stack Task Management Platform
A comprehensive task management platform built with Django REST Framework and React, featuring real-time updates, advanced filtering, and seamless user experience.
Tech Stack
Backend
- Django 4.2+ with Django REST Framework
- MongoDB for flexible document storage
- JWT Authentication for secure sessions
- Django Channels for real-time WebSocket communication
- Celery for background task processing
Frontend
- React 18 with TypeScript
- Material-UI for responsive design
- React Query for API state management
- WebSocket for real-time updates
- React Router for navigation
Features
- User authentication and authorization
- Real-time task updates across all users
- Advanced task filtering and sorting
- Progress tracking with visual indicators
- Responsive design for all devices
- Task assignment and collaboration
- Activity logging and audit trails
- Notification system with preferences
- Task templates and bulk operations
Project Structure
TaskPilot/ ├── backend/ # Django backend │ ├── taskpilot/ # Main Django project │ ├── apps/ # Django applications │ │ ├── users/ # User management │ │ ├── tasks/ # Task management │ │ └── notifications/ # Real-time notifications │ └── requirements.txt # Python dependencies ├── frontend/ # React frontend │ ├── src/ # Source code │ │ ├── components/ # React components │ │ ├── pages/ # Page components │ │ ├── services/ # API services │ │ └── hooks/ # Custom hooks │ ├── package.json # Node dependencies │ └── public/ # Static assets └── README.md # This file
Quick Start
Backend Setup
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverFrontend Setup
cd frontend
npm install
npm startPrerequisites
- Python 3.8 or higher
- Node.js 16 or higher
- MongoDB
- Redis
API Endpoints
Authentication
- POST /api/auth/register/ - User registration
- POST /api/auth/login/ - User login
- POST /api/auth/refresh/ - Token refresh
- POST /api/auth/logout/ - User logout
Tasks
- GET /api/tasks/ - List all tasks
- POST /api/tasks/ - Create new task
- GET /api/tasks/{id}/ - Get task details
- PUT /api/tasks/{id}/ - Update task
- DELETE /api/tasks/{id}/ - Delete task
Notifications
- GET /api/notifications/ - List notifications
- POST /api/notifications/preferences/ - Update preferences
Real-time
- WS /ws/tasks/ - WebSocket for real-time updates
Development Setup
- Clone the repository
- Install backend dependencies: cd backend pip install -r requirements.txt
- Install frontend dependencies: cd frontend npm install
- Configure environment variables in backend/.env
- Run database migrations: python manage.py migrate
- Start the backend server: python manage.py runserver
- Start the frontend development server: npm start
Configuration
Backend Configuration Create a .env file in the backend directory with the following variables:
- SECRET_KEY=your-secret-key
- DEBUG=True
- MONGODB_NAME=taskpilot_db
- MONGODB_HOST=mongodb://localhost:27017/
- REDIS_URL=redis://localhost:6379
Frontend Configuration The frontend will automatically connect to the backend running on localhost:8000. For production deployment, update the API URL in the environment variables.
Database Schema
The application uses MongoDB with the following main collections:
- users: User accounts and profiles
- tasks: Task information and metadata
- task_comments: Comments on tasks
- task_activities: Activity logs for tasks
- notifications: User notifications
- notification_preferences: User notification settings
Security Features
- JWT-based authentication with refresh tokens
- Password hashing and validation
- CORS configuration for API access
- Input validation and sanitization
- Permission-based access control
- Secure file upload handling
Deployment
For production deployment:
- Set DEBUG=False in environment variables
- Configure proper database credentials
- Set up reverse proxy (nginx)
- Use production WSGI server (gunicorn)
- Configure static file serving
- Set up SSL certificates
Testing
Run backend tests:
cd backend
python manage.py testRun frontend tests:
cd frontend
npm testContributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
Troubleshooting
Common Issues:
- MongoDB connection errors: Ensure MongoDB is running on port 27017
- Redis connection errors: Ensure Redis is running on port 6379
- CORS errors: Check backend CORS settings
- WebSocket connection issues: Verify Django Channels configuration
License
MIT License - feel free to use this project for learning and development purposes.