# chrisladzamach/lqh-program architecture

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

- Interactive diagram: https://gitdiagram.com/chrisladzamach/lqh-program
- Repository: https://github.com/chrisladzamach/lqh-program

## Overview

##### Project Type & Purpose
- Type: Static Site built with Astro (a static site generator).
- Purpose: Present Taekwondo content (techniques, forms/poomsaes, ranks) as a browsable website.

##### High-Level Architectural Components
- Development Environment
– Source Repos: Git (project root with .gitignore)
– Editor/IDE Config: VSCode settings under .vscode
– TypeScript config: tsconfig.json
- Build Tool
– Astro config (astro.config.mjs) driving static generation
– package.json & package-lock.json for Node.js dependencies
- Source Structure (src/)
– src/pages: Individual route files (.astro) generating each HTML page
– src/layouts: Shared page wrappers (Layout.astro)
– src/components: Reusable UI pieces (Header, BackButton, GradeCard, etc.)
– src/data: TypeScript modules exporting structured content (poomsaes, grades, techniques)
– src/styles: Global CSS definitions
- Public Assets
– public/manifest.webmanifest & any static files directly copied to dist
- Build Output (dist/)
– Fully static HTML/CSS/JS tree ready for deployment
– Manifest, CSS bundle under dist/_astro
- Deployment Target
– CDN or static-site host (e.g., Netlify, Vercel, GitHub Pages) serving dist/

##### Relationships & Data Flow
1. Developer writes/updates .astro pages, components, data in src/
2. npm run build (Astro) reads astro.config.mjs → compiles pages + layouts + components + data → emits static assets to dist/
3. CI/CD (optional) picks up dist/ → deploys to static‐site host/CDN
4. Browser requests URL → CDN serves prebuilt HTML/CSS/JS from dist/

##### Key Architectural Patterns
- Static Site Generation (SSG): One‐time build → static assets
- Component Composition: Pages import shared components & data modules
- Data-Driven Routing: File-based routing in src/pages, with data from src/data
- Separation of Concerns:
– src/pages for routing
– src/components for UI
– src/data for content
– public/ for truly static files

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Environment
    subgraph "Development Environment"
        GITIGNORE[".gitignore"]:::source
        VSCODE[".vscode/"]:::source
        TSCONFIG["tsconfig.json"]:::source
    end

    %% Build Tool
    subgraph "Build Tool"
        ASTROCFG["astro.config.mjs"]:::build
        PKG["package.json"]:::build
        PKGLK["package-lock.json"]:::build
    end

    %% Source Code
    subgraph "Source Code"
        SRC_PAGES["src/pages/"]:::source
        LAYOUT["src/layouts/Layout.astro"]:::source
        subgraph "Components"
            BACKBTN["BackButton.astro"]:::source
            BUTTONMENU["ButtonMenu.astro"]:::source
            GRADECARD["GradeCard.astro"]:::source
            GRADEPROGRAM["GradeProgram.astro"]:::source
            HEADER["Header.astro"]:::source
            MUGICHASEDATA["MugiChaseData.astro"]:::source
            POOMSAEBYNAME["PoomsaeByName.astro"]:::source
            TECHBYGRADE["TechniquesByGrade.astro"]:::source
        end
        subgraph "Data Modules"
            DATA_GIBEOM["gibeom.ts"]:::source
            DATA_GRADEPROGRAM["gradeProgram.ts"]:::source
            DATA_HOSHINSUL["hoShinSul.ts"]:::source
            DATA_MUGIGIBEOM["mugiGibeom.ts"]:::source
            DATA_MUGIPOOMSAES["mugiPoomsaes.ts"]:::source
            DATA_POOMSAES["poomsaes.ts"]:::source
        end
        ASSETS["src/assets/"]:::source
        ARROWICON["src/icons/Arrow.astro"]:::source
        STYLES["src/styles/global.css"]:::source
    end

    %% Public Assets
    PUBLIC["public/manifest.webmanifest"]:::source

    %% Build Engine
    BuildEngine["Astro Build Engine<br/>(Astro + Node.js + npm)"]:::build

    %% Output
    DIST["dist/<br/>Static Assets"]:::output

    %% Deployment
    CDN["CDN/Static Hosting"]:::deploy

    %% Client
    BROWSER["User Browser"]:::client

    %% Relationships
    GITIGNORE --> BuildEngine
    VSCODE --> BuildEngine
    TSCONFIG --> BuildEngine
    ASTROCFG --> BuildEngine
    PKG --> BuildEngine
    PKGLK --> BuildEngine
    SRC_PAGES --> BuildEngine
    LAYOUT --> BuildEngine
    BACKBTN --> BuildEngine
    BUTTONMENU --> BuildEngine
    GRADECARD --> BuildEngine
    GRADEPROGRAM --> BuildEngine
    HEADER --> BuildEngine
    MUGICHASEDATA --> BuildEngine
    POOMSAEBYNAME --> BuildEngine
    TECHBYGRADE --> BuildEngine
    DATA_GIBEOM --> BuildEngine
    DATA_GRADEPROGRAM --> BuildEngine
    DATA_HOSHINSUL --> BuildEngine
    DATA_MUGIGIBEOM --> BuildEngine
    DATA_MUGIPOOMSAES --> BuildEngine
    DATA_POOMSAES --> BuildEngine
    ASSETS --> BuildEngine
    ARROWICON --> BuildEngine
    STYLES --> BuildEngine
    PUBLIC --> BuildEngine

    BuildEngine -->|"generate static site"| DIST
    DIST -->|"deploy artifacts"| CDN
    BROWSER -->|"HTTP GET"| CDN
    CDN -->|"HTTP Response (HTML/CSS/JS)"| BROWSER

    %% Click Events
    click GITIGNORE "https://github.com/chrisladzamach/lqh-program/blob/master/.gitignore"
    click VSCODE "https://github.com/chrisladzamach/lqh-program/tree/master/.vscode/"
    click TSCONFIG "https://github.com/chrisladzamach/lqh-program/blob/master/tsconfig.json"
    click ASTROCFG "https://github.com/chrisladzamach/lqh-program/blob/master/astro.config.mjs"
    click PKG "https://github.com/chrisladzamach/lqh-program/blob/master/package.json"
    click PKGLK "https://github.com/chrisladzamach/lqh-program/blob/master/package-lock.json"
    click SRC_PAGES "https://github.com/chrisladzamach/lqh-program/tree/master/src/pages/"
    click LAYOUT "https://github.com/chrisladzamach/lqh-program/blob/master/src/layouts/Layout.astro"
    click BACKBTN "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/BackButton.astro"
    click BUTTONMENU "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/ButtonMenu.astro"
    click GRADECARD "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/GradeCard.astro"
    click GRADEPROGRAM "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/GradeProgram.astro"
    click HEADER "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/Header.astro"
    click MUGICHASEDATA "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/MugiChaseData.astro"
    click POOMSAEBYNAME "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/PoomsaeByName.astro"
    click TECHBYGRADE "https://github.com/chrisladzamach/lqh-program/blob/master/src/components/TechniquesByGrade.astro"
    click DATA_GIBEOM "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/gibeom.ts"
    click DATA_GRADEPROGRAM "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/gradeProgram.ts"
    click DATA_HOSHINSUL "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/hoShinSul.ts"
    click DATA_MUGIGIBEOM "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/mugiGibeom.ts"
    click DATA_MUGIPOOMSAES "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/mugiPoomsaes.ts"
    click DATA_POOMSAES "https://github.com/chrisladzamach/lqh-program/blob/master/src/data/poomsaes.ts"
    click ASSETS "https://github.com/chrisladzamach/lqh-program/tree/master/src/assets/"
    click ARROWICON "https://github.com/chrisladzamach/lqh-program/blob/master/src/icons/Arrow.astro"
    click STYLES "https://github.com/chrisladzamach/lqh-program/blob/master/src/styles/global.css"
    click PUBLIC "https://github.com/chrisladzamach/lqh-program/blob/master/public/manifest.webmanifest"
    click DIST "https://github.com/chrisladzamach/lqh-program/tree/master/dist/"

    %% Styles
    classDef source fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef build fill:#ffe5cc,stroke:#333,stroke-width:1px
    classDef output fill:#d5f5d5,stroke:#333,stroke-width:1px
    classDef deploy fill:#e6ccff,stroke:#333,stroke-width:1px
    classDef client fill:#f2f2f2,stroke:#333,stroke-width:1px
```
