Delta18-Git/FocusHive

★ 0Forks 0JavaScriptGitHub ↗Compare

README

FocusHive

A full-stack MERN application for team collaboration and task management with real-time features.

Features

  • Authentication - JWT-based user registration and login
  • Team Management - Create teams and manage members
  • Task Management - CRUD operations with assignments and due dates
  • Kanban Board - Drag-and-drop interface with status columns
  • Calendar View - Visual timeline of task working periods
  • Real-time Chat - Socket.IO powered team messaging
  • Pomodoro Timer - Draggable timer with task tracking
  • Analytics - Performance metrics and insights
  • Dark Mode - Flexoki theme with light/dark toggle

Tech Stack

Backend: Node.js, Express, MongoDB, Socket.IO, JWT Frontend: React 19, Vite, React Router, Chart.js, FullCalendar, @dnd-kit

Quick Start

Prerequisites

  • Node.js v16+
  • MongoDB
  • npm

Backend Setup

cd backend
npm install
cp .env.example .env    # Configure your environment variables
npm run dev             # Runs on http://localhost:5000

Frontend Setup

cd frontend
npm install
cp .env.example .env    # Configure your environment variables
npm run dev             # Runs on http://localhost:5173

Environment Variables

Backend .env

PORT=6000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/team-collab
JWT_SECRET=your_jwt_secret_key_change_this_in_production
CLIENT_URL=http://localhost:5000

Frontend .env

VITE_API_URL=http://localhost:6000
VITE_SOCKET_URL=http://localhost:6000
VITE_USE_PROXY=true
VITE_PORT=5000

API Endpoints

Authentication

  • POST /api/users/register - Register user
  • POST /api/users/login - Login user
  • GET /api/users/profile - Get profile (Protected)
  • PUT /api/users/profile - Update profile (Protected)

Teams

  • POST /api/teams - Create team
  • GET /api/teams - Get user's teams
  • GET /api/teams/:id - Get team details
  • PUT /api/teams/:id - Update team (Owner only)
  • DELETE /api/teams/:id - Delete team (Owner only)
  • POST /api/teams/:id/members - Add member (Owner only)
  • DELETE /api/teams/:id/members/:memberId - Remove member (Owner only)

Tasks

  • POST /api/tasks - Create task
  • GET /api/tasks/:teamId - Get team tasks
  • GET /api/tasks/task/:id - Get task by ID
  • PUT /api/tasks/:id - Update task
  • PATCH /api/tasks/:id/status - Update status
  • DELETE /api/tasks/:id - Delete task

Analytics

  • GET /api/analytics/team/:teamId - Team analytics (Owner only)
  • GET /api/analytics/pomodoro/:teamId - Pomodoro stats
  • GET /api/analytics/completion/:teamId - Completion trends

Messages

  • GET /api/messages/:teamId - Get team messages

Pomodoro

  • POST /api/pomodoro - Save pomodoro session

Project Structure

Proj/
├── backend/
│   ├── controllers/      # Request handlers
│   ├── middleware/       # Auth middleware
│   ├── models/          # Mongoose schemas
│   ├── routes/          # API routes
│   ├── utils/           # Socket handler
│   └── server.js        # Entry point
│
└── frontend/
    └── src/
        ├── components/  # Reusable components
        ├── context/     # React Context (Auth, Theme)
        ├── pages/       # Page components
        ├── styles/      # CSS files
        ├── utils/       # API utilities
        └── App.jsx      # Main app

Usage

  1. Register/Login - Create an account
  2. Create Team - Set up your team
  3. Add Members - Invite by email
  4. Create Tasks - Add tasks with details and assignments
  5. Manage Tasks - Use list view, Kanban, or Calendar
  6. Chat - Real-time team communication
  7. Pomodoro - Track focused work sessions
  8. Analytics - View team performance metrics

Production Build

# Backend
cd backend
npm start

# Frontend
cd frontend
npm run build
npm run preview

License

ISC License

Acknowledgments

Built with React 19, Express.js, MongoDB, Socket.IO, Chart.js, FullCalendar, @dnd-kit, the Flexoki color palette, and the Lucide icon set.

Contributors

Delta18-Git

Issues