# rakeshpalanivel/ai-support-portal architecture

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

- Interactive diagram: https://gitdiagram.com/rakeshpalanivel/ai-support-portal
- Repository: https://github.com/rakeshpalanivel/ai-support-portal

## Overview

Vision Support is a browser-only customer ticketing site and support portal. Customers submit requests, receive ticket IDs, and can use built-in AI for category, priority, and summary. Support staff use an allow-listed name-and-email login to review insights and tickets, update status, and prepare replies. Tickets and AI settings persist in browser storage; Gemini re-analysis is optional, and email replies open the user’s email client. The README documents these capabilities; the partial source excerpt confirms storage, authentication, AI fallback, and settings, but does not expose all UI call paths.

Main entry points: [`script.js`](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js) (Ticket detail), [`index.html`](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/index.html) (Customer site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer intake"]
  node_site["Customer site<br/>[index.html]"]
  node_request_form["Request form<br/>[script.js]"]
  node_intake_ai["Intake analysis<br/>[script.js]"]
  node_ticket_id["Ticket confirmation<br/>[script.js]"]
end

subgraph group_support["Support portal"]
  node_login["Staff login<br/>[script.js]"]
  node_dashboard["Ticket dashboard<br/>[script.js]"]
  node_insights["AI insights<br/>[script.js]"]
  node_ticket_list["Ticket list<br/>[script.js]"]
  node_ticket_detail["Ticket detail<br/>[script.js]"]
  node_status_updates["Status updates<br/>[script.js]"]
  node_suggested_reply["Suggested reply<br/>[script.js]"]
  node_ai_settings["AI settings<br/>[script.js]"]
end

subgraph group_services["Browser services"]
  node_ticket_store[("Ticket storage<br/>[script.js]")]
  node_session_store[("Session storage<br/>[script.js]")]
  node_settings_store[("Settings storage<br/>[script.js]")]
end

node_customer_actor(("Customer"))
node_support_actor(("Support staff"))
node_gemini["Google Gemini"]
node_email_client["Email client"]

node_customer_actor -->|"opens"| node_site
node_site -->|"offers"| node_request_form
node_request_form -->|"analyzes request"| node_intake_ai
node_request_form -->|"submits ticket"| node_ticket_store
node_request_form -->|"returns ID"| node_ticket_id
node_support_actor -->|"signs in"| node_login
node_login -->|"stores session"| node_session_store
node_login -->|"opens portal"| node_dashboard
node_dashboard -->|"reads tickets"| node_ticket_store
node_dashboard -->|"shows insights"| node_insights
node_ticket_list -->|"reads tickets"| node_ticket_store
node_ticket_list -->|"opens ticket"| node_ticket_detail
node_ticket_detail -->|"reads ticket"| node_ticket_store
node_ticket_detail -->|"updates status"| node_status_updates
node_status_updates -->|"saves status"| node_ticket_store
node_ticket_detail -->|"creates suggestion"| node_suggested_reply
node_suggested_reply -->|"opens reply"| node_email_client
node_ai_settings -->|"saves settings"| node_settings_store
node_ticket_detail -.->|"reanalyzes optionally"| node_gemini
node_ai_settings -.->|"configures optionally"| node_gemini

click node_site "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/index.html"
click node_request_form "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_intake_ai "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_ticket_id "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_login "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_dashboard "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_insights "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_ticket_list "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_ticket_detail "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_status_updates "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_suggested_reply "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_ai_settings "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_ticket_store "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_session_store "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js"
click node_settings_store "https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.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_site,node_request_form,node_intake_ai,node_ticket_id,node_email_client toneBlue
class node_login,node_dashboard,node_insights,node_ticket_list,node_ticket_detail,node_status_updates,node_suggested_reply,node_ai_settings toneAmber
class node_ticket_store,node_session_store,node_settings_store toneMint
class node_customer_actor,node_support_actor,node_gemini toneIndigo
```

## Components

### Customer intake

- [Customer site](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/index.html): `index.html`
- [Request form](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Intake analysis](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Ticket confirmation](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`

### Support portal

- [Staff login](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Ticket dashboard](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [AI insights](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Ticket list](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Ticket detail](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Status updates](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Suggested reply](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [AI settings](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`

### Browser services

- [Ticket storage](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Session storage](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`
- [Settings storage](https://github.com/rakeshpalanivel/ai-support-portal/blob/main/script.js): `script.js`

### Other components

- **Customer**
- **Support staff**
- **Google Gemini**
- **Email client**

## Connections

- Customer → Customer site: opens (evidence: `README.md`)
- Customer site → Request form: offers (evidence: `README.md`)
- Request form → Intake analysis: analyzes request (evidence: `README.md`)
- Request form → Ticket storage: submits ticket (evidence: `README.md`)
- Request form → Ticket confirmation: returns ID (evidence: `README.md`)
- Support staff → Staff login: signs in (evidence: `README.md`)
- Staff login → Session storage: stores session (evidence: `script.js`)
- Staff login → Ticket dashboard: opens portal (evidence: `README.md`)
- Ticket dashboard → Ticket storage: reads tickets (evidence: `README.md`)
- Ticket dashboard → AI insights: shows insights (evidence: `README.md`)
- Ticket list → Ticket storage: reads tickets (evidence: `README.md`)
- Ticket list → Ticket detail: opens ticket (evidence: `README.md`)
- Ticket detail → Ticket storage: reads ticket (evidence: `README.md`)
- Ticket detail → Status updates: updates status (evidence: `README.md`)
- Status updates → Ticket storage: saves status (evidence: `README.md`)
- Ticket detail → Suggested reply: creates suggestion (evidence: `README.md`)
- Suggested reply → Email client: opens reply (evidence: `README.md`)
- AI settings → Settings storage: saves settings (evidence: `script.js`)
- Ticket detail → Google Gemini: reanalyzes optionally (evidence: `README.md`)
- AI settings → Google Gemini: configures optionally (evidence: `README.md`)
