# nhanaz/glyph architecture

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

- Interactive diagram: https://gitdiagram.com/nhanaz/glyph
- Repository: https://github.com/nhanaz/glyph

## Overview

##### Project type and purpose
- This is a static single-page web application (“Glyph Tools”) composed of one HTML file, one JavaScript file, and one CSS file.
- It’s deployed via GitHub Pages and has a simple CI/CD workflow (GitHub Actions).

##### File structure
- Top-level files:
– index.html – entry point and UI shell
– script.js – client-side logic for glyph lookups and UI interactions
– styles.css – presentation layer
- .github/workflows/static.yml – defines build/deploy pipeline to GitHub Pages
- README.md – describes purpose, links to external emoji wiki and Discord

##### Main components
a. User’s Web Browser (client)
b. Static Hosting (GitHub Pages)
c. CI/CD Pipeline (GitHub Actions)
d. Frontend assets: HTML, CSS, JS
e. External references (Emoji Wiki, Discord)

##### Relationships and interactions
- User → HTTP GET → GitHub Pages → serves index.html, script.js, styles.css
- Browser loads index.html, then script.js and styles.css
- script.js handles UI events (search for glyphs, show results) entirely in-browser
- GitHub Actions workflow triggered on push → builds (if any) → deploys assets to GitHub Pages
- Links in the UI point to external services:
– Emoji & Text Symbols Wiki (bedrock.dev)
– Discord server

##### Architectural patterns & design principles
- Static site architecture: all logic runs client-side in the browser
- CI/CD for continuous deployment: automated via GitHub Actions
- Single responsibility: HTML for structure, CSS for style, JS for behavior

##### Essential elements checklist
- Component labels: Browser, HTML, CSS, JS, GitHub Pages, GitHub Actions, Wiki, Discord
- Annotations (e.g., “index.html → loads…” or “on push → deploy”)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client
    Browser["User Browser"]:::client

    %% Hosting
    Pages["GitHub Pages Hosting"]:::hosting

    %% Frontend Assets
    subgraph "Frontend Assets"
        HTML["index.html"]:::frontend
        CSS["styles.css"]:::frontend
        JS["script.js"]:::frontend
    end

    %% CI/CD and Repository
    subgraph "GitHub Repository"
        CI["GitHub Actions"]:::ci
        Docs["Repository Docs (README.md)"]:::external
    end

    %% External Services
    Wiki["Emoji & Text Symbols Wiki"]:::external
    Discord["Discord Server"]:::external

    %% Data Flows
    Browser -->|"HTTP GET"| Pages
    Pages -->|"serves assets"| HTML
    Pages -->|"serves assets"| CSS
    Pages -->|"serves assets"| JS

    Browser -->|"loads"| HTML
    Browser -->|"loads"| CSS
    Browser -->|"loads"| JS
    JS -->|"handles UI events"| Browser

    CI -->|"on push / deploy"| Pages

    Browser -->|"hyperlinks"| Wiki
    Browser -->|"hyperlinks"| Discord

    %% Click Events
    click HTML "https://github.com/nhanaz/glyph/blob/master/index.html"
    click CSS "https://github.com/nhanaz/glyph/blob/master/styles.css"
    click JS "https://github.com/nhanaz/glyph/blob/master/script.js"
    click CI "https://github.com/nhanaz/glyph/blob/master/.github/workflows/static.yml"
    click Pages "https://github.com/nhanaz/glyph/tree/master/(project root)"
    click Docs "https://github.com/nhanaz/glyph/blob/master/README.md"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#000,stroke-width:1px
    classDef client fill:#e6f7ff,stroke:#000,stroke-width:1px
    classDef hosting fill:#d4edda,stroke:#000,stroke-width:1px
    classDef ci fill:#ffe5b4,stroke:#000,stroke-width:1px
    classDef external fill:#f0f0f0,stroke:#000,stroke-width:1px
```
