# imashish-in/generative-ai-for-beginners architecture

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

- Interactive diagram: https://gitdiagram.com/imashish-in/generative-ai-for-beginners
- Repository: https://github.com/imashish-in/generative-ai-for-beginners

## Overview

##### Project type and purpose
- This is a **static course website** / learning content repository (“Generative AI for Beginners”) that hosts 18 lessons, code samples (Python, TypeScript, .NET), Jupyter notebooks, translations, and configuration for local development.
- It uses **GitHub** for version control, **GitHub Actions** for CI (linting markdown, issue templates, dependency locks), a **devcontainer** for local environment consistency, and **Docsify** + **GitHub Pages** for serving a static site.

##### File structure
- Top-level directories:
- `.devcontainer/`, `.vscode/`: local development setup (Docker, VSCode settings)
- `00-course-setup` through `18-fine-tuning`: 18 lesson folders, each containing a `README.md`, code samples, images, translation subfolders
- `docs/`: docsify site config (`_sidebar.md`, `_navbar.md`, `index.html`)
- `translations/`: root-level translation stub folders
- CI configs under `.github/workflows/`
- Static site shell under project root (`index.html`, `images/`, `package.json`, `docsifytopdf.js`)
- Configuration files: `.env.copy`, `package.json` (Docsify + hosting scripts), `requirements.txt` (Python support), GitHub Actions workflows.

##### README for insights
- Confirms it’s a self-contained course repository.
- Mentions Azure OpenAI / OpenAI API keys (via `.env`), Python and TypeScript code.
- Points to Course Setup lesson for environment prep.

##### Diagramming the architecture
- **Developer / Author** (local machine + VSCode + devcontainer)
- **GitHub Repo** (content: markdown, notebooks, code samples, docsify config)
- **GitHub Actions** pipelines
- Markdown validation & linting
- Dependency locking
- Issue / PR templates management
- **Docsify Build Engine** (node.js, `package.json`)
- **Static Site Hosting** (GitHub Pages)
- **Learner** (end-user in browser)
- **External Services** (Azure OpenAI / OpenAI API) for code sample execution

1. Developer edits content in VSCode (inside devcontainer) → pushes to GitHub Repo
2. GitHub Actions triggers on push → runs CI jobs (linting, tests, dependency locks)
4. GitHub Pages serves static HTML/CSS/JS → Learner’s browser
5. Learner’s code samples (if run locally or via live notebooks) may call OpenAI API (external service)

c. Architectural patterns / principles
- **GitOps**: content-driven pipeline, all changes via Git PRs
- **CI/CD**: automated validation → continuous deployment of static site
- **Dev Containers**: reproducible local dev environment
- **Modular content**: each lesson is a self-contained module with translations

d. Technologies / frameworks
- **GitHub** (Version Control, Actions, Pages)
- **Docker DevContainer** (VSCode Remote Containers)
- **Docsify** (static site generation on the client side)
- **Markdown**, **Jupyter Notebooks**
- **Python** (code samples, `requirements.txt`)
- **TypeScript** (code samples, `package.json`, `tsconfig.json`)
- **Azure OpenAI / OpenAI API** (external dependencies)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% People & Environments (Blue)
    subgraph "Developer Environment"
        direction TB
        DevContainer["DevContainer"]:::env
        VSCode["VSCode"]:::env
        Developer["Developer / Author"]:::env
        Developer --> DevContainer
        Developer --> VSCode
    end

    %% Repository & Content (Green)
    GitHubRepo["GitHub Repository"]:::repo
    subgraph "Content & Docs"
        direction TB
        RootDocs["README.md, CONTRIBUTING.md, LICENSE..."]:::repo
        Lessons["00-course-setup … 18-fine-tuning/"]:::repo
        Translations["translations/"]:::repo
        Images["images/"]:::repo
        Presentations["presentations/"]:::repo
    end
    GitHubRepo --> RootDocs
    GitHubRepo --> Lessons
    GitHubRepo --> Translations
    GitHubRepo --> Images
    GitHubRepo --> Presentations

    %% CI/CD (Orange)
    subgraph "CI/CD (GitHub Actions & Templates)"
        direction TB
        Workflows[".github/workflows/"]:::ci
        Templates[".github/ISSUE_TEMPLATE/"]:::ci
    end
    GitHubRepo --> Workflows
    GitHubRepo --> Templates

    %% Build Engine & Static Config (Purple)
    subgraph "Docsify Build & Site Config"
        direction TB
        PackageJSON["package.json"]:::build
        PackageLock["package-lock.json"]:::build
        PDFJS["docsifytopdf.js"]:::build
        DocsFolder["docs/"]:::build
        IndexHTML["index.html"]:::build
        NoJekyll[".nojekyll"]:::build
    end
    GitHubRepo --> PackageJSON
    GitHubRepo --> PackageLock
    GitHubRepo --> PDFJS
    GitHubRepo --> DocsFolder
    GitHubRepo --> IndexHTML
    GitHubRepo --> NoJekyll

    %% Local Environment Config (Orange)
    subgraph "Local Environment Config"
        direction TB
        EnvCopy[".env.copy"]:::ci
        Requirements["requirements.txt"]:::ci
    end
    GitHubRepo --> EnvCopy
    GitHubRepo --> Requirements

    %% Code Sample Runtimes
    subgraph "Code Sample Runtimes"
        direction TB
        PythonSamples["Python Samples"]:::repo
        TSamples["TypeScript Samples"]:::repo
        DotNetSamples[".NET Notebooks"]:::repo
    end
    Lessons --> PythonSamples
    Lessons --> TSamples
    Lessons --> DotNetSamples

    %% Static Site Hosting (Purple)
    GitHubPages["GitHub Pages"]:::build

    %% Learner & External (Blue & Gray)
    Learner["Learner (Browser)"]:::env
    OpenAI["OpenAI / Azure OpenAI API"]:::external

    %% Data Flow
    Developer -->|"push code"| GitHubRepo
    GitHubRepo -->|"triggers"| Workflows
    Workflows -->|"run lint/build"| PackageJSON
    PackageJSON -->|"build site"| DocsFolder
    DocsFolder -->|"deploy"| GitHubPages
    GitHubPages -->|"serve site"| Learner
    Learner -->|"calls API"| OpenAI

    %% Click Events
    click DevContainer "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/.devcontainer/"
    click VSCode "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/.vscode/"
    click RootDocs "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/README.md"
    click Lessons "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/00-course-setup/"
    click Translations "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/translations/"
    click Images "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/images/"
    click Presentations "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/presentations/"
    click Workflows "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/workflows/validate-markdown.yml"
    click Workflows "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/workflows/lock.yml"
    click Workflows "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/workflows/stale.yml"
    click Workflows "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/workflows/welcome-issue.yml"
    click Workflows "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/workflows/welcome-pr.yml"
    click Templates "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/ISSUE_TEMPLATE/bug_report.md"
    click Templates "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.github/ISSUE_TEMPLATE/feature_request.md"
    click PackageJSON "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/package.json"
    click PackageLock "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/package-lock.json"
    click PDFJS "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/docsifytopdf.js"
    click DocsFolder "https://github.com/imashish-in/generative-ai-for-beginners/tree/main/docs/"
    click IndexHTML "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/index.html"
    click NoJekyll "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.nojekyll"
    click EnvCopy "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/.env.copy"
    click Requirements "https://github.com/imashish-in/generative-ai-for-beginners/blob/main/requirements.txt"

    %% Styles
    classDef env fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef repo fill:#DFF5D1,stroke:#1F8A70,color:#1F8A70
    classDef ci fill:#FFEFD5,stroke:#D2691E,color:#D2691E
    classDef build fill:#F3E5FF,stroke:#7B1FA2,color:#7B1FA2
    classDef external fill:#F2F2F2,stroke:#808080,color:#808080
```
