# sushantbabu97/30-days-of-javascript architecture

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

- Interactive diagram: https://gitdiagram.com/sushantbabu97/30-days-of-javascript
- Repository: https://github.com/sushantbabu97/30-days-of-javascript

## Overview

##### Project type and purpose
- This is a purely static, multi-page educational website (“30 Days Of JavaScript”) with no server-side application logic.
- Its purpose is to host daily JavaScript lessons (Markdown + example HTML/JS code), plus translated editions (Spanish, Russian).

##### File structure
- Top-level folders:
- 01_Day_… through 30_Day_…: each holds a `.md` lesson, a “_starter_” subfolder with `index.html` + `scripts` + `data` + any images.
- `index.html` and `readMe.md` at root: landing page & site overview.
- `data/`, `images/`: shared assets (country data JSON, media assets).
- `Spanish/`, `RU/`: translated versions, mirroring the same layout.
- `.gitignore` suggests Git‐based deployment.

##### README insights
- No mention of a server or database: all content is static.
- Navigation is through relative links from day to day.
- Embedded learning assets (code samples, videos) are served locally in `images/` or day folders.

a. Main components
- Developer workstation (editor, Git CLI, optional local live server).
- Version Control System (Git repository).
- CI/CD (optional build step if a static site generator is used, otherwise direct deploy).
- Static hosting service (e.g., GitHub Pages, Netlify, S3+CloudFront).
- CDN layer (caching HTML, JS, CSS, media).
- End users’ browsers.
- External services (PayPal donate button, Telegram link, social badges).

b. Relationships & interactions
1. Developer edits `.md` and `.html` / `.js` files → commits → pushes to Git remote.
2. (Optional) CI pipeline converts Markdown to HTML (if used), runs link checks.
3. Static host picks up the `main` branch, deploys files.
4. CDN caches and serves the static files.
5. Browser requests `index.html` or `XX_Day…/index.html` → CDN or origin returns HTML → browser pulls JS, CSS, data JSON, images.
6. Browser executes example code locally (no backend calls).

c. Architectural patterns & design principles
- Single‐page static hosting (multi‐page site structure).
- “Content as code”: lessons authored in Markdown and HTML, versioned in Git.
- Localization via parallel directory trees (Spanish/, RU/).

d. Key technologies
- Markdown for content (`.md` files).
- HTML, vanilla JavaScript (`.js` under each starter folder) for interactive code samples.
- Git for source control.
- Static hosting (GitHub Pages or equivalent).
- CDN (optional) to accelerate asset delivery.

- Clear labels: e.g., “Developer Workstation,” “Git Repo,” “CI/CD,” “Static Host,” “CDN,” “Browser.”
- Dev → Git push → CI → Deploy → Host → CDN → Browser request.
- Browser → Host for uncached assets.
- Green for hosting/CDN,
- Orange for runtime/browser,
- Grey for optional external services (PayPal, Telegram).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Authoring Components
    Dev["Developer Workstation"]:::authoring
    LocalServer["Local Live Server"]:::authoring
    Git["Git Repository"]:::authoring
    CI["CI/CD Pipeline"]:::authoring

    subgraph "Repository Content"
        direction TB
        Landing["index.html"]:::authoring
        Overview["readMe.md"]:::authoring
        LessonMD["Lesson Content (Markdown)"]:::authoring
        StarterCode["Starter Code (HTML/JS)"]:::authoring
        SharedData["Shared Data Assets"]:::authoring
        SharedMedia["Shared Media Assets"]:::authoring
        RU["Russian Edition"]:::authoring
        ES["Spanish Edition"]:::authoring
    end

    %% Hosting Components
    Host["Static Hosting Service"]:::hosting
    CDN["CDN"]:::hosting

    %% Runtime Components
    Browser["User Browser"]:::runtime
    External["External Services\n(PayPal, Telegram, Social)"]:::external

    %% Relationships
    Dev -->|edits files| Git
    Dev --> LocalServer
    LocalServer -->|serves content locally| Browser
    Git -->|push| CI
    CI -->|deploy| Host
    Host -->|cache & serve| CDN
    CDN -->|serves static files| Browser
    Browser -->|requests uncached assets| Host
    Browser -->|invokes| External

    %% Click Events
    click Landing "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/index.html"
    click Overview "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/readMe.md"
    click LessonMD "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/01_Day_Introduction/01_day_introduction.md"
    click LessonMD "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/02_Day_Data_types/02_day_data_types.md"
    click StarterCode "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/01_Day_Introduction/01_day_starter/index.html"
    click StarterCode "https://github.com/sushantbabu97/30-days-of-javascript/tree/master/01_Day_Introduction/01_day_starter"
    click SharedData "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/data/countries.js"
    click SharedMedia "https://github.com/sushantbabu97/30-days-of-javascript/tree/master/images/banners/"
    click RU "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/RU/index.html"
    click RU "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/RU/README.md"
    click ES "https://github.com/sushantbabu97/30-days-of-javascript/blob/master/Spanish/readme.md"

    %% Styles
    classDef authoring fill:#D0E6FF,stroke:#0366d6,color:#0366d6
    classDef hosting fill:#E6FFEA,stroke:#28A745,color:#28A745
    classDef runtime fill:#FFEFD5,stroke:#FF8C00,color:#FF8C00
    classDef external fill:#F0F0F0,stroke:#6a737d,color:#6a737d
```
