# lizer-webcoder/divine-rays-tech-hub architecture

> Architecture diagram of the GitHub repository lizer-webcoder/divine-rays-tech-hub, 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/lizer-webcoder/divine-rays-tech-hub
- Repository: https://github.com/lizer-webcoder/divine-rays-tech-hub

## Overview

Divine Rays Tech Hub is a browser-based support ticketing system with customer and agent accounts, ticket handling, and browser-local storage; the sampled login code also supports Supabase authentication and profile access. Its principal workflow is customer registration or sign-in, ticket submission and tracking, then agent claim, assignment, status updates, and replies. The repository also contains a separate Tech Log inventory and borrowing interface. README capability links are documented relationships; source excerpts show auth/profile and Tech Log data access, but do not reveal how most ticket modules are wired together.

Main entry points: [`js/app.js`](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/app.js) (Ticket portal), [`supabase/functions/send-ticket-email/index.ts`](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/supabase/functions/send-ticket-email/index.ts) (Ticket email function), [`js/comments-live.js`](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/comments-live.js) (Replies and notes), [`js/tech-log-ui.js`](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/tech-log-ui.js) (Inventory and loans)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and sessions"]
  node_auth["Account access<br/>[app.js]"]
  node_agent_auth["Agent credentials"]
  node_session["Session restoration<br/>[session-guard.js]"]
  node_session_reset["Session reset<br/>[session-reset.js]"]
end

subgraph group_support["Support workflow"]
  node_ticket_app["Ticket portal<br/>[app.js]"]
  node_comments["Replies and notes<br/>[comments-live.js]"]
  node_filters["Ticket filtering<br/>[filters.js]"]
  node_ticket_extras["Satisfaction and reports<br/>[extras.js]"]
  node_quota["Ticket quotas<br/>[ticket-quota.js]"]
  node_remote_session["Remote session requests<br/>[remote-session.js]"]
  node_email_function["Ticket email function<br/>[index.ts]"]
end

subgraph group_agent["Agent operations"]
  node_agent_views["Agent views<br/>[agent-views.js]"]
  node_team_board["Team board<br/>[team-board.js]"]
  node_staff_notifications["Staff notifications"]
end

subgraph group_experience["Product experience"]
  node_login_design["Login interface<br/>[login-theme.js]"]
  node_customer_experience["Customer interface<br/>[customer-ux.js]"]
  node_knowledge_base["Knowledge base<br/>[kb.js]"]
  node_branch_ui["Branch interface<br/>[branch-ui.js]"]
  node_dashboard_ui["Dashboard styling<br/>[sidebar-design.js]"]
end

subgraph group_inventory["Tech Log"]
  node_tech_log["Inventory and loans<br/>[tech-log-ui.js]"]
  node_tech_log_store[("Tech Log records")]
  node_tech_log_ui["Tech Log presentation<br/>[tech-log-ui.js]"]
end

node_customer(("Customer"))
node_agent_actor(("Support agent"))
node_supabase[("Supabase")]
node_resend["Resend email"]

node_customer -->|"registers or signs in"| node_auth
node_agent_actor -->|"registers or signs in"| node_agent_auth
node_customer -->|"submits and tracks"| node_ticket_app
node_agent_actor -->|"claims and assigns"| node_ticket_app
node_agent_actor -->|"changes status"| node_ticket_app
node_customer -->|"replies publicly"| node_comments
node_agent_actor -->|"replies or notes"| node_comments
node_auth -->|"authenticates and reads profiles"| node_supabase
node_tech_log -->|"reads and writes"| node_tech_log_store
node_email_function -->|"looks up recipient"| node_supabase
node_email_function -->|"sends email"| node_resend

click node_auth "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/app.js"
click node_agent_auth "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/agent-username-auth.js"
click node_session "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/session-guard.js"
click node_session_reset "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/session-reset.js"
click node_ticket_app "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/app.js"
click node_comments "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/comments-live.js"
click node_filters "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/filters.js"
click node_ticket_extras "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/extras.js"
click node_quota "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/ticket-quota.js"
click node_remote_session "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/remote-session.js"
click node_agent_views "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/agent-views.js"
click node_team_board "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/team-board.js"
click node_staff_notifications "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/staff-ticket-notifs.js"
click node_tech_log "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/tech-log-ui.js"
click node_login_design "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/login-theme.js"
click node_customer_experience "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/customer-ux.js"
click node_knowledge_base "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/kb.js"
click node_branch_ui "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/branch-ui.js"
click node_dashboard_ui "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/sidebar-design.js"
click node_tech_log_ui "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/tech-log-ui.js"
click node_email_function "https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/supabase/functions/send-ticket-email/index.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_auth,node_agent_auth,node_session,node_session_reset toneBlue
class node_ticket_app,node_comments,node_filters,node_ticket_extras,node_quota,node_remote_session,node_email_function,node_supabase toneAmber
class node_agent_views,node_team_board,node_staff_notifications toneMint
class node_login_design,node_customer_experience,node_knowledge_base,node_branch_ui,node_dashboard_ui toneRose
class node_tech_log,node_tech_log_store,node_tech_log_ui,node_customer,node_agent_actor,node_resend toneIndigo
```

## Components

### Identity and sessions

- [Account access](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/app.js): `js/app.js`
- [Agent credentials](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/agent-username-auth.js): `js/agent-username-auth.js`
- [Session restoration](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/session-guard.js): `js/session-guard.js`
- [Session reset](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/session-reset.js): `js/session-reset.js`

### Support workflow

- [Ticket portal](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/app.js): `js/app.js`
- [Replies and notes](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/comments-live.js): `js/comments-live.js`
- [Ticket filtering](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/filters.js): `js/filters.js`
- [Satisfaction and reports](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/extras.js): `js/extras.js`
- [Ticket quotas](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/ticket-quota.js): `js/ticket-quota.js`
- [Remote session requests](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/remote-session.js): `js/remote-session.js`
- [Ticket email function](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/supabase/functions/send-ticket-email/index.ts): `supabase/functions/send-ticket-email/index.ts`

### Agent operations

- [Agent views](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/agent-views.js): `js/agent-views.js`
- [Team board](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/team-board.js): `js/team-board.js`
- [Staff notifications](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/staff-ticket-notifs.js): `js/staff-ticket-notifs.js`

### Product experience

- [Login interface](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/login-theme.js): `js/login-theme.js`
- [Customer interface](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/customer-ux.js): `js/customer-ux.js`
- [Knowledge base](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/kb.js): `js/kb.js`
- [Branch interface](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/branch-ui.js): `js/branch-ui.js`
- [Dashboard styling](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/sidebar-design.js): `js/sidebar-design.js`

### Tech Log

- [Inventory and loans](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/tech-log-ui.js): `js/tech-log-ui.js`
- **Tech Log records**
- [Tech Log presentation](https://github.com/lizer-webcoder/divine-rays-tech-hub/blob/main/js/tech-log-ui.js): `js/tech-log-ui.js`

### Other components

- **Customer**
- **Support agent**
- **Supabase**
- **Resend email**

## Connections

- Customer → Account access: registers or signs in
- Support agent → Agent credentials: registers or signs in
- Customer → Ticket portal: submits and tracks
- Support agent → Ticket portal: claims and assigns
- Support agent → Ticket portal: changes status
- Customer → Replies and notes: replies publicly
- Support agent → Replies and notes: replies or notes
- Account access → Supabase: authenticates and reads profiles (evidence: `js/app.js`)
- Inventory and loans → Tech Log records: reads and writes (evidence: `js/tech-log-ui.js`)
- Ticket email function → Supabase: looks up recipient (evidence: `supabase/functions/send-ticket-email/index.ts`)
- Ticket email function → Resend email: sends email (evidence: `supabase/functions/send-ticket-email/index.ts`)
