# anushtha30/-it-support-ticket-system-full-stack-project architecture

> Architecture diagram of the GitHub repository anushtha30/-it-support-ticket-system-full-stack-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anushtha30/-it-support-ticket-system-full-stack-project
- Repository: https://github.com/anushtha30/-it-support-ticket-system-full-stack-project

## Overview

This is a role-based IT support ticket portal. Students and faculty submit and track issues; admins review, assign, and advance tickets, while both sides exchange comments and use role-scoped statistics. The visible backend routes validate requests and delegate operations to storage; authentication supports Replit OIDC and development demo mode. The README documents additional ticket, comment, staff, and analytics capabilities, but their client-side wiring is not fully evidenced in the sampled excerpts, so those links are omitted or documented at the API boundary.

Main entry points: [`storage.ts`](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/storage.ts) (Ticket storage), [`App.tsx`](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/App.tsx) (App router), [`routes.ts`](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts) (Auth endpoints), [`replitAuth.ts`](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/replitAuth.ts) (OIDC and sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Web portal"]
  node_app["App router<br/>[App.tsx]"]
  node_landing["Landing page<br/>[landing.tsx]"]
  node_home["Ticket workspace<br/>[home.tsx]"]
  node_ticket_form["Ticket submission<br/>[ticket-form.tsx]"]
  node_admin_ui["Admin dashboard<br/>[admin.tsx]"]
  node_ticket_card["Ticket display<br/>[ticket-card.tsx]"]
  node_ticket_modal["Ticket details<br/>[ticket-modal.tsx]"]
  node_client_auth["Auth query hook<br/>[useAuth.ts]"]
  node_client_queries["API query client<br/>[queryClient.ts]"]
end

subgraph group_api["Ticket API"]
  node_ticket_api["Ticket endpoints<br/>[routes.ts]"]
  node_comment_api["Comment endpoints<br/>[routes.ts]"]
  node_stats_api["Stats endpoints<br/>[routes.ts]"]
  node_staff_api["IT staff endpoint<br/>[routes.ts]"]
end

subgraph group_identity["Identity"]
  node_auth_api["Auth endpoints<br/>[routes.ts]"]
  node_oidc["OIDC and sessions<br/>[replitAuth.ts]"]
  node_demo_mode["Demo identities<br/>[demo.ts]"]
end

subgraph group_persistence["Persistence"]
  node_storage["Ticket storage<br/>[storage.ts]"]
  node_database[("PostgreSQL database<br/>[db.ts]")]
  node_schema["Domain schema<br/>[schema.ts]"]
end

node_users(("Students and staff"))

node_users -->|"use portal"| node_app
node_app -->|"checks identity"| node_client_auth
node_app -->|"routes unauthenticated"| node_landing
node_app -->|"routes authenticated"| node_home
node_users -->|"submit and track"| node_ticket_api
node_ticket_api -->|"reads and updates tickets"| node_storage
node_ticket_api -->|"validates ticket input"| node_schema
node_users -->|"exchange comments"| node_comment_api
node_comment_api -->|"reads and adds comments"| node_storage
node_users -->|"view analytics"| node_stats_api
node_stats_api -->|"requests statistics"| node_storage
node_users -->|"admin lists staff"| node_staff_api
node_staff_api -->|"requests staff list"| node_storage
node_auth_api -->|"configures authentication"| node_oidc
node_auth_api -->|"resolves demo users"| node_demo_mode
node_auth_api -->|"loads user profile"| node_storage
node_oidc -->|"upserts profile"| node_storage
node_storage -->|"queries database"| node_database
node_ticket_form -.->|"submits ticket"| node_client_queries
node_admin_ui -.->|"manages tickets"| node_client_queries
node_ticket_card -.->|"opens details"| node_ticket_modal

click node_app "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/App.tsx"
click node_landing "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/landing.tsx"
click node_home "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/home.tsx"
click node_ticket_form "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-form.tsx"
click node_admin_ui "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/admin.tsx"
click node_ticket_card "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-card.tsx"
click node_ticket_modal "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-modal.tsx"
click node_client_auth "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/useAuth.ts"
click node_client_queries "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/queryClient.ts"
click node_ticket_api "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts"
click node_comment_api "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts"
click node_stats_api "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts"
click node_staff_api "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts"
click node_auth_api "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts"
click node_oidc "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/replitAuth.ts"
click node_demo_mode "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/demo.ts"
click node_storage "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/storage.ts"
click node_database "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/db.ts"
click node_schema "https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/schema.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_app,node_landing,node_home,node_ticket_form,node_admin_ui,node_ticket_card,node_ticket_modal,node_client_auth,node_client_queries toneBlue
class node_ticket_api,node_comment_api,node_stats_api,node_staff_api toneAmber
class node_auth_api,node_oidc,node_demo_mode toneMint
class node_storage,node_database,node_schema toneRose
class node_users toneIndigo
```

## Components

### Web portal

- [App router](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/App.tsx): `App.tsx`
- [Landing page](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/landing.tsx): `landing.tsx`
- [Ticket workspace](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/home.tsx): `home.tsx`
- [Ticket submission](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-form.tsx): `ticket-form.tsx`
- [Admin dashboard](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/admin.tsx): `admin.tsx`
- [Ticket display](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-card.tsx): `ticket-card.tsx`
- [Ticket details](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/ticket-modal.tsx): `ticket-modal.tsx`
- [Auth query hook](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/useAuth.ts): `useAuth.ts`
- [API query client](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/queryClient.ts): `queryClient.ts`

### Ticket API

- [Ticket endpoints](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts): `routes.ts`
- [Comment endpoints](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts): `routes.ts`
- [Stats endpoints](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts): `routes.ts`
- [IT staff endpoint](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts): `routes.ts`

### Identity

- [Auth endpoints](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/routes.ts): `routes.ts`
- [OIDC and sessions](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/replitAuth.ts): `replitAuth.ts`
- [Demo identities](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/demo.ts): `demo.ts`

### Persistence

- [Ticket storage](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/storage.ts): `storage.ts`
- [PostgreSQL database](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/db.ts): `db.ts`
- [Domain schema](https://github.com/anushtha30/-it-support-ticket-system-full-stack-project/blob/main/schema.ts): `schema.ts`

### Other components

- **Students and staff**

## Connections

- Students and staff → App router: use portal
- App router → Auth query hook: checks identity (evidence: `App.tsx`)
- App router → Landing page: routes unauthenticated (evidence: `App.tsx`)
- App router → Ticket workspace: routes authenticated (evidence: `App.tsx`)
- Students and staff → Ticket endpoints: submit and track
- Ticket endpoints → Ticket storage: reads and updates tickets (evidence: `routes.ts`)
- Ticket endpoints → Domain schema: validates ticket input (evidence: `routes.ts`)
- Students and staff → Comment endpoints: exchange comments
- Comment endpoints → Ticket storage: reads and adds comments (evidence: `routes.ts`)
- Students and staff → Stats endpoints: view analytics
- Stats endpoints → Ticket storage: requests statistics (evidence: `routes.ts`)
- Students and staff → IT staff endpoint: admin lists staff
- IT staff endpoint → Ticket storage: requests staff list (evidence: `routes.ts`)
- Auth endpoints → OIDC and sessions: configures authentication (evidence: `routes.ts`)
- Auth endpoints → Demo identities: resolves demo users (evidence: `routes.ts`)
- Auth endpoints → Ticket storage: loads user profile (evidence: `routes.ts`)
- OIDC and sessions → Ticket storage: upserts profile (evidence: `replitAuth.ts`)
- Ticket storage → PostgreSQL database: queries database (evidence: `storage.ts`)
- Ticket submission → API query client: submits ticket
- Admin dashboard → API query client: manages tickets
- Ticket display → Ticket details: opens details
