SupportDesk is a full-stack ticketing system built using the MERN stack (MongoDB, Express.js, React.js, and Node.js). It allows users to create, track, and manage support tickets, while providing admin controls to resolve, update, and delete tickets.
The application follows role-based authentication, where users can register and create tickets, while administrators have the ability to manage tickets, change their status, and remove them if necessary.
- Remix (React framework for optimized server-side rendering and performance)
- TailwindCSS (for styling and responsive UI)
- Node.js (runtime environment)
- Express.js (framework for building API routes)
- MongoDB & Mongoose (for database storage and schema management)
- JWT Authentication (for secure user authentication)
- Bcrypt.js (for password hashing)
- Postman (for API testing)
- Nodemon (for live backend development)
- Dotenv (for managing environment variables)
The system has two types of users:
- Sign up and log in to their account.
- Create new support tickets describing their issues.
- View the list of their submitted tickets with current statuses.
- Update their own tickets with new information.
- Close a ticket once their issue is resolved.
- Log in as an admin with special privileges.
- View all tickets submitted by users in the system.
- Update the status of any ticket (Open, In Progress, Resolved, Closed).
- Delete tickets if necessary.
- Manage user accounts (view details of registered users).
git clone https://github.com/jaluiovilash/supportdesk.git
cd supportdeskcd server
npm installcd ../client
npm installCreate a .env file inside the server directory and configure the following values:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
cd server
npm run devcd ../client
npm run devYour project should now be running at http://localhost:8080 (Frontend) and http://localhost:5000 (Backend API).
- Endpoint:
POST /api/users/signup - Request Body (JSON):
{
"name": "John Doe",
"email": "[email protected]",
"password": "password123"
}- Expected Response:
{
"id": "user_id_here",
"name": "John Doe",
"email": "[email protected]",
"token": "jwt_token_here"
}- Endpoint:
POST /api/users/login - Request Body (JSON):
{
"email": "[email protected]",
"password": "password123"
}- Endpoint:
POST /api/tickets/create - Headers:
Authorization: Bearer <user_token>
- Request Body (JSON):
{
"title": "Login issue",
"description": "Unable to log in with correct credentials"
}- Endpoint:
GET /api/tickets/user - Headers:
Authorization: Bearer <user_token>
- Endpoint:
GET /api/tickets/all - Headers:
Authorization: Bearer <admin_token>
- Endpoint:
PUT /api/tickets/update/:ticketId - Headers:
Authorization: Bearer <admin_token>
- Request Body (JSON):
{
"status": "resolved"
}- Endpoint:
DELETE /api/tickets/delete/:ticketId - Headers:
Authorization: Bearer <admin_token>
- Sign up using
POST /api/users/signup. - Log in using
POST /api/users/loginand copy thetoken. - Create a ticket using
POST /api/tickets/create(with token). - Fetch your tickets using
GET /api/tickets/user.
- Log in with an admin account using
POST /api/users/login. - Fetch all tickets using
GET /api/tickets/all(should list all user tickets). - Update a ticket’s status using
PUT /api/tickets/update/:ticketId. - Delete a ticket using
DELETE /api/tickets/delete/:ticketId.
SupportDesk provides an efficient ticket management system with clear role-based access control. Users can report issues, and administrators can efficiently manage and resolve tickets.
For further improvements, features like real-time notifications, chat support, and file attachments could be added in future updates.