# shrivastav-gaurav/generative-ai-for-beginners architecture

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

- Interactive diagram: https://gitdiagram.com/shrivastav-gaurav/generative-ai-for-beginners
- Repository: https://github.com/shrivastav-gaurav/generative-ai-for-beginners

## Overview

##### Project type and purpose
- This is a static‐site educational repository (“Generative AI for Beginners”) delivering 21 lessons, each with written content (Markdown), images, Python notebooks, and TypeScript code samples.
- It supports multi-language translations via GitHub Actions, and is served as a Docsify‐powered site (docs/index.html → GitHub Pages).

##### File structure
- Top‐level:
- config & environment: `.devcontainer/`, `.env.copy`, `requirements.txt`, `package.json`
- CI/CD: `.github/workflows/`
- Content: `00-course-setup/` through `21-meta/` (per‐lesson directories), each containing `README.md`, code examples (.ipynb, .py, .js, TypeScript projects) and `images/`.
- Translations: `translations/<lang>/…` mirroring the lesson tree.
- Static-site output config: `docs/`, `index.html`, `docsifytopdf.js`.
- Patterns:
- Markdown + code samples organized per lesson.
- Language directories replicating the same structure.
- CI workflows automate translation, markdown validation, stale-issue cleanup, and site deployment.

##### README insights
- Tech stack:
- Docsify (JS) – static documentation generator.
- Python / Jupyter for hands-on notebooks.
- TypeScript/Node.js for sample apps.
- GitHub Actions for CI/CD and translation automation.
- Deployment target: GitHub Pages via `docs/`.

a. Main components:
1. Developer Workstation (VSCode + DevContainer)
2. GitHub Repository (“Generative-AI-For-Beginners”)
3. GitHub Actions Workflows
4. Translation Service (automated via GH Action + Translations subfolders)
5. Static Site Generator (Docsify)
6. Hosting (GitHub Pages)
7. Learners’ Browser / Local Preview Server

b. Relationships & data flows:
1. Developer pushes commits → GitHub Repository.
2. Push triggers GitHub Actions:
- Markdown & code validation
- Translation sync (update `translations/…`)
- Site build (Docsify tooling)
- Deploy `docs/` output to GitHub Pages
3. Learner opens site at `<username>.github.io/Generative-AI-For-Beginners` OR runs local `docsify` preview server.
4. Learner clones repo → runs DevContainer → opens notebooks / TypeScript apps.

c. Architectural patterns & principles:
- GitOps style: content changes → automated CI → site deployment
- Single repo, multi-language via directory templating
- Separation of concerns: Lessons (content) vs. code samples vs. CI configs vs. translations vs. hosting artifacts

d. Key technologies:
- Docsify (JS)
- GitHub Actions (YAML workflows)
- Python / Jupyter Notebooks
- Node.js / TypeScript
- DevContainer / VSCode Remote
- GitHub Pages

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Users
    Developer["Developer Workstation"]:::user
    Learner["Learner Browser / Local Preview"]:::user

    %% Core Components
    GitHubRepo["GitHub Repository"]:::repo
    GitHubActions["GitHub Actions Workflows"]:::ci
    TranslationService["Translation Folders"]:::storage
    DocsifyBuild["Docsify Static Site Generator"]:::service
    GitHubPages["GitHub Pages Hosting"]:::service

    %% Flow
    Developer -->|"push commits"| GitHubRepo
    GitHubRepo -->|"trigger workflows"| GitHubActions
    GitHubActions -->|"update translations"| TranslationService
    GitHubActions -->|"build site"| DocsifyBuild
    DocsifyBuild -->|"deploy docs/ "| GitHubPages
    GitHubPages -->|"serve site"| Learner
    Learner -->|"run local preview"| DocsifyBuild
    Learner -->|"clone repository"| GitHubRepo

    %% Click Events
    click Developer "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/tree/main/.devcontainer/"
    click GitHubRepo "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/blob/main/."
    click GitHubActions "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/blob/main/.github/workflows/validate-markdown.yml"
    click TranslationService "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/tree/main/translations/"
    click DocsifyBuild "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/tree/main/docs/"
    click GitHubPages "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/tree/main/docs/"
    click Learner "https://github.com/shrivastav-gaurav/generative-ai-for-beginners/blob/main/docs/_sidebar.md"

    %% Styles
    classDef user fill:#f0f,stroke:#333,stroke-width:1px
    classDef repo fill:#ff9,stroke:#333,stroke-width:1px
    classDef ci fill:#9ff,stroke:#333,stroke-width:1px
    classDef service fill:#9f9,stroke:#333,stroke-width:1px
    classDef storage fill:#99f,stroke:#333,stroke-width:1px
```
