A Trello-like task management application built with modern web technologies that enables real-time collaboration between multiple users.
- Real-time Collaboration: Multiple users can work simultaneously with instant updates
- Kanban Board: Drag-and-drop task management with customizable columns
- User Authentication: Secure JWT-based authentication system
- Project Management: Create and manage multiple projects with team collaboration
- Role-based Access: Admin and Member roles with different permissions
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- β Live task updates across all connected users
- β Real-time user presence indicators
- β Instant notifications for task changes
- β Live commenting system (optional)
- β Online/offline status tracking
- React 18 - Modern React with hooks and functional components
- Vite - Fast build tool and development server
- Tailwind CSS - Utility-first CSS framework
- Socket.io Client - Real-time bidirectional communication
- React Beautiful DnD - Drag and drop functionality
- Lucide React - Beautiful, customizable icons
- Node.js - JavaScript runtime environment
- Express.js - Fast, unopinionated web framework
- Socket.io - Real-time WebSocket communication
- MongoDB - NoSQL database for flexible data storage
- Mongoose - MongoDB object modeling for Node.js
- JWT - JSON Web Tokens for authentication
- Bcrypt - Password hashing library
- Docker - Containerization for consistent development
- GitHub Actions - CI/CD pipeline automation
- Vercel - Frontend deployment and hosting
- Render - Backend API deployment
- MongoDB Atlas - Cloud database hosting
realtime-task-manager/
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ auth/ # Authentication components
β β β βββ board/ # Task board components
β β β βββ dashboard/ # Dashboard components
β β β βββ layout/ # Layout components
β β β βββ common/ # Common UI components
β β βββ context/ # React Context providers
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ services/ # API service functions
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
βββ server/ # Node.js backend application
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middleware/ # Express middleware
β βββ models/ # Mongoose schemas
β βββ routes/ # API routes
β βββ socket/ # Socket.io handlers
β βββ utils/ # Backend utilities
β βββ package.json # Backend dependencies
βββ docker-compose.yml # Docker composition file
βββ .github/ # GitHub Actions workflows
βββ README.md # Project documentation
- Node.js (v18 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas account)
- Git
-
Clone the repository
git clone <repository-url> cd realtime-task-manager
-
Backend Setup
cd server npm install cp .env.example .env # Configure your environment variables in .env npm run dev
-
Frontend Setup
cd client npm install cp .env.example .env # Configure your environment variables in .env npm run dev
-
Docker Setup (Alternative)
docker-compose up -d
# Server Configuration
NODE_ENV=development
PORT=5000
# Database
MONGO_URI=mongodb://localhost:27017/realtime_task_manager
# JWT Authentication
JWT_SECRET=your-super-secret-jwt-key-change-in-production
JWT_EXPIRE=30d
# CORS
CORS_ORIGIN=http://localhost:5173
# Optional: Email Service (for notifications)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password# API Configuration
VITE_API_URL=http://localhost:5000/api
VITE_SOCKET_URL=http://localhost:5000
# Optional: Analytics
VITE_GA_TRACKING_ID=your-google-analytics-idPOST /api/auth/register - Register new user
POST /api/auth/login - User login
GET /api/auth/me - Get current user
POST /api/auth/logout - User logout
GET /api/projects - Get all user projects
POST /api/projects - Create new project
GET /api/projects/:id - Get project details
PUT /api/projects/:id - Update project
DELETE /api/projects/:id - Delete project
POST /api/projects/:id/members - Add member to project
DELETE /api/projects/:id/members/:userId - Remove member
GET /api/tasks - Get all tasks (filterable)
POST /api/tasks - Create new task
GET /api/tasks/:id - Get single task details
PUT /api/tasks/:id - Update task
DELETE /api/tasks/:id - Delete task
PATCH /api/tasks/:id/move - Move task between columns
PATCH /api/tasks/:id/assign - Assign task to user
GET /api/tasks/recent - Get recent tasks
GET /api/tasks/project/:projectId - Get project tasks
GET /api/users - Get all users
GET /api/users/profile - Get user profile
PUT /api/users/profile - Update user profile
PUT /api/users/change-password - Change password
POST /api/users/avatar - Upload avatar
GET /api/users/online - Get online users
GET /api/notifications - Get user notifications
GET /api/notifications/unread - Get unread count
PUT /api/notifications/:id/read - Mark notification as read
PUT /api/notifications/read-all - Mark all as read
DELETE /api/notifications/:id - Delete notification
// Join/Leave project rooms
socket.emit('join-project', { projectId, userId })
socket.emit('leave-project', { projectId, userId })
// Task operations
socket.emit('task-created', taskData)
socket.emit('task-updated', { taskId, updates })
socket.emit('task-deleted', { taskId })
socket.emit('task-moved', { taskId, newStatus })
// User presence
socket.emit('user-online', { userId, username })
socket.emit('user-offline', { userId })// Task notifications
socket.on('task-created', (task) => { /* Update UI */ })
socket.on('task-updated', (task) => { /* Update UI */ })
socket.on('task-deleted', (taskId) => { /* Remove from UI */ })
socket.on('task-moved', (task) => { /* Update board */ })
// User presence
socket.on('user-online', (user) => { /* Show online status */ })
socket.on('user-offline', (userId) => { /* Show offline status */ })
// Notifications
socket.on('notification', (notification) => { /* Show toast */ })socket.on('connect', () => console.log('Connected to server'))
socket.on('disconnect', () => console.log('Disconnected'))
socket.on('error', (error) => console.error('Socket error:', error))cd server
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage reportcd client
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report-
Authentication Flow
- Register new user
- Login with credentials
- Verify JWT token storage
- Test protected routes
-
Real-time Features
- Open app in two browser windows
- Create/update/delete tasks in one window
- Verify instant updates in second window
-
Drag and Drop
- Test task movement between columns
- Verify position persistence
- Check real-time sync
Import the Postman collection:
- Open Postman
- Import β Upload Files
- Select
/docs/postman-collection.json - Configure environment variables
- Run collection tests
- GitHub account
- Vercel account (free tier)
- Render account (free tier)
- MongoDB Atlas account (free M0 cluster)
- Create account at MongoDB Atlas
- Create free M0 cluster (512MB storage)
- Create database user with password
- Network Access β Add IP:
0.0.0.0/0(allow all) - Get connection string:
mongodb+srv://username:password@cluster.mongodb.net/dbname
- Push code to GitHub
- Go to Render Dashboard
- New β Web Service
- Connect GitHub repository
- Configure:
- Name:
realtime-task-manager-api - Environment:
Node - Build Command:
cd server && npm install - Start Command:
cd server && npm start - Instance Type: Free
- Name:
- Add environment variables:
NODE_ENV=production MONGO_URI=<your-mongodb-atlas-uri> JWT_SECRET=<generate-random-secret> CORS_ORIGIN=https://your-frontend.vercel.app PORT=10000 - Create Web Service
- Note your backend URL:
https://realtime-task-manager-api.onrender.com
- Push code to GitHub
- Go to Vercel Dashboard
- New Project β Import Git Repository
- Select your repository
- Configure:
- Framework Preset: Vite
- Root Directory:
client - Build Command:
npm run build - Output Directory:
dist
- Add environment variables:
VITE_API_URL=https://realtime-task-manager-api.onrender.com/api VITE_SOCKET_URL=https://realtime-task-manager-api.onrender.com - Deploy
- Your app is live at:
https://your-app.vercel.app
- Update CORS in backend
.env:CORS_ORIGIN=https://your-app.vercel.app - Test real-time features with multiple browser windows
- Monitor logs in Render dashboard
- Set up custom domain (optional)
- Automatic: Push to
mainbranch triggers deployment - Manual: Use dashboard to redeploy
- Preview: Pull requests create preview deployments on Vercel
- β Environment variables configured
- β MongoDB Atlas connection working
- β CORS properly configured
- β JWT secret is secure and random
- β Socket.IO connects successfully
- β All API endpoints functional
- β Real-time updates working
- β Error handling in place
- β Logs monitored
- Day 1: Project setup, authentication, and basic API
- Day 2: Frontend setup, authentication UI, and dashboard
- Day 3: Task management and board implementation
- Day 4: Real-time features and Socket.io integration
- Day 5: Testing, deployment, and documentation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Developer: [Your Name]
- Project Type: Academic Full-Stack Development Project
- Duration: 5 Days
- Technologies: React, Node.js, MongoDB, Socket.io
For support and questions, please open an issue in the GitHub repository.
1. Port Already in Use
# Find process using port
lsof -i :5000
# Kill the process
kill -9 <PID>2. MongoDB Connection Failed
- Verify MongoDB is running:
sudo systemctl status mongod - Check connection string in
.env - Ensure network access in MongoDB Atlas
3. Socket.IO Connection Error
- Check CORS configuration
- Verify Socket.IO URLs match backend
- Check browser console for errors
4. Docker Issues
# Reset Docker environment
docker-compose down -v
docker-compose up --build5. Module Not Found Errors
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm installEnable debug logging:
# Backend
DEBUG=* npm run dev
# Check logs
docker-compose logs -f backend- Deployment Guide - Complete deployment instructions
- Deployment Checklist - Step-by-step checklist
- Performance Report - Optimization details
This application is production-ready and can be deployed on:
- Frontend:
- Backend: Deploy on Render or Deploy on Railway
- Database: MongoDB Atlas Free Tier
- π Complete Deployment Guide - Full step-by-step instructions
- β Deployment Checklist - Ensure nothing is missed
- π§ Environment Variables - Configuration templates
- Vercel:
client/vercel.jsonβ - Render:
render.yamlβ - Railway:
railway.jsonβ - Docker:
docker-compose.prod.ymlβ
Estimated Deployment Time: 30-45 minutes
Live Demo: Coming Soon
Test Account:
- Register your own account to try all features
- Admin features available after registration
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/YourFeature - Commit changes:
git commit -m 'Add YourFeature' - Push to branch:
git push origin feature/YourFeature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with modern web technologies and best practices
- Implements key software engineering concepts:
- Event-Driven Architecture
- Real-time Communication (WebSockets)
- RESTful API Design
- JWT Authentication
- Role-Based Access Control (RBAC)
- Responsive Design Principles
- Component-Based Architecture
- State Management with Context API
β Star this repository if you found it helpful!
π Built with β€οΈ for collaborative productivity
π Ready for production deployment!