# gigachad80/project-chhi architecture

> Architecture diagram of the GitHub repository gigachad80/project-chhi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gigachad80/project-chhi
- Repository: https://github.com/gigachad80/project-chhi

## Overview

##### Project type and purpose
- This is a static, front-end–only web portal (single-page application) that aggregates official cybercrime reporting links for 195 countries.
- No backend or database is included—everything lives in index.html, style.css, and script.js.

##### File structure
- Top-level files:
– index.html: entry point, markup and containers for the UI
– style.css: all styling and layout rules
– script.js: data (hard-coded list of country portals) and client-side logic
- There are no directories for “backend,” “api,” or “data,” indicating a pure static-hosting deployment model.

##### README for additional insights
- Confirms “nothing” in dependencies—no server, no build step.
- Usage: users load the page, choose a country, select a category, click through to an official external site.
- Future roadmap: AI chatbot integration (not yet implemented).

a. Main components:
- User’s Web Browser (UI/UX layer)
- Static Web Server or CDN (hosting index.html, style.css, script.js)
- External Government Portals (195+ third-party services)
- (Future) AI Chatbot Service (planned integration)
b. Relationships & interactions:
1. Browser issues HTTP GET to the Static Web Server.
2. Server responds with HTML, CSS, JS.
3. Browser renders UI; script.js loads the inlined data structure of portals.
4. User selects country and category; browser navigates directly to the chosen External Portal URL.
5. (Future) Browser sends user query/context to AI Chatbot Service; Chatbot suggests a portal.
c. Architectural patterns & principles:
- Single-Page Application (SPA) style: client-side filtering with inlined data.
- CDN/static-hosting pattern: zero backend maintenance.
- Low-coupling to external services—pure hyperlink delegation.
d. Key technologies/frameworks:
- HTML5, CSS3, Vanilla JavaScript
- Static host or CDN (Netlify, GitHub Pages, S3)
- External Government Portal URLs (HTTP/HTTPS)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Components
    UB["User's Web Browser"]:::static
    SH["Static Hosting / CDN"]:::static
    NB["Backend Tier<br/>None / N/A"]:::none
    EG["External Government Portals"]:::external
    AI["AI Chatbot Service<br/>(Future)"]:::future

    %% Static Assets
    HTML["index.html"]:::static
    CSS["style.css"]:::static
    JS["script.js"]:::static

    %% Relationships
    UB -->|"HTTP GET static assets"| SH
    SH -->|"Serves HTML"| HTML
    SH -->|"Serves CSS"| CSS
    SH -->|"Serves JS"| JS
    HTML -->|"Render UI"| UB
    CSS -->|"Apply Styles"| UB
    JS -->|"Execute Logic & Load Data"| UB
    UB -->|"Navigate to selected portal"| EG
    UB -.->|"Send user query"| AI
    SH -.->|"No backend available"| NB

    %% Click Events
    click UB "https://github.com/gigachad80/project-chhi/blob/main/index.html"
    click HTML "https://github.com/gigachad80/project-chhi/blob/main/index.html"
    click CSS "https://github.com/gigachad80/project-chhi/blob/main/style.css"
    click JS "https://github.com/gigachad80/project-chhi/blob/main/script.js"
    click EG "https://github.com/gigachad80/project-chhi/blob/main/script.js"

    %% Styles
    classDef static fill:#cfe2f3,stroke:#0366d6,color:#000;
    classDef none fill:#e0e0e0,stroke:#666,color:#000;
    classDef external fill:#d9ead3,stroke:#6aa84f,color:#000;
    classDef future fill:#fce5cd,stroke:#e69138,stroke-dasharray:5 5,color:#000;
```
