Skip to content

Latest commit

ย 

History

History
385 lines (294 loc) ยท 14.8 KB

File metadata and controls

385 lines (294 loc) ยท 14.8 KB

IssueDesk - Engineer Assignment System ๐Ÿฆธโ€โ™‚๏ธ

A Power Rangers themed Issue Tracking & Engineer Assignment System

Node.js React MongoDB Socket.io


๐ŸŽฏ Problem Statement-9(Zordon-Ops)

A web-based issue management system where users (Rangers) can raise issues, admins can assign engineers, and engineers can track and resolve issues with SLA compliance. Each department is themed after Power Rangers colors (RED, BLUE, GREEN, YELLOW, PINK, BLACK).


โœจ Features

Core Features

  • ๐Ÿ” Authentication - JWT-based auth with role-based access (Ranger, Engineer, Admin)
  • ๐Ÿ“ Issue Management - Create, view, update, delete issues with priority levels
  • ๐Ÿ‘ท Engineer Assignment - Admin assigns issues to engineers with workload balancing
  • โฑ๏ธ SLA Timers - Automatic due date calculation with breach detection
  • ๐Ÿ’ฌ Real-time Comments - Socket.io powered discussion on tickets
  • ๐Ÿ“Š Role-based Dashboards - Unique dashboards for each role with statistics
  • ๐ŸŽจ Department Theming - Dynamic Power Rangers color themes

Technical Features

  • ๐Ÿ”„ Real-time updates with Socket.io
  • ๐Ÿช Secure httpOnly cookie authentication
  • ๐Ÿ” Automatic token refresh (access: 15min, refresh: 7 days)
  • ๐Ÿ“ฑ Fully responsive design
  • ๐Ÿ›ก๏ธ Protected routes with role-based access control
  • ๐Ÿ’พ Session persistence with Redux Persist

๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Purpose
React 19 UI Framework
Vite Build Tool
Redux Toolkit State Management
Redux Persist Session Persistence
React Router v7 Routing
Socket.io Client Real-time Communication
Tailwind CSS v4 Styling
Axios HTTP Client
Recharts Dashboard Charts

Backend

Technology Purpose
Node.js Runtime
Express Web Framework
MongoDB + Mongoose Database
Socket.io Real-time Server
JWT Authentication
bcryptjs Password Hashing

๐Ÿ—๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         CLIENT (React)                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚  โ”‚  Ranger  โ”‚  โ”‚ Engineer โ”‚  โ”‚  Admin   โ”‚  โ”‚ Profile Drawer   โ”‚โ”‚
โ”‚  โ”‚Dashboard โ”‚  โ”‚Dashboard โ”‚  โ”‚Dashboard โ”‚  โ”‚ (All Roles)      โ”‚โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ”‚         โ”‚            โ”‚            โ”‚                โ”‚            โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ”‚
โ”‚                            โ”‚                                     โ”‚
โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”‚
โ”‚              โ”‚    Redux Store + Persist   โ”‚                      โ”‚
โ”‚              โ”‚  (Auth, Tickets, Comments) โ”‚                      โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ”‚
โ”‚                            โ”‚                                     โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                 โ”‚
โ”‚         โ”‚          Axios + Socket.io          โ”‚                 โ”‚
โ”‚         โ”‚   (Auto token refresh interceptor)  โ”‚                 โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                     โ•โ•โ•โ•โ•โ•โ•โ•โ•ชโ•โ•โ•โ•โ•โ•โ•โ• HTTP + WebSocket
                             โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     SERVER (Express)                             โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                 โ”‚
โ”‚         โ”‚         Express + Socket.io          โ”‚                 โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
โ”‚                            โ”‚                                     โ”‚
โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”‚
โ”‚    โ”‚           โ”‚           โ”‚           โ”‚           โ”‚            โ”‚
โ”‚ โ”Œโ”€โ”€โ”ดโ”€โ”€โ”    โ”Œโ”€โ”€โ”ดโ”€โ”€โ”    โ”Œโ”€โ”€โ”ดโ”€โ”€โ”    โ”Œโ”€โ”€โ”ดโ”€โ”€โ”    โ”Œโ”€โ”€โ”ดโ”€โ”€โ”          โ”‚
โ”‚ โ”‚Auth โ”‚    โ”‚Ticketโ”‚    โ”‚User โ”‚    โ”‚Commentโ”‚   โ”‚SLA  โ”‚          โ”‚
โ”‚ โ”‚Routeโ”‚    โ”‚Route โ”‚    โ”‚Routeโ”‚    โ”‚Route  โ”‚   โ”‚Logicโ”‚          โ”‚
โ”‚ โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜    โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜    โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜    โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜    โ””โ”€โ”€โ”ฌโ”€โ”€โ”˜          โ”‚
โ”‚    โ”‚          โ”‚          โ”‚          โ”‚          โ”‚               โ”‚
โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚
โ”‚                          โ”‚                                      โ”‚
โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
โ”‚              โ”‚   MongoDB (Mongoose)   โ”‚                         โ”‚
โ”‚              โ”‚  Users, Tickets, Commentsโ”‚                       โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ก API Documentation

Authentication

Method Endpoint Description
POST /api/v1/user/signup Register new user
POST /api/v1/user/login Login user
POST /api/v1/user/logout Logout user
POST /api/v1/user/refresh Refresh access token
GET /api/v1/user/profile Get current user profile

Tickets

Method Endpoint Description
GET /api/v1/tickets Get all tickets (Admin)
GET /api/v1/tickets/my-tickets Get user's tickets
GET /api/v1/tickets/assigned Get engineer's assigned tickets
GET /api/v1/tickets/:id Get single ticket
POST /api/v1/tickets Create new ticket
PATCH /api/v1/tickets/:id/status Update ticket status
PATCH /api/v1/tickets/:id/assign Assign ticket to engineer
DELETE /api/v1/tickets/:id Delete ticket

Comments (Real-time via Socket.io)

Method Endpoint Description
GET /api/v1/tickets/:ticketId/comments Get all comments for ticket
POST /api/v1/tickets/:ticketId/comments Add comment
PATCH /api/v1/comments/:commentId Edit comment
DELETE /api/v1/comments/:commentId Delete comment

Admin Routes

Method Endpoint Description
GET /api/v1/user/engineers Get all engineers with workload
GET /api/v1/user/users Get all users
GET /api/v1/user/dashboard-stats Get admin statistics

๐Ÿš€ Setup Instructions

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account (or local MongoDB)
  • Git

1. Clone the Repository

git clone https://github.com/chetan-coder5486/IssueDesk-Engineer-Assignment-System.git
cd IssueDesk-Engineer-Assignment-System

2. Backend Setup

cd backend
npm install

Create .env file:

PORT=8000
MONGO_URI=mongodb+srv://your-connection-string
ACCESS_TOKEN_SECRET=your-access-secret-key
REFRESH_TOKEN_SECRET=your-refresh-secret-key
NODE_ENV=development

Start backend:

npm run dev

3. Frontend Setup

cd frontend
npm install

Create .env file:

VITE_API_URL=http://localhost:8000

Start frontend:

npm run dev

4. Access the Application

  • Frontend: http://localhost:5173
  • Backend: http://localhost:8000

๐Ÿ‘ฅ User Roles & Permissions

Role Permissions
RANGER Create tickets, view own tickets, add comments
ENGINEER View assigned tickets, update status, add comments
ADMIN All permissions + assign engineers + view all users

๐Ÿ“Š Ticket Status Flow

OPEN โ†’ ASSIGNED โ†’ IN_PROGRESS โ†’ PENDING_PARTS โ†’ RESOLVED โ†’ CLOSED
Status Description
OPEN Newly created, awaiting assignment
ASSIGNED Assigned to engineer
IN_PROGRESS Engineer working on it
PENDING_PARTS Waiting for resources/info
RESOLVED Issue fixed
CLOSED Ticket closed

โฑ๏ธ SLA Configuration

Priority SLA Duration
CRITICAL 4 hours
HIGH 8 hours
MEDIUM 24 hours
LOW 72 hours

SLA timers automatically calculate due dates and track breaches.


๐Ÿ“ธ Screenshots

Login Page

Screenshot 2025-12-09 095502

SignUp Page

Signup

User Dashboard

image

Admin Dashboard

image

Engineer Dashboard

image

๐Ÿ”’ Error Handling & Reliability

  • โœ… JWT token expiration with automatic refresh
  • โœ… API error responses with user-friendly messages
  • โœ… Form validation on client and server
  • โœ… Protected routes for unauthorized access
  • โœ… Socket.io reconnection handling
  • โœ… Session persistence across browser refreshes
  • โœ… Workload balancing for engineer assignments

๐Ÿ“ Folder Structure

IssueDesk-Engineer-Assignment-System/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ user.controller.js
โ”‚   โ”‚   โ”œโ”€โ”€ ticket.controller.js
โ”‚   โ”‚   โ””โ”€โ”€ comment.controller.js
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”œโ”€โ”€ user.model.js
โ”‚   โ”‚   โ”œโ”€โ”€ ticket.model.js
โ”‚   โ”‚   โ””โ”€โ”€ comment.model.js
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ user.route.js
โ”‚   โ”‚   โ”œโ”€โ”€ ticket.route.js
โ”‚   โ”‚   โ””โ”€โ”€ comment.route.js
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ””โ”€โ”€ db.js
โ”‚   โ””โ”€โ”€ main.js
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProtectedRoute.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProfileDrawer.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ SLATimer.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Signup.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UserDashboard.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EngineerDashboard.jsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ AdminDashboard.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ store/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ store.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authSlice.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ticketSlice.js
โ”‚   โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ axios.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ socket.js
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx
โ”‚   โ””โ”€โ”€ index.html
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ‘ฅ Team Members

| Name | Role | Responsibilities |
| Chetan | Full Stack Developer | Authentication, Dashboards, Real-time Features, API Development |
| Pawan |Frontend Developer | Dashboards, nodemailer, Forgot Password |
| Jivit |UI Designer | Designed login,signup and dashboard and profile pages|
| Amit |Frontend Developer | Navbar, UserDashboard |


๐Ÿ”ฎ Future Improvements

  • Email/SMS notifications for SLA breaches
  • Bulk ticket operations
  • Advanced analytics dashboard
  • Mobile app (React Native)
  • AI-powered ticket categorization
  • Export tickets to CSV/PDF
  • Dark/Light theme toggle

๐Ÿ“„ License

MIT License


๐Ÿ™ Acknowledgments

  • Power Rangers theme inspiration
  • MongoDB Atlas for free database hosting
  • Socket.io for real-time capabilities