A modern React-based ticketing system migrated from Angular, built with TypeScript, Vite, and React Router v6.
- Authentication: Secure login/logout with JWT tokens
- Ticket Management: Create, view, update tickets with status tracking
- Role-based Access Control: Customer, Agent, and Admin roles
- Real-time Updates: Modern React patterns for state management
- Responsive Design: Mobile-friendly interface
- File Attachments: Upload/download ticket attachments
- Audit Logging: Track all system changes (Admin only)
- Frontend: React 18 with TypeScript
- Build Tool: Vite
- Routing: React Router v6
- HTTP Client: Axios with interceptors
- State Management: React Context API
- Styling: CSS with custom properties
- Authentication: JWT-based auth
- Node.js 18+
- npm or yarn
- Backend API running on
https://localhost:7079
- Clone the repository:
git clone <repository-url>
cd TicketingReact- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env
# Edit .env with your API URL- Start the development server:
npm run devThe application will be available at http://localhost:5173
Create a .env file in the root directory:
VITE_API_URL=https://localhost:7079/api
For testing purposes, you can use these default credentials:
- Admin: admin@ticketing.com / Admin123!
- Agent: agent@ticketing.com / Agent123!
- Customer: customer@ticketing.com / Customer123!
src/
├── components/ # Reusable components (ProtectedRoute, RoleRoute)
├── contexts/ # React contexts (AuthContext)
├── core/ # Core business logic
│ ├── models/ # TypeScript interfaces and enums
│ └── services/ # API service classes
├── features/ # Feature modules
│ ├── auth/ # Authentication pages
│ ├── tickets/ # Ticket management
│ ├── clients/ # Client management
│ ├── team/ # Team management
│ └── audit-logs/ # Audit log viewing
├── shared/ # Shared resources
│ ├── components/ # Shared components (Pagination)
│ └── layout/ # Layout components (Header, Sidebar, MainLayout)
├── services/ # HTTP client setup
└── index.css # Global styles
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The application communicates with a backend API through the following services:
- AuthService: Login, logout, registration
- TicketService: CRUD operations for tickets
- UserService: User management operations
- AuditLogService: Audit log retrieval
All API requests are automatically authenticated with JWT tokens stored in localStorage.
- Customers: Can create and view their own tickets
- Agents: Can manage tickets and view clients
- Admins: Full access including team management and audit logs
The application uses CSS custom properties for theming with a professional color scheme:
- Primary: Blue (#1E4D92)
- Status colors: Blue, Yellow, Green, Gray
- Priority colors: Green, Yellow, Orange, Red
- Responsive design with mobile breakpoints
- Create feature module in
src/features/ - Add models to
src/core/models/ - Create API service in
src/core/services/ - Update routing in
src/App.tsx
The application uses React Context API for global state:
AuthContext: User authentication state and methods- Local component state for UI-specific data
All API services follow consistent patterns:
- Async/await for promise handling
- Error handling with user-friendly messages
- Request/response interceptors for auth tokens
- TypeScript interfaces for type safety
- Build the application:
npm run build- Deploy the
distfolder to your web server - Ensure the API is accessible and CORS is configured
- Set up appropriate environment variables
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |









