A modern, production-ready task management and collaboration platform similar to Trello, Notion, and Asana. Built with the MERN stack (MongoDB, Express.js, React.js, Node.js) with real-time collaboration features powered by Socket.io.
Complete Authentication System
- JWT-based authentication with access and refresh tokens
- OAuth integration (Google & GitHub)
- Email verification and password reset
- Session management
- Role-based access control (Admin, Manager, Member, Guest)
Workspace & Project Management
- Create and manage multiple workspaces
- Organize projects within workspaces
- Team collaboration with role-based permissions
- Project templates for quick setup
Advanced Task Management
- Drag-and-drop Kanban boards
- Multiple views: Kanban, List, Calendar, Timeline
- Task properties: title, description, priority, status, due dates
- Assignees, labels, and custom fields
- Checklists and subtasks
- Task dependencies
- Time tracking
Real-time Collaboration
- Live updates across all connected users
- Presence indicators (who's viewing/editing)
- Real-time comments and mentions
- Instant notifications
File Management
- Local file upload system
- Multiple file type support
- File attachments on tasks
- Organized storage by date
Notifications
- In-app notifications
- Mock email service (ready for production email integration)
- Customizable notification preferences
Analytics & Reporting
- Activity logs and audit trails
- Task completion metrics
- Team productivity insights
UI/UX Excellence
- Modern, clean corporate design
- Dark mode and light mode support
- Fully responsive (mobile, tablet, desktop)
- Smooth animations and transitions
- Toast notifications
- Loading states and skeletons
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT, Passport.js (Google OAuth, GitHub OAuth)
- Real-time: Socket.io
- File Upload: Multer
- Security: Helmet, CORS, Rate Limiting, bcryptjs
- Validation: express-validator
- Framework: React 18
- Styling: Tailwind CSS
- State Management: Context API
- Routing: React Router v6
- HTTP Client: Axios
- Real-time: Socket.io-client
- UI Components: Headless UI, Heroicons
- Drag & Drop: @dnd-kit
- Notifications: react-hot-toast
- Date Handling: date-fns
- Charts: Chart.js, react-chartjs-2
- Node.js (v16 or higher)
- MongoDB (v5 or higher)
- npm or yarn
git clone <repository-url>cd TaskFlowTaskManagementAppcd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env file with your configuration
nano .envConfigure environment variables in .env:
# Server ConfigurationNODE_ENV=developmentPORT=5000CLIENT_URL=http://localhost:3000# DatabaseMONGODB_URI=mongodb://localhost:27017/taskflow# JWT Secrets (Generate secure random strings)JWT_SECRET=your_super_secret_jwt_key_hereJWT_REFRESH_SECRET=your_refresh_secret_hereJWT_EXPIRE=7dJWT_REFRESH_EXPIRE=30d# OAuth - Google (Optional)GOOGLE_CLIENT_ID=your_google_client_idGOOGLE_CLIENT_SECRET=your_google_client_secretGOOGLE_CALLBACK_URL=http://localhost:5000/api/auth/google/callback# OAuth - GitHub (Optional)GITHUB_CLIENT_ID=your_github_client_idGITHUB_CLIENT_SECRET=your_github_client_secretGITHUB_CALLBACK_URL=http://localhost:5000/api/auth/github/callback# Session SecretSESSION_SECRET=your_session_secret_here# File UploadMAX_FILE_SIZE=10485760UPLOAD_DIR=./uploadsStart MongoDB:
# If using local MongoDB
mongod
# Or use MongoDB Atlas (cloud) by updating MONGODB_URI in .envRun the backend server:
# Development mode with auto-restart
npm run dev
# Production mode
npm startThe backend API will be available at http://localhost:5000
cd frontend
# Install dependencies
npm install
# Create .env fileecho"REACT_APP_API_URL=http://localhost:5000/api"> .env
echo"REACT_APP_SOCKET_URL=http://localhost:5000">> .env
# Start the development server
npm startThe frontend will be available at http://localhost:3000
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:5000/api/auth/google/callback - Copy Client ID and Client Secret to
.env
- Go to GitHub Developer Settings
- Create new OAuth App
- Set Authorization callback URL:
http://localhost:5000/api/auth/github/callback - Copy Client ID and Client Secret to
.env
For production, replace the mock email service with a real provider:
Option 1: SendGrid
npm install @sendgrid/mailOption 2: Resend
npm install resendUpdate backend/utils/emailService.js with your chosen provider.
- Sign up at Cloudinary
- Get your credentials from dashboard
- Add to
.env:
CLOUDINARY_CLOUD_NAME=your_cloud_nameCLOUDINARY_API_KEY=your_api_keyCLOUDINARY_API_SECRET=your_api_secret- Update file upload middleware to use Cloudinary SDK
taskflow/
├── backend/
│ ├── config/
│ │ ├── database.js # MongoDB ***
│ │ └── passport.js # Passport strategies
│ ├── controllers/
│ │ ├── authController.js # Authentication logic
│ │ └── taskController.js # Task CRUD operations
│ ├── models/
│ │ ├── User.js # User schema
│ │ ├── Workspace.js # Workspace schema
│ │ ├── Project.js # Project schema
│ │ ├── Task.js # Task schema
│ │ ├── Comment.js # Comment schema
│ │ ├── Notification.js # Notification schema
│ │ ├── ActivityLog.js # Activity log schema
│ │ └── Template.js # Template schema
│ ├── routes/
│ │ ├── authRoutes.js # Auth endpoints
│ │ └── taskRoutes.js # Task endpoints
│ ├── middleware/
│ │ ├── auth.js # JWT verification
│ │ ├── errorHandler.js # Global error handling
│ │ ├── validation.js # Input validation
│ │ └── upload.js # File upload handling
│ ├── socket/
│ │ └── index.js # Socket.io configuration
│ ├── utils/
│ │ ├── tokenUtils.js # JWT helpers
│ │ └── emailService.js # Email sending
│ ├── uploads/ # File storage directory
│ ├── .env.example # Environment template
│ ├── package.json
│ └── server.js # Main server file
1 ├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/
│ │ │ ├── LandingPage.js # Home page
│ │ │ ├── Login.js # Login page
│ │ │ ├── Register.js # Registration
│ │ │ ├── Dashboard.js # Main dashboard
│ │ │ ├── KanbanBoard.js # Kanban view
│ │ │ └── NotFound.js # 404 page
│ │ ├── context/
│ │ │ ├── AuthContext.js # Authentication state
│ │ │ ├── ThemeContext.js # Theme management
│ │ │ └── SocketContext.js# Socket.io ***
│ │ ├── services/
│ │ │ └── api.js # API client & endpoints
│ │ ├── styles/
│ │ │ └── index.css # Global styles
│ │ ├── App.js # Main app component
│ │ └── index.js # Entry point
│ ├── tailwind.config.js # Tailwind configuration
│ └── package.json
└── README.md
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userPOST /api/auth/refresh-token- Refresh access tokenGET /api/auth/me- Get current userPUT /api/auth/profile- Update profilePUT /api/auth/change-password- Change passwordPOST /api/auth/forgot-password- Request password resetPUT /api/auth/reset-password/:token- Reset passwordGET /api/auth/verify-email/:token- Verify emailGET /api/auth/google- Google OAuthGET /api/auth/github- GitHub OAuth
GET /api/tasks- Get all tasks (with filters)GET /api/tasks/:id- Get single taskPOST /api/tasks- Create taskPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete taskPUT /api/tasks/:id/move- Move task (drag & drop)POST /api/tasks/:id/attachments- Upload attachment
GET /api/health- Server health statusGET /api/socket/status- Active socket ***s
- JWT Authentication with access and refresh tokens
- Password Hashing using bcryptjs
- Input Validation with express-validator
- Rate Limiting to prevent brute-force attacks
- Helmet.js for security headers
- CORS configuration
- XSS Protection via input sanitization
- SQL/NoSQL Injection prevention via Mongoose
- File Upload Validation (type, size, extension)
cd backend
# Set environment to productionexport NODE_ENV=production
# Install only production dependencies
npm install --production
# Start server
npm startOr use PM2 for process management:
npm install -g pm2
pm2 start server.js --name taskflow-api
pm2 save
pm2 startupcd frontend
# Build for production
npm run build
# Serve with a static server
npx serve -s buildOr deploy to:
- Vercel
- Netlify
- AWS S3 + CloudFront
- Heroku
For production, use:
- MongoDB Atlas (managed cloud database)
- AWS DocumentDB
- Self-hosted MongoDB with replica sets
MONGODB_URI- Database *** stringJWT_SECRET- JWT signing secretJWT_REFRESH_SECRET- Refresh token secret
GOOGLE_CLIENT_ID- For Google OAuthGITHUB_CLIENT_ID- For GitHub OAuthCLOUDINARY_*- For cloud file storage
# Backend testscd backend
npm test# Frontend testscd frontend
npm test- users - User accounts and authentication
- workspaces - Team workspaces
- projects - Projects within workspaces
- tasks - Individual tasks/cards
- comments - Task comments
- notifications - User notifications
- activitylogs - Audit trail
- templates - Project and task templates
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
For support, email support@taskflow.com or open an issue in the repository.
- Built with modern best practices
- Inspired by Trello, Asana, and Notion
- Uses industry-standard security measures
Happy Task Managing! 🚀