A full-stack web application for managing customer support requests. Features separate frontend (React) and backend (Node.js) with JWT authentication, MongoDB database, and Tailwind CSS styling.
.
├── backend/ # Node.js + Express API
│ ├── models/ # MongoDB schemas
│ ├── controllers/ # Business logic
│ ├── routes/ # API routes
│ ├── middleware/ # Authentication middleware
│ ├── config/ # Database config
│ ├── server.js # Main server file
│ └── package.json
├── frontend/ # React + Vite application
│ ├── src/
│ │ ├── pages/ # Page components
│ │ ├── components/ # Reusable components
│ │ ├── context/ # Auth context
│ │ ├── utils/ # API calls
│ │ ├── App.jsx # Main app
│ │ └── main.jsx # Entry point
│ └── package.json
- ✅ User registration and secure login
- ✅ Create support tickets
- ✅ Track ticket progress in real-time
- ✅ Add comments and communicate with support
- ✅ View ticket history
- ✅ View all tickets from all customers
- ✅ Update ticket status (new → in-progress → completed → closed)
- ✅ Assign tickets to team members
- ✅ Respond to customer comments
- ✅ Filter by service type and priority
- Web Development
- Software Development
- IT Support
- Maintenance
- Consulting
- Other
- Low
- Medium
- High
- Urgent
Backend:
- Node.js
- Express.js
- MongoDB
- JWT (JSON Web Tokens)
- bcryptjs (password hashing)
Frontend:
- React 18
- Vite (build tool)
- Tailwind CSS
- Axios (API calls)
- React Router
- Node.js 14+ and npm
- MongoDB (local or cloud instance)
- Git
cd backend
# Install dependencies
npm install
# Create .env file from example
cp .env.example .env
# Update .env with your MongoDB URI and JWT secret
# Example:
# PORT=5000
# MONGODB_URI=mongodb://localhost:27017/your-mongodb.url
# JWT_SECRET=your_secure_secret_key
# NODE_ENV=development
# FRONTEND_URL=http://localhost:5173
# Start the server
npm run devBackend will run on http://localhost:5000
cd frontend
# Install dependencies
npm install
# Start the development server
npm run devFrontend will run on http://localhost:5173
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/profile- Get current user (requires token)
POST /api/tickets- Create new ticketGET /api/tickets- Get tickets (own if customer, all if admin)GET /api/tickets/:id- Get ticket detailsPUT /api/tickets/:id/status- Update status (admin only)PUT /api/tickets/:id/assign- Assign ticket (admin only)POST /api/tickets/:id/comments- Add comment
- Register: Click "Register" and create an account
- Submit Ticket: Go to dashboard and click "Create New Ticket"
- Fill Details: Enter title, description, service type, and priority
- Track Progress: View your tickets and see status updates
- Communicate: Add comments to tickets for real-time communication
- Login: Use your admin account credentials
- View All Tickets: Admin dashboard shows all customer tickets
- Update Status: Change ticket status as work progresses
- Respond: Add comments to communicate with customers
- Manage: Organize tickets by priority and service type
- name (string)
- email (string, unique)
- password (string, hashed)
- role (enum: 'customer', 'admin')
- company (string, optional)
- createdAt, updatedAt
- ticketNumber (string, auto-generated)
- title (string)
- description (string)
- serviceType (enum)
- priority (enum: 'low', 'medium', 'high', 'urgent')
- status (enum: 'new', 'in-progress', 'completed', 'closed')
- customerId (ref: User)
- assignedTo (ref: User, optional)
- comments (array of objects)
- createdAt, updatedAt
- Railway, Render, or Heroku
- Set environment variables on the platform
- Push to GitHub and connect repository
- Vercel, Netlify
- Update API_URL in
src/utils/api.jsto your backend URL - Push to GitHub and connect repository
- Email notifications for ticket updates
- File attachments to tickets
- Advanced search and filtering
- Ticket templates
- Analytics dashboard
- SLA tracking
- Knowledge base integration
- Live chat support
- Mobile app
PORT=5000
MONGODB_URI=mongodb://localhost:27017/ticketing-system
JWT_SECRET=your_jwt_secret_key_here
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
Update API_URL in src/utils/api.js based on your backend URL
Connection Issues:
- Ensure MongoDB is running
- Check backend is running on port 5000
- Verify frontend can reach backend URL
Authentication Problems:
- Clear browser localStorage (tokens)
- Check JWT_SECRET is set correctly
- Verify user email/password
API Errors:
- Check browser console for error messages
- Check backend terminal for server errors
- Verify CORS configuration in server.js
MIT
For issues or questions, please create an issue in the repository.