A comprehensive full-stack ticket management system for IT support, built with NestJS, Angular, and PostgreSQL.
TechHelpDesk is a modern ticket management system designed for IT support teams. It provides role-based access control, real-time ticket tracking, and a comprehensive dashboard for administrators, technicians, and clients.
- π JWT Authentication - Secure authentication with role-based access control
- π₯ Three User Roles - Admin, Technician, and Client with specific permissions
- π« Ticket Management - Complete CRUD operations for support tickets
- π Dashboard - Role-specific dashboards with real-time data
- π Workflow Management - Ticket status transitions with validation
- π API Documentation - Interactive Swagger/OpenAPI documentation
- π§ͺ Test Coverage - Unit tests with coverage reports
- π¨ Modern UI - Responsive Angular frontend with clean design
TechHelpDesk/
βββ Backend/ # NestJS REST API
βββ Frontend/ # Angular SPA
βββ docker-compose.yml # PostgreSQL database
- Framework: NestJS 10.x
- Database: PostgreSQL 15
- ORM: TypeORM
- Authentication: JWT (Passport.js)
- Validation: class-validator
- Documentation: Swagger/OpenAPI
- Testing: Jest
- Framework: Angular 18.x
- HTTP Client: HttpClient with RxJS
- Routing: Angular Router
- State Management: Services with Observables
- Styling: CSS Variables with custom design system
- Node.js 18+ and npm
- Docker and Docker Compose (for PostgreSQL)
- Git
The easiest way to run the entire application (Frontend, Backend, and Database) is using Docker Compose.
- Clone the repository
git clone <repository-url>
cd TechHelpDesk- Run with Docker Compose
docker-compose up --buildThis command will:
- Build the Backend image
- Build the Frontend image (served via Nginx)
- Start the PostgreSQL database
- Connect everything automatically
If you prefer to run services individually for development:
- Start Database
docker-compose up postgres -d- Setup Backend
cd Backend
npm install
cp .env.example .env
npm run start:dev- Setup Frontend
cd Frontend
npm install
npm start- Frontend: http://localhost:4200
- Backend API: http://localhost:3000
- Swagger Docs: http://localhost:3000/api
- Test Coverage: http://localhost:3000/coverage
| Role | Password | |
|---|---|---|
| Admin | admin@techhelpdesk.com | admin123 |
| Technician | tech@techhelpdesk.com | tech123 |
| Client | client@techhelpdesk.com | client123 |
- Swagger UI: Interactive API documentation at
/api - Test Coverage: HTML reports at
/coverage - See Backend README for detailed documentation
- Architecture: Component-based Angular application
- Services: Authentication, Tickets, Users, Categories
- See Frontend README for detailed documentation
- Full CRUD access to all resources
- User management (create, list, view)
- Category management
- Ticket oversight across all users
- System configuration
- View available open tickets
- Self-assign tickets (via "Start Working")
- Update ticket status (in_progress β resolved β closed)
- View assigned tickets
- Maximum 5 concurrent tickets in progress
- Create new tickets
- View own ticket history
- See assigned technician details
- Track ticket status
OPEN β IN_PROGRESS β RESOLVED β CLOSED
- Client creates ticket β Status:
OPEN - Technician takes ticket β Status:
IN_PROGRESS+ Auto-assigned - Technician resolves β Status:
RESOLVED - Admin/Technician closes β Status:
CLOSED
- User - Base user entity with authentication
- Client - Client profile (1:1 with User)
- Technician - Technician profile (1:1 with User)
- Category - Ticket categories
- Ticket - Support tickets with relationships
UserβClient(One-to-One)UserβTechnician(One-to-One)ClientβTicket(One-to-Many)TechnicianβTicket(One-to-Many, nullable)CategoryβTicket(One-to-Many)
cd Backend
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:cov # With coverage reportView detailed coverage reports at: http://localhost:3000/coverage
Create .env file in Backend directory:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=password
DB_NAME=techhelpdesk
# JWT
JWT_SECRET=your-secret-key-here
# Application
PORT=3000# Start PostgreSQL
docker-compose up -d
# Stop PostgreSQL
docker-compose down
# View logs
docker-compose logs -f postgres
# Reset database (β οΈ destroys data)
docker-compose down -v
docker-compose up -dTechHelpDesk/
βββ Backend/
β βββ src/
β β βββ auth/ # Authentication module
β β βββ users/ # Users, Clients, Technicians
β β βββ tickets/ # Ticket management
β β βββ categories/ # Category management
β β βββ common/ # Shared filters, interceptors
β β βββ main.ts # Application entry point
β βββ test/ # E2E tests
β βββ package.json
β
βββ Frontend/
β βββ src/
β β βββ app/
β β β βββ pages/ # Page components
β β β βββ services/ # HTTP services
β β β βββ guards/ # Route guards
β β βββ main.ts
β βββ package.json
β
βββ docker-compose.yml # PostgreSQL configuration
βββ README.md # This file
- β JWT-based authentication
- β Password hashing with bcrypt
- β Role-based access control (RBAC)
- β Route guards (frontend & backend)
- β Input validation with class-validator
- β CORS configuration
- β SQL injection protection (TypeORM)
- β Responsive design
- β Role-specific dashboards
- β Color-coded role badges
- β Status indicators with colors
- β Real-time ticket updates
- β Development tools panel (Swagger, Test Reports)
- β Clean and modern interface
- Real-time notifications (WebSockets)
- File attachments for tickets
- Email notifications
- Ticket comments/threading
- Advanced search and filters
- Analytics dashboard
- Technician availability calendar
- SLA tracking
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Development Team
- NestJS Framework
- Angular Team
- TypeORM Contributors
- All open-source contributors
Built with β€οΈ using NestJS and Angular