# itgpg/it architecture

> Architecture diagram of the GitHub repository itgpg/it, 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/itgpg/it
- Repository: https://github.com/itgpg/it

## Overview

##### Project type and purpose
- This is a **static website** for the IT Department of Government Polytechnic Gandhinagar, built with **Jekyll** (Ruby‐based static site generator), deployed on **GitHub Pages**, and featuring modular JavaScript for dynamic data loading from Google Drive.

##### File structure
- Top‐level Jekyll directories:
- `_config.yml` – global config
- `_includes/` – reusable HTML snippets (navbar, footer)
- `_layouts/` – page templates (default, event)
- `_events/` – event pages in Markdown
- `.frontmatter/database/` – JSON “mediaDb” and “taxonomyDb” for dynamic data
- `_data/` – JSON data (e.g., toppers_list.json)
- Static pages and content folders:
- `co-curricular/`, `student-corner/`, `faculty/`, `contributors/`, `newsletter/` – each with their own `index.html`
- Root HTML pages: `index.html`, `events.html`, `robots.txt`, `sitemap.xml`
- Asset pipeline:
- `assets/css/` – component CSS + page‐specific CSS
- `assets/js/` – modular JS (components, page controllers, utils, config)
- `assets/images/`
- Build/deployment:
- `Gemfile` & `.bundle/` – Ruby gems (Jekyll, plugins)
- Deployment: GitHub Actions or direct Git push → GitHub Pages

##### README for additional insights
- Modular, scalable static site with Jekyll templating
- Dynamic “YouTube‐style” study materials via Google Drive API
- Future‐proof event system (Markdown or Google Sheet)
- SEO optimized (sitemap.xml, robots.txt)
- Fully responsive design, mobile first

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Environment
    subgraph "Developer Environment"
        direction TB
        IDE["IDE (.vscode/)"]:::buildtime
        click IDE "https://github.com/itgpg/it/tree/main/.vscode/"
        Docs["Documentation (docs/)"]:::buildtime
        click Docs "https://github.com/itgpg/it/blob/main/docs/DOCS.md"
        click Docs "https://github.com/itgpg/it/blob/main/docs/README.md"
        ConfigFile["_config.yml"]:::buildtime
        click ConfigFile "https://github.com/itgpg/it/blob/main/_config.yml"
    end

    %% Build System
    subgraph "Build System (Build-Time)" 
        direction TB
        Gems["Ruby Gems & Bundler"]:::buildtime
        click Gems "https://github.com/itgpg/it/tree/main/Gemfile"
        click Gems "https://github.com/itgpg/it/blob/main/Gemfile.lock"
        click Gems "https://github.com/itgpg/it/tree/main/.bundle/"
        Jekyll["Jekyll Build Engine"]:::buildtime
        subgraph "Source Content"
            direction TB
            Includes["_includes/"]:::buildtime
            click Includes "https://github.com/itgpg/it/blob/main/_includes/components/navbar.html"
            click Includes "https://github.com/itgpg/it/blob/main/_includes/components/footer.html"
            Layouts["_layouts/"]:::buildtime
            click Layouts "https://github.com/itgpg/it/blob/main/_layouts/default.html"
            click Layouts "https://github.com/itgpg/it/blob/main/_layouts/event.html"
            Events["_events/"]:::buildtime
            click Events "https://github.com/itgpg/it/blob/main/_events/2023-fullstack.md"
            click Events "https://github.com/itgpg/it/blob/main/_events/2023-ml-python.md"
            FrontDB[".frontmatter/database/"]:::buildtime
            click FrontDB "https://github.com/itgpg/it/blob/main/.frontmatter/database/mediaDb.json"
            click FrontDB "https://github.com/itgpg/it/blob/main/.frontmatter/database/taxonomyDb.json"
            SiteData["_data/"]:::buildtime
            click SiteData "https://github.com/itgpg/it/blob/main/_data/toppers_list.json"
            AssetsSrc["assets/ (source)"]:::buildtime
        end
        BuildOutput["Static Site Output"]:::buildtime
    end

    %% CI/CD & Hosting
    CI["CI/CD Pipeline"]:::cicd
    GHPages["GitHub Pages CDN"]:::cicd

    %% Client Runtime
    subgraph "Client Browser (Runtime)"
        direction TB
        HTML["Static HTML/CSS/JS"]:::runtime
        CSS["CSS Assets"]:::runtime
        JS["JS Modules"]:::runtime
        click JS "https://github.com/itgpg/it/blob/main/assets/js/config.js"
        click JS "https://github.com/itgpg/it/blob/main/assets/js/utils.js"
        click JS "https://github.com/itgpg/it/blob/main/assets/js/main.js"
        API["Google Drive API"]:::external
    end

    %% Data Flow
    IDE -->|edits| Jekyll
    ConfigFile -->|configures| Jekyll
    Gems -->|provides| Jekyll
    Includes --> Jekyll
    Layouts --> Jekyll
    Events --> Jekyll
    FrontDB --> Jekyll
    SiteData --> Jekyll
    AssetsSrc --> Jekyll
    Jekyll -->|builds| BuildOutput
    BuildOutput -->|deploys| CI
    CI -->|pushes| GHPages
    GHPages -->|serves| HTML
    HTML --> CSS
    HTML --> JS
    JS -->|fetches data| FrontDB
    JS -->|fetches data| SiteData
    JS -->|calls| API

    %% Styles
    classDef buildtime fill:#D0E6FF,stroke:#0366d6;
    classDef runtime fill:#E6F9D5,stroke:#228B22;
    classDef external fill:#FFE6D5,stroke:#FF8C00,stroke-dasharray: 5 5;
    classDef cicd fill:#F3E5FF,stroke:#800080;
```
