Skip to content

navjot0079/TaskSphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Task Manager SaaS - Production Ready

A complete, production-ready Task Manager SaaS application with modern UI, real-time features, and scalable architecture.

πŸš€ Features

Core Features

  • βœ… Authentication - JWT + Refresh Tokens, Email OTP Verification
  • πŸ“Š Dashboard - Analytics, Charts, Activity Feed
  • ✏️ Task Management - CRUD, Kanban, Calendar, Gantt, Time Tracking
  • πŸ“ Projects - Team Collaboration, Progress Tracking
  • πŸ’¬ Real-time Chat - WebSocket-powered messaging
  • πŸ”” Notifications - Real-time alerts, Email reminders
  • πŸ“‚ File Manager - Upload, Download, Preview
  • πŸ‘€ Profile Management - Avatar, Settings, Theme
  • πŸ›‘οΈ Admin Panel - RBAC, User Management, Analytics
  • 🎨 Modern UI - Tailwind CSS, Framer Motion animations
  • πŸŒ“ Dark/Light Theme - Toggle between themes

Advanced Features

  • πŸ€– AI Task Suggestions
  • ⏱️ Pomodoro Timer
  • πŸ“ˆ Productivity Scoring
  • πŸ“ Activity Logs
  • πŸ“± PWA Support
  • 🎭 Micro-animations
  • πŸ’€ Loading Skeletons

πŸ“‹ Tech Stack

Frontend

  • React 18 (Vite)
  • Tailwind CSS
  • Framer Motion
  • Lucide React Icons
  • Recharts
  • Socket.io-client
  • Axios

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • JWT Authentication
  • Socket.io
  • Nodemailer
  • Multer
  • Bcrypt

πŸ› οΈ Installation

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (local or Atlas)
  • npm or yarn

Quick Start

  1. Clone the repository

    cd Task_Manager
  2. Install all dependencies

    npm run install-all
  3. Configure environment variables

    Create backend/.env:

    PORT=5000
    MONGODB_URI=mongodb://localhost:27017/taskmanager
    JWT_SECRET=your_super_secret_jwt_key_change_this
    JWT_REFRESH_SECRET=your_super_secret_refresh_key_change_this
    JWT_EXPIRES_IN=15m
    JWT_REFRESH_EXPIRES_IN=7d
    
    # Email Configuration (Gmail example)
    EMAIL_HOST=smtp.gmail.com
    EMAIL_PORT=587
    EMAIL_USER=your-email@gmail.com
    EMAIL_PASSWORD=your-app-specific-password
    EMAIL_FROM=TaskManager <noreply@taskmanager.com>
    
    # Frontend URL
    FRONTEND_URL=http://localhost:5173
    
    # File Upload
    MAX_FILE_SIZE=10485760
    UPLOAD_PATH=./uploads
    
    # Node Environment
    NODE_ENV=development

    Create frontend/.env:

    VITE_API_URL=http://localhost:5000/api
    VITE_SOCKET_URL=http://localhost:5000
  4. Start the application

    npm run dev

    This starts both frontend (http://localhost:5173) and backend (http://localhost:5000)

πŸ“ Project Structure

Task_Manager/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/          # Database, email config
β”‚   β”œβ”€β”€ controllers/     # Request handlers
β”‚   β”œβ”€β”€ middleware/      # Auth, RBAC, error handling
β”‚   β”œβ”€β”€ models/          # Mongoose schemas
β”‚   β”œβ”€β”€ routes/          # API routes
β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”œβ”€β”€ utils/           # Helper functions
β”‚   β”œβ”€β”€ uploads/         # File storage
β”‚   └── server.js        # Entry point
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/  # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/       # Page components
β”‚   β”‚   β”œβ”€β”€ services/    # API calls
β”‚   β”‚   β”œβ”€β”€ utils/       # Helpers
β”‚   β”‚   β”œβ”€β”€ hooks/       # Custom hooks
β”‚   β”‚   β”œβ”€β”€ context/     # React Context
β”‚   β”‚   └── App.jsx      # Root component
β”‚   └── public/          # Static assets
β”‚
└── package.json         # Root package file

πŸ” Authentication

User Roles

  • Admin - Full system access
  • Manager - Team and project management
  • User - Standard access

Default Credentials (Development)

Admin:
Email: admin@taskmanager.com
Password: Admin@123

Manager:
Email: manager@taskmanager.com
Password: Manager@123

User:
Email: user@taskmanager.com
Password: User@123

πŸ“‘ API Documentation

Base URL: http://localhost:5000/api

Authentication Endpoints

  • POST /auth/register - Register new user
  • POST /auth/login - Login
  • POST /auth/verify-otp - Verify email OTP
  • POST /auth/forgot-password - Request password reset
  • POST /auth/reset-password - Reset password
  • POST /auth/refresh-token - Refresh access token

Task Endpoints

  • GET /tasks - Get all tasks
  • POST /tasks - Create task
  • GET /tasks/:id - Get task by ID
  • PUT /tasks/:id - Update task
  • DELETE /tasks/:id - Delete task

Project Endpoints

  • GET /projects - Get all projects
  • POST /projects - Create project
  • GET /projects/:id - Get project details
  • PUT /projects/:id - Update project
  • DELETE /projects/:id - Delete project

[More endpoints in API documentation...]

🎨 UI Components

Reusable Components

  • Button, Input, Select, Textarea
  • Modal, Drawer, Dialog
  • Toast notifications
  • Loading skeletons
  • Charts (Bar, Line, Pie, Area)
  • Kanban board
  • Calendar view
  • Gantt chart
  • File uploader
  • Avatar
  • Badge, Card, Tabs

πŸ”Œ WebSocket Events

Client Events

  • join_room - Join task/project room
  • send_message - Send chat message
  • typing - Typing indicator
  • task_update - Broadcast task update

Server Events

  • message - New message received
  • notification - New notification
  • user_status - User online/offline
  • task_updated - Task was updated

πŸ§ͺ Testing

# Run backend tests
cd backend
npm test

# Run frontend tests
cd frontend
npm test

πŸš€ Deployment

πŸ“¦ Production Deployment

This application is PRODUCTION-READY with configurations for:

  • βœ… Frontend: Vercel (React + Vite)
  • βœ… Backend: Railway/Render (Node.js + Express + WebSocket)
  • βœ… Database: MongoDB Atlas (Cloud)

Quick Deploy

Option 1: Automated Deployment

# Frontend to Vercel
cd frontend
npm install
vercel --prod

# Backend to Railway
cd backend
npm install
railway login
railway init
railway up

Option 2: Manual Configuration See πŸ“– DEPLOYMENT.md for complete step-by-step guide including:

  • Environment variable setup
  • Security best practices
  • Testing procedures
  • Troubleshooting guide

Pre-Deployment Checklist

  • Update JWT secrets (use openssl rand -base64 32)
  • Configure production MongoDB URI
  • Set up email credentials (Gmail App Password)
  • Update CORS origins
  • Test builds locally
  • Review FIXES.md for known issues

Deployment Scripts

See DEPLOY-SCRIPTS.md for:

  • Quick deploy commands
  • Health check scripts
  • Rollback procedures
  • CI/CD configuration

Important Notes

⚠️ WebSocket Requirement: Backend MUST be deployed on a platform that supports persistent WebSocket connections (Railway, Render, Heroku). Vercel serverless functions do NOT support Socket.IO.

Environment Variables

Critical production environment variables:

  • MONGODB_URI - Production database
  • JWT_SECRET - Secure token secret
  • FRONTEND_URL - Your Vercel URL
  • EMAIL_PASSWORD - App-specific password

See .env.example files in frontend/ and backend/ directories.

πŸ“ License

MIT License - feel free to use this project for learning or commercial purposes.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“§ Support

For issues or questions, please open an issue on GitHub.


Built with ❀️ using React, Node.js, and MongoDB

About

Task Management Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages