Skip to content

About

A modern, full-stack task management and collaboration platform built with the MERN stack (MongoDB, Express, React, Node.js). Features include Kanban boards, real-time updates, project workspaces, and team collaboration tools.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TaskFlow - Full-Stack Task Management & Collaboration Application

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.

πŸš€ Features

Core Functionality

  • 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

πŸ› οΈ Tech Stack

Backend

  • 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

Frontend

  • 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

πŸ“¦ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • MongoDB (v5 or higher)
  • npm or yarn

1. Clone the Repository

git clone <repository-url>
cd TaskFlowTaskManagementApp

2. Backend Setup

cd backend

# Install dependencies
npm install

# Create .env file
cp .env.example .env

# Edit .env file with your configuration
nano .env

Configure environment variables in .env:

# Server Configuration
NODE_ENV=development
PORT=5000
CLIENT_URL=http://localhost:3000

# Database
MONGODB_URI=mongodb://localhost:27017/taskflow

# JWT Secrets (Generate secure random strings)
JWT_SECRET=your_super_secret_jwt_key_here
JWT_REFRESH_SECRET=your_refresh_secret_here
JWT_EXPIRE=7d
JWT_REFRESH_EXPIRE=30d

# OAuth - Google (Optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/api/auth/google/callback

# OAuth - GitHub (Optional)
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_CALLBACK_URL=http://localhost:5000/api/auth/github/callback

# Session Secret
SESSION_SECRET=your_session_secret_here

# File Upload
MAX_FILE_SIZE=10485760
UPLOAD_DIR=./uploads

Start MongoDB:

# If using local MongoDB
mongod

# Or use MongoDB Atlas (cloud) by updating MONGODB_URI in .env

Run the backend server:

# Development mode with auto-restart
npm run dev

# Production mode
npm start

The backend API will be available at http://localhost:5000

3. Frontend Setup

cd frontend

# Install dependencies
npm install

# Create .env file
echo "REACT_APP_API_URL=http://localhost:5000/api" > .env
echo "REACT_APP_SOCKET_URL=http://localhost:5000" >> .env

# Start the development server
npm start

The frontend will be available at http://localhost:3000

πŸ”§ Configuration

OAuth Setup (Optional)

Google OAuth

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Enable Google+ API
  4. Create OAuth 2.0 credentials
  5. Add authorized redirect URI: http://localhost:5000/api/auth/google/callback
  6. Copy Client ID and Client Secret to .env

GitHub OAuth

  1. Go to GitHub Developer Settings
  2. Create new OAuth App
  3. Set Authorization callback URL: http://localhost:5000/api/auth/github/callback
  4. Copy Client ID and Client Secret to .env

Email Service (Production)

For production, replace the mock email service with a real provider:

Option 1: SendGrid

npm install @sendgrid/mail

Option 2: Resend

npm install resend

Update backend/utils/emailService.js with your chosen provider.

Cloudinary Setup (Production File Storage)

  1. Sign up at Cloudinary
  2. Get your credentials from dashboard
  3. Add to .env:
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
  1. Update file upload middleware to use Cloudinary SDK

πŸ“ Project Structure

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

🎯 API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user
  • POST /api/auth/logout - Logout user
  • POST /api/auth/refresh-token - Refresh access token
  • GET /api/auth/me - Get current user
  • PUT /api/auth/profile - Update profile
  • PUT /api/auth/change-password - Change password
  • POST /api/auth/forgot-password - Request password reset
  • PUT /api/auth/reset-password/:token - Reset password
  • GET /api/auth/verify-email/:token - Verify email
  • GET /api/auth/google - Google OAuth
  • GET /api/auth/github - GitHub OAuth

Tasks

  • GET /api/tasks - Get all tasks (with filters)
  • GET /api/tasks/:id - Get single task
  • POST /api/tasks - Create task
  • PUT /api/tasks/:id - Update task
  • DELETE /api/tasks/:id - Delete task
  • PUT /api/tasks/:id/move - Move task (drag & drop)
  • POST /api/tasks/:id/attachments - Upload attachment

Health Check

  • GET /api/health - Server health status
  • GET /api/socket/status - Active socket ***s

πŸ” Security Features

  • 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)

🚦 Running in Production

Backend Deployment

cd backend

# Set environment to production
export NODE_ENV=production

# Install only production dependencies
npm install --production

# Start server
npm start

Or use PM2 for process management:

npm install -g pm2
pm2 start server.js --name taskflow-api
pm2 save
pm2 startup

Frontend Deployment

cd frontend

# Build for production
npm run build

# Serve with a static server
npx serve -s build

Or deploy to:

  • Vercel
  • Netlify
  • AWS S3 + CloudFront
  • Heroku

Database

For production, use:

  • MongoDB Atlas (managed cloud database)
  • AWS DocumentDB
  • Self-hosted MongoDB with replica sets

πŸ“ Environment Variables

Required

  • MONGODB_URI - Database *** string
  • JWT_SECRET - JWT signing secret
  • JWT_REFRESH_SECRET - Refresh token secret

Optional

  • GOOGLE_CLIENT_ID - For Google OAuth
  • GITHUB_CLIENT_ID - For GitHub OAuth
  • CLOUDINARY_* - For cloud file storage

πŸ§ͺ Testing

# Backend tests
cd backend
npm test

# Frontend tests
cd frontend
npm test

πŸ“Š Database Schema

Collections

  1. users - User accounts and authentication
  2. workspaces - Team workspaces
  3. projects - Projects within workspaces
  4. tasks - Individual tasks/cards
  5. comments - Task comments
  6. notifications - User notifications
  7. activitylogs - Audit trail
  8. templates - Project and task templates

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

πŸ‘₯ Support

For support, email support@taskflow.com or open an issue in the repository.

πŸŽ‰ Acknowledgments

  • Built with modern best practices
  • Inspired by Trello, Asana, and Notion
  • Uses industry-standard security measures

Happy Task Managing! πŸš€

About

A modern, full-stack task management and collaboration platform built with the MERN stack (MongoDB, Express, React, Node.js). Features include Kanban boards, real-time updates, project workspaces, and team collaboration tools.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages