How rutvi23/ticket-flow works
TicketFlow is a customer-and-agent helpdesk: users authenticate, create and find tickets, then inspect ticket details, exchange comments, and (as agents) assign tickets or advance their status. The React client calls an Express REST API, whose controllers enforce ownership and workflow rules and persist data in MySQL. Other documented capabilities include category management, filtered/paginated ticket lists, and dashboard statistics. The graph includes these major branches; links for unsampled modules rely on the README or SOURCE INDEX references.
Main entry points: App.jsx App routes · api.js API client · db.js MySQL pool · app.js Express app
Components 26
React client
- App routes
client/src/App.jsx - Auth context
client/src/AuthContext.jsx - API client
client/src/api.js - Ticket views
client/src/pages/Tickets.jsx - Ticket detail
client/src/pages/TicketDetail.jsx - Ticket form
client/src/pages/TicketForm.jsx - Category view
client/src/pages/Categories.jsx - Dashboard view
client/src/pages/Dashboard.jsx
REST API
- Express app
server/src/app.js - Auth routes
server/src/routes/auth.js - Ticket routes
server/src/routes/tickets.js - Category routes
server/src/routes/categories.js - Comment routes
server/src/routes/comments.js - Stats routes
server/src/routes/stats.js
Ticket domain
- Authentication
server/src/controllers/authController.js - Ticket operations
server/src/controllers/ticketController.js - Comments
server/src/controllers/commentController.js - Categories
server/src/controllers/categoryController.js - Statistics
server/src/controllers/statsController.js - JWT / roles
server/src/middleware/auth.js - Request validation
server/src/middleware/validate.js - Ticket access
server/src/utils/access.js - Status rules
server/src/utils/transitions.js
Persistence
- MySQL pool
server/src/config/db.js - MySQL database
server/schema.sql
Other components
- Customer / agent
Connections 39
- Customer / agent → App routes: uses
README.md - App routes → Auth context: checks identity
client/src/App.jsx - App routes → Ticket views: routes to
client/src/App.jsx - App routes → Ticket detail: routes to
client/src/App.jsx - App routes → Ticket form: routes to
client/src/App.jsx - App routes → Category view: routes to
client/src/App.jsx - App routes → Dashboard view: routes to
client/src/App.jsx - Auth context → API client: calls
client/src/AuthContext.jsx - Ticket views → API client: calls
client/src/pages/Tickets.jsx - Ticket detail → API client: calls
client/src/pages/TicketDetail.jsx - Ticket form → API client: calls
client/src/pages/TicketForm.jsx - Category view → API client: calls
client/src/pages/Categories.jsx - Dashboard view → API client: calls
client/src/pages/Dashboard.jsx - API client → Express app: sends REST requests
README.md - Express app → Auth routes: mounts
server/src/app.js - Express app → Ticket routes: mounts
server/src/app.js - Express app → Category routes: mounts
server/src/app.js - Express app → Comment routes: mounts
server/src/app.js - Express app → Stats routes: mounts
server/src/app.js - Auth routes → Authentication: dispatches
server/src/routes/auth.js - Ticket routes → Ticket operations: dispatches
server/src/routes/tickets.js - Ticket routes → Comments: dispatches
server/src/routes/tickets.js - Category routes → Categories: dispatches
server/src/routes/categories.js - Comment routes → Comments: dispatches
server/src/routes/comments.js - Stats routes → Statistics: dispatches
server/src/routes/stats.js - Auth routes → JWT / roles: authenticates
server/src/routes/auth.js - Ticket routes → JWT / roles: authenticates
server/src/routes/tickets.js - Category routes → Request validation: validates
server/src/routes/categories.js - Ticket routes → Request validation: validates
server/src/routes/tickets.js - Ticket operations → Ticket access: checks access
server/src/controllers/ticketController.js - Comments → Ticket access: checks access
server/src/controllers/commentController.js - Ticket operations → Status rules: checks status change
server/src/controllers/ticketController.js - Authentication → MySQL pool: queries
server/src/controllers/authController.js - Ticket operations → MySQL pool: queries
server/src/controllers/ticketController.js - Comments → MySQL pool: queries
server/src/controllers/commentController.js - Categories → MySQL pool: queries
server/src/controllers/categoryController.js - Statistics → MySQL pool: queries
server/src/controllers/statsController.js - Ticket access → MySQL pool: loads tickets
server/src/utils/access.js - MySQL pool → MySQL database: connects