# gabyman31/ai4devs-intro-ro-1 architecture

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

- Interactive diagram: https://gitdiagram.com/gabyman31/ai4devs-intro-ro-1
- Repository: https://github.com/gabyman31/ai4devs-intro-ro-1

## Overview

##### Project type and purpose
- This is a static-content, educational web project containing “Introduction to AI in Software Development” exercises for the AI4Devs program.
- It’s not a full-stack app, but a collection of HTML/JS exercises (reverse-string templates and model-generated variants) plus Markdown prompts.

##### File structure
- Top‐level files:
- README.md – high-level description
- .gitignore
- res/ – shared resources (e.g., images, assets)
- reverse-string/ – the “reverse string” exercise
- Under reverse-string/:
- template/ – starter HTML/JS + prompts.md
- reversestring-MT/ – model-taught variant HTML/JS + prompts.md
- No backend code, no server code—pure static.

##### README for additional insights
- Confirms it’s part of an AI education program.
- No mention of dynamic services or external APIs beyond linking to the LIDR.co site.

##### Main components
a. Web Browser (Client)
b. Static Site Host (e.g., GitHub Pages, Netlify, Vercel)
c. CDN Layer (optional caching edge network)
d. Source Repository (GitHub)
e. CI/CD Pipeline (build & deploy)
f. External Documentation Link (LIDR.co AI4Devs site)

##### Relationships and interactions
- Developer → (push code) → GitHub repo
- GitHub repo → (trigger) → CI/CD pipeline
- CI/CD pipeline → (build & deploy) → Static Site Host
- Static Site Host ↔ (serve assets via) → CDN
- Client (browser) → (HTTP GET) → CDN/Host → (HTML, JS, prompts.md)
- Browser renders index.html → loads script.js → displays interactive exercise
- Optionally: Browser → (link) → external AI4Devs site

##### Architectural patterns & design principles
- JAMstack (JavaScript, APIs if any, Markup)
- Separation of concerns: content (Markdown), presentation (HTML/CSS), logic (JavaScript)
- Git-based CI/CD for “push to deploy” simplicity
- CDN caching for low-latency global access

##### Technologies/frameworks/libraries
- Core: vanilla HTML + JavaScript
- Hosting: GitHub Pages or similar
- Version control: Git/GitHub
- CI/CD: GitHub Actions or equivalent
- CDN: Cloudflare CDN, Netlify CDN, etc.

##### Key details to capture
- That there is no dynamic backend or database
- Two parallel exercise modules under reverse-string (template vs. MT)
- The flow from source files (Markdown + JS) → host → client render
- The CI/CD trigger on Git pushes

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Workstation
    DevWork["Developer Workstation"]:::dev

    %% Version Control
    subgraph "Version Control"
        Repo["GitHub Repository"]:::dev
        README["README.md"]:::dev
        GitIgnore[".gitignore"]:::dev
        Res["res/"]:::dev

        subgraph "reverse-string/"
            RSRoot["reverse-string/"]:::dev
            TemplateDir["template/"]:::runtime
            TempIndex["index.html"]:::runtime
            TempScript["script.js"]:::runtime
            TempPrompts["prompts.md"]:::runtime
            MTDir["reversestring-MT/"]:::runtime
            MTIndex["index.html"]:::runtime
            MTScript["script.js"]:::runtime
            MTPrompts["prompts.md"]:::runtime
            TemplateDir --> TempIndex
            TemplateDir --> TempScript
            TemplateDir --> TempPrompts
            MTDir --> MTIndex
            MTDir --> MTScript
            MTDir --> MTPrompts
            RSRoot --> TemplateDir
            RSRoot --> MTDir
        end
    end

    %% CI/CD and Hosting
    CICD["CI/CD Pipeline"]:::dev
    StaticHost["Static Site Host"]:::runtime
    CDN["CDN Edge Network"]:::runtime

    %% Client and External
    Browser["Web Browser (Client)"]:::runtime
    External["AI4Devs Documentation (LIDR.co)"]:::ext

    %% Connections
    DevWork -->|push code| Repo
    Repo -->|trigger build| CICD
    CICD -->|build & deploy| StaticHost
    StaticHost -->|serve via| CDN
    Browser -->|HTTP GET| CDN
    CDN -->|deliver assets| Browser
    Browser -->|link to| External

    %% Click Events
    click Repo "https://github.com/gabyman31/ai4devs-intro-ro-1/tree/main//"
    click README "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//README.md"
    click GitIgnore "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//.gitignore"
    click Res "https://github.com/gabyman31/ai4devs-intro-ro-1/tree/main//res/"
    click RSRoot "https://github.com/gabyman31/ai4devs-intro-ro-1/tree/main//reverse-string/"
    click TemplateDir "https://github.com/gabyman31/ai4devs-intro-ro-1/tree/main//reverse-string/template/"
    click TempIndex "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/template/index.html"
    click TempScript "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/template/script.js"
    click TempPrompts "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/template/prompts.md"
    click MTDir "https://github.com/gabyman31/ai4devs-intro-ro-1/tree/main//reverse-string/reversestring-MT/"
    click MTIndex "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/reversestring-MT/index.html"
    click MTScript "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/reversestring-MT/script.js"
    click MTPrompts "https://github.com/gabyman31/ai4devs-intro-ro-1/blob/main//reverse-string/reversestring-MT/prompts.md"

    %% Styles
    classDef dev fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1
    classDef runtime fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20
    classDef ext fill:#E0E0E0,stroke:#424242,color:#424242
```
