# nandini-maroju/hv2026--hv2026-0015---code-titans1- architecture

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

- Interactive diagram: https://gitdiagram.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-
- Repository: https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-

## Overview

CampusOps 360 is a campus facilities grievance and operations platform. Users authenticate, submit location-aware complaints (including attachments and QR-derived details), then follow status changes; staff progress assigned work, while administrators triage requests and review operational metrics. The graph separates the browser experience, complaint intake and triage, role-based operations, and shared services. Source excerpts show complaint creation, persistence, and notification behavior; several other capabilities and endpoint connections are documented in the README or SOURCE INDEX but were not sampled in full.

Main entry points: [`frontend/src/services/api.js`](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/services/api.js) (API client), [`backend/src/models/db.js`](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/models/db.js) (Campus database), [`frontend/src/App.jsx`](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/App.jsx) (App routing), [`backend/src/server.js`](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/server.js) (Express API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth_ui["Login and registration<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_new_complaint["Complaint form<br/>[NewComplaint.jsx]"]
  node_complaint_details["Complaint tracking"]
  node_admin_dashboard["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_staff_dashboard["Staff dashboard<br/>[StaffDashboard.jsx]"]
  node_qr_tools["QR scan and management<br/>[QRManagement.jsx]"]
end

subgraph group_intake["Complaint intake"]
  node_complaint_routes["Complaint routes<br/>[complaintRoutes.js]"]
  node_complaint_controller["Complaint lifecycle"]
  node_ai_triage["AI triage<br/>[aiService.js]"]
  node_upload["File upload"]
end

subgraph group_operations["Operations"]
  node_admin_ops["Admin operations<br/>[adminController.js]"]
  node_staff_ops["Staff task updates<br/>[staffController.js]"]
  node_qr_routes["QR location routes<br/>[qrRoutes.js]"]
end

subgraph group_core["Shared services"]
  node_auth_routes["Auth routes<br/>[authRoutes.js]"]
  node_auth_controller["Account handling<br/>[authController.js]"]
  node_notifications["Notification service"]
  node_database[("Campus database<br/>[db.js]")]
  node_server["Express API server<br/>[server.js]"]
end

node_campus_user(("Campus user"))

node_campus_user -->|"uses"| node_app
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_new_complaint
node_app -->|"routes to"| node_complaint_details
node_app -->|"routes to"| node_admin_dashboard
node_auth_ui -->|"requests"| node_api_client
node_new_complaint -->|"submits through"| node_api_client
node_complaint_details -->|"loads through"| node_api_client
node_admin_dashboard -->|"loads through"| node_api_client
node_staff_dashboard -.->|"loads through"| node_api_client
node_qr_tools -->|"requests through"| node_api_client
node_api_client -->|"calls REST API"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_complaint_routes
node_server -->|"mounts"| node_qr_routes
node_complaint_routes -->|"dispatches"| node_complaint_controller
node_complaint_routes -->|"uses"| node_upload
node_auth_routes -->|"dispatches"| node_auth_controller
node_complaint_controller -->|"analyzes"| node_ai_triage
node_complaint_controller -->|"reads and writes"| node_database
node_complaint_controller -->|"creates alerts"| node_notifications
node_auth_controller -->|"reads and writes"| node_database
node_admin_ops -->|"reads and writes"| node_database
node_admin_ops -->|"creates alerts"| node_notifications
node_staff_ops -->|"updates tasks"| node_database
node_qr_routes -->|"uses locations"| node_database
node_notifications -->|"stores alerts"| node_database
node_server -->|"serves notification reads"| node_database
node_campus_user -->|"scans location QR"| node_qr_tools
node_admin_dashboard -.->|"views metrics"| node_admin_ops
node_staff_dashboard -.->|"updates assigned work"| node_staff_ops

click node_app "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/context/AuthContext.jsx"
click node_api_client "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/services/api.js"
click node_new_complaint "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/NewComplaint.jsx"
click node_complaint_details "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/ComplaintDetails.jsx"
click node_admin_dashboard "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_staff_dashboard "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/StaffDashboard.jsx"
click node_qr_tools "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/QRManagement.jsx"
click node_auth_routes "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/authRoutes.js"
click node_auth_controller "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/authController.js"
click node_complaint_routes "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/complaintRoutes.js"
click node_complaint_controller "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/complaintController.js"
click node_ai_triage "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/services/aiService.js"
click node_upload "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/middleware/uploadMiddleware.js"
click node_admin_ops "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/adminController.js"
click node_staff_ops "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/staffController.js"
click node_qr_routes "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/qrRoutes.js"
click node_notifications "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/services/notificationService.js"
click node_database "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/models/db.js"
click node_server "https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/server.js"

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_app,node_auth_ui,node_api_client,node_new_complaint,node_complaint_details,node_admin_dashboard,node_staff_dashboard,node_qr_tools,node_campus_user toneBlue
class node_complaint_routes,node_complaint_controller,node_ai_triage,node_upload toneAmber
class node_admin_ops,node_staff_ops,node_qr_routes toneMint
class node_auth_routes,node_auth_controller,node_notifications,node_database,node_server toneRose
```

## Components

### Web experience

- [App routing](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and registration](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Complaint form](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/NewComplaint.jsx): `frontend/src/pages/NewComplaint.jsx`
- [Complaint tracking](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/ComplaintDetails.jsx): `frontend/src/pages/ComplaintDetails.jsx`
- [Admin dashboard](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Staff dashboard](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/StaffDashboard.jsx): `frontend/src/pages/StaffDashboard.jsx`
- [QR scan and management](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/frontend/src/pages/QRManagement.jsx): `frontend/src/pages/QRManagement.jsx`

### Complaint intake

- [Complaint routes](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/complaintRoutes.js): `backend/src/routes/complaintRoutes.js`
- [Complaint lifecycle](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/complaintController.js): `backend/src/controllers/complaintController.js`
- [AI triage](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/services/aiService.js): `backend/src/services/aiService.js`
- [File upload](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/middleware/uploadMiddleware.js): `backend/src/middleware/uploadMiddleware.js`

### Operations

- [Admin operations](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/adminController.js): `backend/src/controllers/adminController.js`
- [Staff task updates](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/staffController.js): `backend/src/controllers/staffController.js`
- [QR location routes](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/qrRoutes.js): `backend/src/routes/qrRoutes.js`

### Shared services

- [Auth routes](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/routes/authRoutes.js): `backend/src/routes/authRoutes.js`
- [Account handling](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [Notification service](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/services/notificationService.js): `backend/src/services/notificationService.js`
- [Campus database](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/models/db.js): `backend/src/models/db.js`
- [Express API server](https://github.com/nandini-maroju/hv2026--hv2026-0015---code-titans1-/blob/main/backend/src/server.js): `backend/src/server.js`

### Other components

- **Campus user**

## Connections

- Campus user → App routing: uses (evidence: `README.md`)
- App routing → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Complaint form: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Complaint tracking: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Admin dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Login and registration → API client: requests (evidence: `frontend/src/context/AuthContext.jsx`)
- Complaint form → API client: submits through (evidence: `frontend/src/pages/NewComplaint.jsx`)
- Complaint tracking → API client: loads through (evidence: `frontend/src/pages/ComplaintDetails.jsx`)
- Admin dashboard → API client: loads through (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Staff dashboard → API client: loads through
- QR scan and management → API client: requests through (evidence: `frontend/src/pages/QRManagement.jsx`)
- API client → Express API server: calls REST API (evidence: `README.md`)
- Express API server → Auth routes: mounts (evidence: `backend/src/server.js`)
- Express API server → Complaint routes: mounts (evidence: `backend/src/server.js`)
- Express API server → QR location routes: mounts (evidence: `backend/src/server.js`)
- Complaint routes → Complaint lifecycle: dispatches (evidence: `backend/src/routes/complaintRoutes.js`)
- Complaint routes → File upload: uses (evidence: `backend/src/routes/complaintRoutes.js`)
- Auth routes → Account handling: dispatches (evidence: `backend/src/routes/authRoutes.js`)
- Complaint lifecycle → AI triage: analyzes (evidence: `backend/src/controllers/complaintController.js`)
- Complaint lifecycle → Campus database: reads and writes (evidence: `backend/src/controllers/complaintController.js`)
- Complaint lifecycle → Notification service: creates alerts (evidence: `backend/src/controllers/complaintController.js`)
- Account handling → Campus database: reads and writes (evidence: `backend/src/controllers/authController.js`)
- Admin operations → Campus database: reads and writes (evidence: `backend/src/controllers/adminController.js`)
- Admin operations → Notification service: creates alerts (evidence: `backend/src/controllers/adminController.js`)
- Staff task updates → Campus database: updates tasks (evidence: `backend/src/controllers/staffController.js`)
- QR location routes → Campus database: uses locations
- Notification service → Campus database: stores alerts (evidence: `backend/src/services/notificationService.js`)
- Express API server → Campus database: serves notification reads (evidence: `backend/src/server.js`)
- Campus user → QR scan and management: scans location QR (evidence: `README.md`)
- Admin dashboard → Admin operations: views metrics
- Staff dashboard → Staff task updates: updates assigned work
