# suongranet/fixflow architecture

> Architecture diagram of the GitHub repository suongranet/fixflow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suongranet/fixflow
- Repository: https://github.com/suongranet/fixflow

## Overview

FixFlow is an IT support ticket management system. Users authenticate, create and track tickets, and support staff manage assignments and status; tickets can carry comments and attachments, with notifications and dashboard reporting alongside that workflow. The frontend routes these experiences and makes API requests, while the Express backend mounts domain routes and separates controllers from services. The tree and excerpts establish several frontend and backend links; storage and some domain-service wiring are unsampled, so uncertain connections are omitted or dashed.

Main entry points: [`backend/src/app.ts`](https://github.com/suongranet/fixflow/blob/main/backend/src/app.ts) (API route mounting), [`frontend/src/App/router.tsx`](https://github.com/suongranet/fixflow/blob/main/frontend/src/App/router.tsx) (App routes), [`backend/src/modules/tickets/ticket.controller.ts`](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/tickets/ticket.controller.ts) (Ticket management), [`backend/src/modules/ticket-attachment/ticketAttachment.controller.ts`](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/ticket-attachment/ticketAttachment.controller.ts) (Ticket attachments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_browser["Web application<br/>[main.tsx]"]
  node_router["App routes<br/>[router.tsx]"]
  node_auth_pages["Sign-in pages<br/>[LoginPage.tsx]"]
  node_ticket_pages["Ticket views<br/>[TicketsPage.tsx]"]
  node_ticket_detail["Ticket detail"]
  node_dashboard_page["Dashboard view<br/>[DashboardPage.tsx]"]
  node_notification_page["Notification view"]
  node_user_page["User administration<br/>[UsersPage.tsx]"]
  node_api_requests["API request hook<br/>[useApiRequest.ts]"]
  node_api_client["HTTP client<br/>[axios.ts]"]
  node_auth_store["Auth state<br/>[auth.store.ts]"]
end

subgraph group_identity["Identity and users"]
  node_auth_backend["Authentication<br/>[auth.controller.ts]"]
  node_user_backend["User management<br/>[user.controller.ts]"]
end

subgraph group_tickets["Ticket operations"]
  node_ticket_backend["Ticket management"]
  node_comments["Ticket comments"]
  node_attachments["Ticket attachments"]
end

subgraph group_support["Support features"]
  node_categories["Categories"]
  node_departments["Departments"]
  node_notifications["Notifications"]
  node_dashboard["Dashboard reporting"]
end

subgraph group_platform["Backend platform"]
  node_api_routes["API route mounting<br/>[app.ts]"]
  node_auth_middleware["Authentication middleware<br/>[auth.middleware.ts]"]
  node_realtime["Realtime events<br/>[broadcast.ts]"]
  node_database[("Database connection<br/>[db.ts]")]
end

node_user(("User"))
node_cloudinary["Cloudinary storage"]

node_user -->|"uses"| node_browser
node_browser -->|"mounts"| node_router
node_router -->|"routes to"| node_auth_pages
node_router -->|"routes to"| node_ticket_pages
node_router -->|"routes to"| node_ticket_detail
node_router -->|"routes to"| node_dashboard_page
node_router -->|"routes to"| node_notification_page
node_router -->|"routes to"| node_user_page
node_ticket_pages -->|"uses"| node_api_requests
node_ticket_pages -.->|"opens"| node_ticket_detail
node_dashboard_page -->|"uses"| node_api_requests
node_user_page -->|"uses"| node_api_requests
node_api_requests -->|"calls"| node_api_client
node_auth_pages -.->|"updates"| node_auth_store
node_api_client -.->|"requests"| node_api_routes
node_api_routes -->|"mounts"| node_auth_backend
node_api_routes -->|"mounts"| node_user_backend
node_api_routes -->|"mounts"| node_ticket_backend
node_api_routes -->|"mounts"| node_comments
node_api_routes -->|"mounts"| node_attachments
node_api_routes -->|"mounts"| node_notifications
node_api_routes -->|"mounts"| node_dashboard
node_api_routes -->|"mounts"| node_categories
node_api_routes -->|"mounts"| node_departments
node_ticket_backend -.->|"accesses"| node_database
node_ticket_backend -.->|"supports attachments"| node_attachments
node_attachments -.->|"uploads to"| node_cloudinary
node_auth_backend -.->|"accesses"| node_database
node_comments -->|"broadcasts via"| node_realtime
node_ticket_backend -->|"delegates to service"| node_ticket_backend
node_auth_backend -->|"delegates to service"| node_auth_backend
node_notifications -->|"delegates to service"| node_notifications
node_attachments -->|"delegates to service"| node_attachments
node_dashboard -->|"delegates to service"| node_dashboard

click node_browser "https://github.com/suongranet/fixflow/blob/main/frontend/src/main.tsx"
click node_router "https://github.com/suongranet/fixflow/blob/main/frontend/src/App/router.tsx"
click node_auth_pages "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/auth/pages/LoginPage.tsx"
click node_ticket_pages "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/tickets/pages/TicketsPage.tsx"
click node_ticket_detail "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/tickets/pages/TicketDetailPage.tsx"
click node_dashboard_page "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/dashboard/pages/DashboardPage.tsx"
click node_notification_page "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/notifications/pages/NotificationsPage.tsx"
click node_user_page "https://github.com/suongranet/fixflow/blob/main/frontend/src/features/users/pages/UsersPage.tsx"
click node_api_requests "https://github.com/suongranet/fixflow/blob/main/frontend/src/hooks/useApiRequest.ts"
click node_api_client "https://github.com/suongranet/fixflow/blob/main/frontend/src/lib/axios.ts"
click node_auth_store "https://github.com/suongranet/fixflow/blob/main/frontend/src/stores/auth.store.ts"
click node_auth_backend "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/auth/auth.controller.ts"
click node_user_backend "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/user/user.controller.ts"
click node_ticket_backend "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/tickets/ticket.controller.ts"
click node_comments "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/tickets_comments/ticket-comment.controller.ts"
click node_attachments "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/ticket-attachment/ticketAttachment.controller.ts"
click node_categories "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/category/category.controller.ts"
click node_departments "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/department/department.controller.ts"
click node_notifications "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/notification/notification.controller.ts"
click node_dashboard "https://github.com/suongranet/fixflow/blob/main/backend/src/modules/Dashboard/admin.controller.ts"
click node_api_routes "https://github.com/suongranet/fixflow/blob/main/backend/src/app.ts"
click node_auth_middleware "https://github.com/suongranet/fixflow/blob/main/backend/src/middleware/auth.middleware.ts"
click node_realtime "https://github.com/suongranet/fixflow/blob/main/backend/src/realtime/broadcast.ts"
click node_database "https://github.com/suongranet/fixflow/blob/main/backend/src/config/db.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_router,node_auth_pages,node_ticket_pages,node_ticket_detail,node_dashboard_page,node_notification_page,node_user_page,node_api_requests,node_api_client,node_auth_store,node_user toneBlue
class node_auth_backend,node_user_backend,node_cloudinary toneAmber
class node_ticket_backend,node_comments,node_attachments toneMint
class node_categories,node_departments,node_notifications,node_dashboard toneRose
class node_api_routes,node_auth_middleware,node_realtime,node_database toneIndigo
```

## Components

### Frontend

- [Web application](https://github.com/suongranet/fixflow/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [App routes](https://github.com/suongranet/fixflow/blob/main/frontend/src/App/router.tsx): `frontend/src/App/router.tsx`
- [Sign-in pages](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/auth/pages/LoginPage.tsx): `frontend/src/features/auth/pages/LoginPage.tsx`
- [Ticket views](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/tickets/pages/TicketsPage.tsx): `frontend/src/features/tickets/pages/TicketsPage.tsx`
- [Ticket detail](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/tickets/pages/TicketDetailPage.tsx): `frontend/src/features/tickets/pages/TicketDetailPage.tsx`
- [Dashboard view](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/dashboard/pages/DashboardPage.tsx): `frontend/src/features/dashboard/pages/DashboardPage.tsx`
- [Notification view](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/notifications/pages/NotificationsPage.tsx): `frontend/src/features/notifications/pages/NotificationsPage.tsx`
- [User administration](https://github.com/suongranet/fixflow/blob/main/frontend/src/features/users/pages/UsersPage.tsx): `frontend/src/features/users/pages/UsersPage.tsx`
- [API request hook](https://github.com/suongranet/fixflow/blob/main/frontend/src/hooks/useApiRequest.ts): `frontend/src/hooks/useApiRequest.ts`
- [HTTP client](https://github.com/suongranet/fixflow/blob/main/frontend/src/lib/axios.ts): `frontend/src/lib/axios.ts`
- [Auth state](https://github.com/suongranet/fixflow/blob/main/frontend/src/stores/auth.store.ts): `frontend/src/stores/auth.store.ts`

### Identity and users

- [Authentication](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/auth/auth.controller.ts): `backend/src/modules/auth/auth.controller.ts`
- [User management](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/user/user.controller.ts): `backend/src/modules/user/user.controller.ts`

### Ticket operations

- [Ticket management](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/tickets/ticket.controller.ts): `backend/src/modules/tickets/ticket.controller.ts`
- [Ticket comments](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/tickets_comments/ticket-comment.controller.ts): `backend/src/modules/tickets_comments/ticket-comment.controller.ts`
- [Ticket attachments](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/ticket-attachment/ticketAttachment.controller.ts): `backend/src/modules/ticket-attachment/ticketAttachment.controller.ts`

### Support features

- [Categories](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/category/category.controller.ts): `backend/src/modules/category/category.controller.ts`
- [Departments](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/department/department.controller.ts): `backend/src/modules/department/department.controller.ts`
- [Notifications](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/notification/notification.controller.ts): `backend/src/modules/notification/notification.controller.ts`
- [Dashboard reporting](https://github.com/suongranet/fixflow/blob/main/backend/src/modules/Dashboard/admin.controller.ts): `backend/src/modules/Dashboard/admin.controller.ts`

### Backend platform

- [API route mounting](https://github.com/suongranet/fixflow/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Authentication middleware](https://github.com/suongranet/fixflow/blob/main/backend/src/middleware/auth.middleware.ts): `backend/src/middleware/auth.middleware.ts`
- [Realtime events](https://github.com/suongranet/fixflow/blob/main/backend/src/realtime/broadcast.ts): `backend/src/realtime/broadcast.ts`
- [Database connection](https://github.com/suongranet/fixflow/blob/main/backend/src/config/db.ts): `backend/src/config/db.ts`

### Other components

- **User**
- **Cloudinary storage**

## Connections

- User → Web application: uses (evidence: `README.md`)
- Web application → App routes: mounts (evidence: `frontend/src/main.tsx`)
- App routes → Sign-in pages: routes to (evidence: `frontend/src/App/router.tsx`)
- App routes → Ticket views: routes to (evidence: `frontend/src/App/router.tsx`)
- App routes → Ticket detail: routes to (evidence: `frontend/src/App/router.tsx`)
- App routes → Dashboard view: routes to (evidence: `frontend/src/App/router.tsx`)
- App routes → Notification view: routes to (evidence: `frontend/src/App/router.tsx`)
- App routes → User administration: routes to (evidence: `frontend/src/App/router.tsx`)
- Ticket views → API request hook: uses (evidence: `frontend/src/features/tickets/pages/TicketsPage.tsx`)
- Ticket views → Ticket detail: opens
- Dashboard view → API request hook: uses (evidence: `frontend/src/features/dashboard/pages/DashboardPage.tsx`)
- User administration → API request hook: uses (evidence: `frontend/src/features/users/pages/UsersPage.tsx`)
- API request hook → HTTP client: calls (evidence: `frontend/src/hooks/useApiRequest.ts`)
- Sign-in pages → Auth state: updates
- HTTP client → API route mounting: requests
- API route mounting → Authentication: mounts (evidence: `backend/src/app.ts`)
- API route mounting → User management: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Ticket management: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Ticket comments: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Ticket attachments: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Notifications: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Dashboard reporting: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Categories: mounts (evidence: `backend/src/app.ts`)
- API route mounting → Departments: mounts (evidence: `backend/src/app.ts`)
- Ticket management → Database connection: accesses
- Ticket management → Ticket attachments: supports attachments
- Ticket attachments → Cloudinary storage: uploads to
- Authentication → Database connection: accesses
- Ticket comments → Realtime events: broadcasts via
- Ticket management → Ticket management: delegates to service (evidence: `backend/src/modules/tickets/ticket.controller.ts`)
- Authentication → Authentication: delegates to service (evidence: `backend/src/modules/auth/auth.controller.ts`)
- Notifications → Notifications: delegates to service (evidence: `backend/src/modules/notification/notification.controller.ts`)
- Ticket attachments → Ticket attachments: delegates to service (evidence: `backend/src/modules/ticket-attachment/ticketAttachment.controller.ts`)
- Dashboard reporting → Dashboard reporting: delegates to service (evidence: `backend/src/modules/Dashboard/admin.controller.ts`)
