A comprehensive full-stack web application for tracking daily tasks, measuring productivity metrics, and visualizing performance through real-time analytics.
- Create, read, update, and delete tasks
- Task prioritization (low, medium, high, urgent)
- Task status tracking (todo, in progress, completed, cancelled)
- Due date management
- Recurring tasks support
- Task tagging system
- Estimated vs actual time tracking
- Real-time time tracking sessions
- Start, pause, and stop functionality
- Time duration calculation
- Session notes
- Daily productivity statistics
- Weekly performance comparison
- Monthly productivity overview
- Task completion rates
- Time efficiency analysis
- Productivity score calculation (0-100)
- Visual charts using Chart.js
- WebSocket support for live task updates
- Real-time synchronization across devices
- Instant productivity metric updates
- JWT-based authentication
- User registration and login
- Profile management
- User preferences (theme, timezone, notifications)
- Activity logging
- JWT token-based authentication
- Password hashing with bcrypt
- CSRF protection
- CORS configuration
- Input validation and sanitization
- Rate limiting
- Role-based access control
- Framework: Django 4.2 with Django REST Framework
- Database: PostgreSQL
- Authentication: JWT (Simple JWT)
- Real-time: Django Channels + Redis
- Task Queue: Celery
- API Documentation: Swagger/OpenAPI (drf-spectacular)
- Framework: React 18
- State Management: Zustand
- HTTP Client: Axios
- Routing: React Router v6
- Charts: Chart.js with react-chartjs-2
- Styling: Tailwind CSS
- Icons: React Icons
- Deployment: Docker, Docker Compose
- Web Server: Nginx
- ASGI Server: Daphne
- WSGI Server: Gunicorn
- Task Scheduler: Celery + Beat
- Caching: Redis
Productivity-Tracking-System/
├── backend/
│ ├── config/
│ │ ├── settings.py
│ │ ├── urls.py
│ │ ├── wsgi.py
│ │ └── asgi.py
│ ├── core/
│ │ ├── models.py (User, UserPreference, ActivityLog)
│ │ ├── views/
│ │ ├── serializers.py
│ │ └── urls/
│ ├── tasks/
│ │ ├── models.py (Task, TimeTrackingSession, DailyProductivityLog)
│ │ ├── views.py
│ │ ├── serializers.py
│ │ ├── consumers.py (WebSocket)
│ │ ├── routing.py
│ │ └── signals.py
│ ├── analytics/
│ │ ├── views.py
│ │ ├── serializers.py
│ │ └── urls.py
│ ├── requirements.txt
│ └── manage.py
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Layout/
│ │ │ ├── Task/
│ │ │ └── Analytics/
│ │ ├── pages/
│ │ ├── context/store.js
│ │ ├── services/
│ │ ├── App.js
│ │ └── index.js
│ ├── package.json
│ └── public/
└── docs/
├── API_DOCUMENTATION.md
└── SETUP_DEPLOYMENT.md
- Python 3.9+
- Node.js 16+
- PostgreSQL 12+
- Redis 6+
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your configuration
python manage.py migrate
python manage.py createsuperuser
python manage.py runservercd frontend
npm install
cp .env.example .env
# Edit .env with your API URL
npm startVisit http://localhost:3000 to access the application.
POST /api/auth/register/- Register new userPOST /api/auth/login/- User loginPOST /api/auth/logout/- User logoutPOST /api/auth/token/refresh/- Refresh JWT tokenPOST /api/auth/change-password/- Change password
GET /api/tasks/- List all tasksPOST /api/tasks/- Create taskGET /api/tasks/{id}/- Get task detailsPUT /api/tasks/{id}/- Update taskDELETE /api/tasks/{id}/- Delete taskPOST /api/tasks/{id}/mark_completed/- Mark task as completedGET /api/tasks/today/- Get today's tasksGET /api/tasks/overdue/- Get overdue tasks
POST /api/tasks/sessions/- Start time sessionPOST /api/tasks/sessions/{id}/stop/- Stop sessionGET /api/tasks/sessions/active/- Get active sessions
GET /api/analytics/metrics/- Get productivity metricsGET /api/analytics/daily/- Get daily statisticsGET /api/analytics/weekly/- Get weekly statisticsGET /api/analytics/monthly/- Get monthly statisticsGET /api/analytics/tasks/- Get task analytics
Score = (Completion Rate × 0.6) + (Time Efficiency × 0.4)
- Completion Rate: (Tasks Completed / Tasks Planned) × 100
- Time Efficiency: (Planned Time / Actual Time) × 100
WebSocket connection at /ws/tasks/ provides:
- Task status updates
- Productivity log changes
- Activity notifications
- User: Can manage own tasks and view own analytics
- Admin: Full system access
- Normalized design with proper foreign keys
- Indexes on frequently queried fields
- Unique constraints where appropriate
- Cascading deletes for data integrity
- Audit logging with ActivityLog model
✅ JWT token-based authentication ✅ Password hashing with Django's built-in system ✅ CSRF protection enabled ✅ CORS properly configured ✅ Input validation and sanitization ✅ SQL injection protection (ORM usage) ✅ XSS protection with React ✅ Rate limiting ready ✅ Secrets management via environment variables
- Database query optimization with
.select_related()and.prefetch_related() - Redis caching for frequently accessed data
- Pagination on all list endpoints
- Efficient WebSocket message handling
- Static file compression
- CDN-ready architecture
# Backend tests
cd backend
python manage.py test
# Frontend tests
cd frontend
npm test- Docker - Containerized deployment
- AWS EC2 - Traditional server deployment
- Azure App Service - Managed platform
- Heroku - Quick deployment (with minimal config)
- DigitalOcean - VPS deployment
See SETUP_DEPLOYMENT.md for detailed instructions.
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License.
For issues, questions, or feature requests:
- Check the API Documentation
- Review the Setup & Deployment Guide
- Open an issue on GitHub
- Mobile app (React Native)
- Advanced reporting and export
- Team collaboration features
- Integration with calendar (Google Calendar, Outlook)
- AI-powered productivity insights
- Habit tracking
- Goal setting and tracking
- Pomodoro timer integration
- Slack integration
- Email reminders