A modern, full-stack task management application built with microservices architecture, featuring real-time notifications, role-based permissions, and a responsive React frontend.
- π Task Management: Create, update, delete, and organize tasks
- π₯ User Management: Role-based access control (Admin/User)
- π Real-time Notifications: Instant updates for task changes
- π― Advanced Filtering: Filter tasks by status, priority, due date, and assignee
- π± Responsive UI: Modern React frontend with dark mode support
- ποΈ Microservices: Scalable, independent service architecture
- π Secure Authentication: Token-based authentication system
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β API Gateway β β Microservices β
β (React) βββββΊβ (Nginx) βββββΊβ β
β Port: 3000 β β Port: 8000 β β Users: 8001 β
βββββββββββββββββββ ββββββββββββββββββββ β Tasks: 8002 β
β Notifications β
βββββββββββββββββββ ββββββββββββββββββββ β Port: 8003 β
β Databases β β Cache β βββββββββββββββββββ
β β β β
β Users DB β β Redis β
β Tasks DB β β (WebSocket) β
β Notifications β β β
β (PostgreSQL) β β β
βββββββββββββββββββ ββββββββββββββββββββ
- Framework: Django REST Framework
- Architecture: Microservices
- Database: PostgreSQL (3 separate instances)
- Cache: Redis
- WebSocket: Django Channels
- API Gateway: Nginx
- Containerization: Docker & Docker Compose
- Framework: Next.js 14 (React)
- Styling: Tailwind CSS
- State Management: React Context
- HTTP Client: Axios
- TypeScript: Full type safety
- Docker (v20.0+)
- Docker Compose (v2.0+)
- Node.js (v18+) - for frontend development
- Python (v3.11+) - for backend development
git clone <repository-url>
cd "Task Management Software"# Start all microservices
docker-compose up -d
# Wait for services to be ready (30-60 seconds)
docker-compose ps# Run migrations for each service
docker-compose exec users-service python manage.py migrate
docker-compose exec tasks-service python manage.py makemigrations tasks
docker-compose exec tasks-service python manage.py migrate
docker-compose exec notifications-service python manage.py makemigrations notifications
docker-compose exec notifications-service python manage.py migratedocker-compose exec users-service python manage.py createsuperusercd frontend
npm install
npm run dev- Frontend: http://localhost:3000
- API Gateway: http://localhost:8000/api/
- API Documentation: API_DOCUMENTATION.md
# Run API tests
python test_apis.pyTask Management Software/
βββ backend/
β βββ services/
β β βββ users-service/ # Authentication & user management
β β β βββ users/ # Django app
β β β βββ settings.py # Service configuration
β β β βββ manage.py # Django management
β β β βββ Dockerfile # Container definition
β β βββ tasks-service/ # Task CRUD & business logic
β β β βββ tasks/ # Django app
β β β βββ settings.py # Service configuration
β β β βββ asgi.py # WebSocket support
β β β βββ Dockerfile # Container definition
β β βββ notifications-service/ # Notification system
β β βββ notifications/ # Django app
β β βββ settings.py # Service configuration
β β βββ Dockerfile # Container definition
β βββ gateway/ # Nginx API Gateway
β βββ nginx.conf # Routing configuration
β βββ Dockerfile # Container definition
βββ frontend/ # Next.js React application
β βββ src/
β β βββ app/ # App router pages
β β βββ core/ # Shared utilities
β β βββ components/ # Reusable components
β βββ package.json # Dependencies
β βββ tailwind.config.js # Styling configuration
βββ docker-compose.yml # Service orchestration
βββ README.md # This file
βββ API_DOCUMENTATION.md # Complete API reference
All API requests go through the API Gateway at http://localhost:8000/api/
POST /auth/login/- User loginPOST /auth/logout/- User logoutGET /auth/verify/- Token verification
GET /tasks/- List tasks (with filtering)POST /tasks/- Create new taskGET /tasks/{id}/- Get specific taskPUT /tasks/{id}/- Update taskPATCH /tasks/{id}/- Partial updateDELETE /tasks/{id}/- Delete task
GET /notifications/- List user notificationsPATCH /notifications/{id}/- Mark as read
π Complete API Documentation: API_DOCUMENTATION.md
User {
id: Primary Key
username: Unique String
email: String
role: Enum(admin, user)
password: Hashed String
is_active: Boolean
date_joined: DateTime
last_login: DateTime
}Task {
id: Primary Key
title: String(200)
description: Text
priority: Enum(low, medium, high)
status: Enum(todo, in_progress, completed)
due_date: Date
assigned_user: Integer (User ID)
created_at: DateTime
updated_at: DateTime
}Notification {
id: Primary Key
user: Integer (User ID)
message: String(255)
is_read: Boolean
created_at: DateTime
}Authorization: Token your_token_here- π Token Validation: All services validate tokens with users service
- π€ Role-Based Access: Admin and user roles with appropriate permissions
- π‘οΈ CORS Protection: Configured for cross-origin requests
- π Request Logging: Comprehensive logging for debugging and monitoring
After running migrations, create users via Django admin or API:
- Admin: Full access to all resources
- User: Access only to assigned tasks
- π CRUD Operations: Create, read, update, delete tasks
- π― Advanced Filtering: Filter by status, priority, due date, assignee
- π Kanban Board: Visual task organization
- π Table View: Detailed task listing
- π Instant Notifications: Real-time updates for task changes
- π Auto-refresh: Periodic polling for updates
- π± Responsive UI: Works on desktop and mobile
- π Dark Mode: Built-in dark theme support
- π Secure Login: Token-based authentication
- π₯ Role Management: Admin and user permissions
- π± Mobile Friendly: Responsive design
- Polling: Frontend polls for notifications every 30 seconds
- Auto-notifications: Tasks automatically create notifications via Django signals
- Instant UI Updates: Optimistic updates for better UX
// Future WebSocket implementation
ws://localhost:8000/ws/notifications/
// Event format
{
"type": "notification",
"notification": {
"id": 1,
"message": "Task updated",
"is_read": false
}
}graph TD
A[Frontend] --> B[API Gateway]
B --> C[Users Service]
B --> D[Tasks Service]
B --> E[Notifications Service]
D --> C
E --> C
C --> F[Users DB]
D --> G[Tasks DB]
E --> H[Notifications DB]
D --> I[Redis]
E --> I
- π API Gateway: Single entry point, routes requests to appropriate services
- π Authentication Flow: Services validate tokens with users service
- π‘ Inter-service Communication: HTTP-based service-to-service calls
- πΎ Database Isolation: Each service has its own database
| Feature | Admin | User |
|---|---|---|
| View all tasks | β | β |
| View assigned tasks | β | β |
| Create tasks | β | β |
| Edit any task | β | β |
| Edit assigned tasks | β | β |
| Delete any task | β | β |
| Delete assigned tasks | β | β |
| View all notifications | β | β |
| View own notifications | β | β |
| User management | β | β |
- Level: DEBUG (development) / INFO (production)
- Format:
{levelname} {asctime} {module} {message} - Output: Console (Docker logs)
- Coverage: All microservices with individual log streams
# View all services
docker-compose logs -f
# View specific service
docker-compose logs -f users-service
docker-compose logs -f tasks-service
docker-compose logs -f notifications-service
docker-compose logs -f gateway# View service logs
docker-compose logs -f <service-name>
# Restart specific service
docker-compose restart <service-name>
# Scale services
docker-compose up --scale tasks-service=2
# Access service shell
docker-compose exec users-service bash
# Run Django commands
docker-compose exec users-service python manage.py shellcd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run type checking
npm run type-check# Create migrations
docker-compose exec <service> python manage.py makemigrations
# Apply migrations
docker-compose exec <service> python manage.py migrate
# Access database
docker-compose exec <db-service> psql -U postgres -d <database>- Environment Variables: Configure via
.envfiles - Database: Use managed PostgreSQL service
- Redis: Use managed Redis service
- SSL/TLS: Configure HTTPS in production
- Monitoring: Add application monitoring (e.g., Sentry)
- Backup: Implement database backup strategy
# Build production images
docker-compose -f docker-compose.prod.yml build
# Start production services
docker-compose -f docker-compose.prod.yml up -dServices not starting:
# Check service status
docker-compose ps
# View error logs
docker-compose logs <service-name>Database connection errors:
# Restart database services
docker-compose restart users-db tasks-db notifications-db
# Check database logs
docker-compose logs users-dbFrontend not connecting to API:
- Verify API Gateway is running on port 8000
- Check CORS configuration in backend services
- Ensure environment variables are set correctly
Port conflicts:
# Check what's using the ports
netstat -tulpn | grep :8000
# Stop conflicting services or change ports in docker-compose.ymlBuilt with β€οΈ using Django, React, and Docker