# ga-el/cbtis224 architecture

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

- Interactive diagram: https://gitdiagram.com/ga-el/cbtis224
- Repository: https://github.com/ga-el/cbtis224

## Overview

##### Project Type & Purpose
- This is a static site generator (SSG) project built with Astro.
- Its primary function is to transform `.astro` templates and Markdown/JSX content into static HTML/CSS/JS and deploy to Netlify for CDN-backed hosting.

##### Main Architectural Components
a. Developer Environment
- Local file tree: `/src/pages`, `/src/layouts`, `/src/assets`, `/public/`
- Astro CLI & Node.js runtime
- Version control (Git) in `.gitignore`/`.vscode`
b. Build System
- Astro build pipeline (`npm run build`)
- Static output folder (`dist/`—not shown but implied)
c. Hosting & Deployment
- Netlify (configured via `netlify.toml`)
- CDN edge nodes serving static assets
d. Client
- Browser fetching static assets (HTML/CSS/JS, images)

##### Relationships & Data Flow
- Developer pushes code → Git repository
- Netlify hooks into Git → triggers Astro build
- Astro CLI reads `/src` + `/public` → generates `/dist`
- Netlify deploys `/dist` to CDN
- End user’s browser requests pages/assets from CDN

##### Architectural Patterns & Design Principles
- File-based routing: every `.astro` in `/src/pages` becomes a route.
- Separation of concerns:
- `/src/layouts` define wrappers for page content
- `/src/assets` & `/public` for static media
- Static Site Generation (SSG) for performance and security

##### Key Technologies & Frameworks
- Astro (core SSG framework)
- Node.js & npm scripts (`package.json`, `package-lock.json`)
- Netlify for CI/CD and global distribution
- TypeScript support (`tsconfig.json`)
- Optional tooling: VSCode for local dev (`.vscode/`)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer Workstation"
        CLI["Astro CLI"]:::compute
        GW[".gitignore"]:::storage
        VS[".vscode/"]:::storage
        RM["README.md"]:::storage
        AC["astro.config.mjs"]:::compute
        PJSON["package.json"]:::compute
        PLOCK["package-lock.json"]:::storage
        TSC["tsconfig.json"]:::compute
        SP["src/pages/"]:::storage
        SL["src/layouts/Layout.astro"]:::storage
        SA["src/assets/"]:::storage
        PUB["public/"]:::storage
        IMG["public/img/"]:::storage
        Git["Git Repository"]:::compute
    end

    subgraph "CI/CD (Netlify)"
        NL["Netlify CI"]:::compute
        NB["Astro Build Engine"]:::compute
        NT["netlify.toml"]:::compute
        DIST["dist/"]:::storage
    end

    CDN["CDN / Edge Network"]:::network
    Browser["End User Browser"]:::external
    BrowserLocal["Browser (localhost)"]:::external

    CLI --> SP
    CLI --> SL
    CLI --> SA
    CLI --> PUB

    GW --> Git
    VS --> Git
    RM --> Git
    AC --> Git
    PJSON --> Git
    PLOCK --> Git
    TSC --> Git
    SP --> Git
    SL --> Git
    SA --> Git
    PUB --> Git
    IMG --> Git

    Git -->|"push code"| NL
    NL --> NB
    NL -.->|"uses netlify.toml"| NT
    NB -->|"builds static site"| DIST
    DIST -->|"deploy"| CDN
    CDN -->|"serves assets"| Browser

    CLI -.->|"npm run dev"| BrowserLocal

    click GW "https://github.com/ga-el/cbtis224/blob/main/.gitignore"
    click VS "https://github.com/ga-el/cbtis224/tree/main/.vscode/"
    click RM "https://github.com/ga-el/cbtis224/blob/main/README.md"
    click AC "https://github.com/ga-el/cbtis224/blob/main/astro.config.mjs"
    click PJSON "https://github.com/ga-el/cbtis224/blob/main/package.json"
    click PLOCK "https://github.com/ga-el/cbtis224/blob/main/package-lock.json"
    click TSC "https://github.com/ga-el/cbtis224/blob/main/tsconfig.json"
    click SP "https://github.com/ga-el/cbtis224/tree/main/src/pages/"
    click SL "https://github.com/ga-el/cbtis224/blob/main/src/layouts/Layout.astro"
    click SA "https://github.com/ga-el/cbtis224/tree/main/src/assets/"
    click PUB "https://github.com/ga-el/cbtis224/tree/main/public/"
    click IMG "https://github.com/ga-el/cbtis224/tree/main/public/img/"
    click NT "https://github.com/ga-el/cbtis224/blob/main/netlify.toml"

    classDef compute fill:#a0c4ff,stroke:#000;
    classDef storage fill:#caffbf,stroke:#000;
    classDef network fill:#fdffb6,stroke:#000;
    classDef external fill:#ffd6a5,stroke:#000;
```
