# tripathiriya2117-a11y/cyberhelp architecture

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

- Interactive diagram: https://gitdiagram.com/tripathiriya2117-a11y/cyberhelp
- Repository: https://github.com/tripathiriya2117-a11y/cyberhelp

## Overview

CyberHelp is a Flask-based community cyber-safety helpdesk. Visitors browse safety guidance and scam patterns, use validation tools, take a quiz, consult FAQs/reporting guidance, or ask the assistant; administrators manage the content and review quiz activity. The map emphasizes the documented capabilities and the sampled routes, client requests, and SQLite helper. Several templates and app.py sections were not sampled, so some documented subsystems have no asserted implementation-level links.

Main entry points: [`app.py`](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/app.py) (Flask Routes), [`static/js/main.js`](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/main.js) (Quiz Engine), [`templates/tools.html`](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/tools.html) (Safety Tools), [`db.py`](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/db.py) (SQLite Access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Visitor Helpdesk"]
  node_app["Flask Routes<br/>[app.py]"]
  node_home["Helpdesk Home<br/>[index.html]"]
  node_chat_page["Assistant Page<br/>[chatbot.html]"]
  node_chat_ui["Chatbot UI<br/>[chatbot.js]"]
  node_gemini{{"Gemini API"}}
end

subgraph group_learning["Learning Content"]
  node_awareness["Awareness Hub<br/>[awareness.html]"]
  node_scams["Scam Library<br/>[scam_library.html]"]
  node_quiz["Safety Quiz<br/>[quiz.html]"]
  node_quiz_ui["Quiz Engine<br/>[main.js]"]
  node_faqs["FAQs<br/>[faqs.html]"]
  node_reporting["Reporting Guide<br/>[reporting.html]"]
end

subgraph group_tools["Safety Tools"]
  node_tools_page["Safety Tools<br/>[tools.html]"]
  node_password["Password Analyzer<br/>[password_tool.js]"]
  node_url_ui["URL Scanner UI<br/>[url_checker.js]"]
end

subgraph group_admin["Administration"]
  node_admin_login["Admin Login<br/>[login.html]"]
  node_admin_dash["Admin Dashboard<br/>[dashboard.html]"]
  node_crud["Content Management"]
end

subgraph group_data["Application Data"]
  node_db_helper["SQLite Access<br/>[db.py]"]
  node_sqlite[("CyberHelp Database<br/>[schema.sql]")]
end

node_visitor(("Visitor"))
node_admin_actor(("Administrator"))

node_visitor -->|"requests pages"| node_app
node_app -.->|"renders"| node_home
node_app -.->|"renders"| node_awareness
node_app -.->|"renders"| node_scams
node_app -.->|"renders"| node_quiz
node_quiz_ui -->|"submits answers"| node_app
node_app -.->|"returns results"| node_quiz_ui
node_app -.->|"renders"| node_faqs
node_app -.->|"renders"| node_reporting
node_app -.->|"renders"| node_tools_page
node_url_ui -->|"scans URL"| node_app
node_tools_page -.->|"hosts analyzer"| node_password
node_app -.->|"renders"| node_chat_page
node_chat_ui -->|"sends message"| node_app
node_app -.->|"requests response"| node_gemini
node_admin_actor -.->|"signs in"| node_admin_login
node_admin_actor -.->|"manages content"| node_crud
node_app -.->|"serves dashboard"| node_admin_dash
node_app -.->|"serves management"| node_crud
node_app -->|"uses database access"| node_db_helper
node_db_helper -->|"reads and writes"| node_sqlite
node_app -->|"stores quiz scores"| node_sqlite

click node_app "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/app.py"
click node_home "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/index.html"
click node_awareness "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/awareness.html"
click node_scams "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/scam_library.html"
click node_quiz "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/quiz.html"
click node_quiz_ui "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/main.js"
click node_faqs "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/faqs.html"
click node_reporting "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/reporting.html"
click node_tools_page "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/tools.html"
click node_password "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/password_tool.js"
click node_url_ui "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/url_checker.js"
click node_chat_page "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/chatbot.html"
click node_chat_ui "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/chatbot.js"
click node_admin_login "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/admin/login.html"
click node_admin_dash "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/admin/dashboard.html"
click node_crud "https://github.com/tripathiriya2117-a11y/cyberhelp/tree/main/templates/admin"
click node_db_helper "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/db.py"
click node_sqlite "https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/schema.sql"

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_home,node_chat_page,node_chat_ui,node_gemini toneBlue
class node_awareness,node_scams,node_quiz,node_quiz_ui,node_faqs,node_reporting toneAmber
class node_tools_page,node_password,node_url_ui toneMint
class node_admin_login,node_admin_dash,node_crud toneRose
class node_db_helper,node_sqlite,node_visitor,node_admin_actor toneIndigo
```

## Components

### Visitor Helpdesk

- [Flask Routes](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/app.py): `app.py`
- [Helpdesk Home](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/index.html): `templates/index.html`
- [Assistant Page](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/chatbot.html): `templates/chatbot.html`
- [Chatbot UI](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/chatbot.js): `static/js/chatbot.js`
- **Gemini API**

### Learning Content

- [Awareness Hub](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/awareness.html): `templates/awareness.html`
- [Scam Library](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/scam_library.html): `templates/scam_library.html`
- [Safety Quiz](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/quiz.html): `templates/quiz.html`
- [Quiz Engine](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/main.js): `static/js/main.js`
- [FAQs](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/faqs.html): `templates/faqs.html`
- [Reporting Guide](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/reporting.html): `templates/reporting.html`

### Safety Tools

- [Safety Tools](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/tools.html): `templates/tools.html`
- [Password Analyzer](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/password_tool.js): `static/js/password_tool.js`
- [URL Scanner UI](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/static/js/url_checker.js): `static/js/url_checker.js`

### Administration

- [Admin Login](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/admin/login.html): `templates/admin/login.html`
- [Admin Dashboard](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/templates/admin/dashboard.html): `templates/admin/dashboard.html`
- [Content Management](https://github.com/tripathiriya2117-a11y/cyberhelp/tree/main/templates/admin): `templates/admin`

### Application Data

- [SQLite Access](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/db.py): `db.py`
- [CyberHelp Database](https://github.com/tripathiriya2117-a11y/cyberhelp/blob/main/schema.sql): `schema.sql`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Flask Routes: requests pages (evidence: `README.md`)
- Flask Routes → Helpdesk Home: renders
- Flask Routes → Awareness Hub: renders
- Flask Routes → Scam Library: renders
- Flask Routes → Safety Quiz: renders
- Quiz Engine → Flask Routes: submits answers (evidence: `static/js/main.js`)
- Flask Routes → Quiz Engine: returns results
- Flask Routes → FAQs: renders
- Flask Routes → Reporting Guide: renders
- Flask Routes → Safety Tools: renders
- URL Scanner UI → Flask Routes: scans URL (evidence: `static/js/url_checker.js`)
- Safety Tools → Password Analyzer: hosts analyzer
- Flask Routes → Assistant Page: renders
- Chatbot UI → Flask Routes: sends message (evidence: `static/js/chatbot.js`)
- Flask Routes → Gemini API: requests response
- Administrator → Admin Login: signs in
- Administrator → Content Management: manages content
- Flask Routes → Admin Dashboard: serves dashboard
- Flask Routes → Content Management: serves management
- Flask Routes → SQLite Access: uses database access (evidence: `app.py`)
- SQLite Access → CyberHelp Database: reads and writes (evidence: `db.py`)
- Flask Routes → CyberHelp Database: stores quiz scores (evidence: `app.py`)
