# yashbhangale/os-portfolio architecture

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

## Overview

##### Project type and purpose
- This is a JAMstack‐style personal portfolio website built with Gatsby (a React-based static site generator).
- Purpose: transform Markdown pages and React components into a static HTML/CSS/JS bundle, optionally served via Docker or deployed to a static‐hosting CDN.

##### File structure
- Top level
- dockerfile / dockerfileback / docker-compose.yml – Docker setups for local development or containerized static‐server
- gatsby-config.js, gatsby-node.js, gatsby-ssr.js, gatsby-browser.js – Gatsby lifecycle hooks and configuration
- src/ – source React components, pages, templates, styles, images, and Markdown content
- public/ – generated static site output (HTML, JS bundles, CSS, service worker assets, Workbox libraries, page-data JSON)
- .github/workflows/*.yml – GitHub Actions CI for building and deploying

- “src/markdown-pages/” – directory of Markdown files for “About,” “Projects,” resume, certifications
- “src/components/” – React building blocks (header, footer, taskbar, popup terminal, etc.)
- “src/templates/pageTemplate.js” – Gatsby template used to programmatically create pages from Markdown
- “public/_functions.json” & “public/_headers.json” – Netlify‐style routing and functions manifest

##### README for additional insights
- Basic npm / Gatsby commands (`npm install`, `npm run start`)
- Docker build & run instructions for containerizing the site
- No backend API—purely static

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer & Source Control
    subgraph "Developer & Source Control" 
        direction TB
        EditorGit["Code Editor / Git"]:::blue
        NodeNpm["Node.js + npm"]:::blue
        GitHubRepo["GitHub Repository"]:::blue
    end

    EditorGit -->|"writes code / commits"| GitHubRepo
    NodeNpm -->|"runs commands"| GitHubRepo

    %% Continuous Integration
    subgraph "Continuous Integration (GitHub Actions)" 
        direction TB
        CI_Gatsby["Gatsby CI Workflow"]:::green
        CI_Main["Main Portfolio CI Workflow"]:::green
    end

    GitHubRepo -->|"push to main triggers"| CI_Gatsby
    GitHubRepo -->|"push triggers"| CI_Main

    click CI_Gatsby "https://github.com/yashbhangale/os-portfolio/blob/main/.github/workflows/gatsby.yml"
    click CI_Main "https://github.com/yashbhangale/os-portfolio/blob/main/.github/workflows/main_portfolio.yml"

    %% Build Pipeline
    subgraph "Build Pipeline" 
        direction TB
        subgraph "Source Code"
            direction TB
            GatsbyConfig["gatsby-config.js"]:::green
            GatsbyNode["gatsby-node.js"]:::green
            GatsbySSR["gatsby-ssr.js"]:::green
            GatsbyBrowser["gatsby-browser.js"]:::green
            MarkdownInfo["Markdown Info Pages"]:::green
            MarkdownProjects["Markdown Project Pages"]:::green
            Components["React Components"]:::green
            Templates["Page Template"]:::green
            Pages["Custom React Pages"]:::green
            Styles["SCSS/CSS Styles"]:::green
            Images["Image Assets"]:::green
            StaticAssets["Static Assets"]:::green
        end
        subgraph "Gatsby Build"
            direction TB
            GatsbyBuild["Gatsby Build (GraphQL → React → Static)"]:::green
        end
        OutputPublic["public/ (Generated Static Site)"]:::green
    end

    CI_Gatsby -->|triggers build| GatsbyBuild
    CI_Main -->|triggers build| GatsbyBuild

    GatsbyConfig --> GatsbyBuild
    GatsbyNode --> GatsbyBuild
    GatsbySSR --> GatsbyBuild
    GatsbyBrowser --> GatsbyBuild
    MarkdownInfo --> GatsbyBuild
    MarkdownProjects --> GatsbyBuild
    Components --> GatsbyBuild
    Templates --> GatsbyBuild
    Pages --> GatsbyBuild
    Styles --> GatsbyBuild
    Images --> GatsbyBuild
    StaticAssets --> GatsbyBuild

    GatsbyBuild -->|outputs| OutputPublic

    click GatsbyConfig "https://github.com/yashbhangale/os-portfolio/blob/main/gatsby-config.js"
    click GatsbyNode "https://github.com/yashbhangale/os-portfolio/blob/main/gatsby-node.js"
    click GatsbySSR "https://github.com/yashbhangale/os-portfolio/blob/main/gatsby-ssr.js"
    click GatsbyBrowser "https://github.com/yashbhangale/os-portfolio/blob/main/gatsby-browser.js"
    click MarkdownInfo "https://github.com/yashbhangale/os-portfolio/tree/main/src/markdown-pages/info/"
    click MarkdownProjects "https://github.com/yashbhangale/os-portfolio/tree/main/src/markdown-pages/projects/"
    click Components "https://github.com/yashbhangale/os-portfolio/tree/main/src/components/"
    click Templates "https://github.com/yashbhangale/os-portfolio/blob/main/src/templates/pageTemplate.js"
    click Pages "https://github.com/yashbhangale/os-portfolio/tree/main/src/pages/"
    click Styles "https://github.com/yashbhangale/os-portfolio/tree/main/src/styles/"
    click Images "https://github.com/yashbhangale/os-portfolio/tree/main/src/images/"
    click StaticAssets "https://github.com/yashbhangale/os-portfolio/blob/main/static/myresume.pdf"
    click OutputPublic "https://github.com/yashbhangale/os-portfolio/tree/main/public/"
    click OutputPublic "https://github.com/yashbhangale/os-portfolio/blob/main/public/_functions.json"
    click OutputPublic "https://github.com/yashbhangale/os-portfolio/blob/main/public/_headers.json"

    %% Serve Phase
    subgraph "Serve Phase" 
        direction TB
        DockerBuild["Docker Build"]:::orange
        ContainerImage["Container Image"]:::orange
        ContainerRegistry["Container Registry"]:::orange
        CDN["CDN / Static Host"]:::orange
    end

    OutputPublic -->|uses dockerfile| DockerBuild
    DockerBuild -->|produces| ContainerImage
    ContainerImage -->|push to| ContainerRegistry
    ContainerRegistry -->|serves| CDN
    OutputPublic -->|deploy to CDN / Netlify| CDN

    click DockerBuild "https://github.com/yashbhangale/os-portfolio/tree/main/dockerfile"
    click DockerBuild "https://github.com/yashbhangale/os-portfolio/tree/main/dockerfileback"
    click DockerBuild "https://github.com/yashbhangale/os-portfolio/blob/main/docker-compose.yml"

    %% Client
    subgraph "Client / Browser" 
        direction TB
        Browser["Browser / End User"]:::purple
        ServiceWorker["Service Worker (Workbox)"]:::purple
    end

    CDN -->|serves assets| Browser
    Browser -->|"caches via"| ServiceWorker
    Browser -->|"fetches APIs"| ServiceWorker

    classDef blue fill:#AED6F1,stroke:#2E86C1,color:#1B4F72
    classDef green fill:#ABEBC6,stroke:#28B463,color:#145A32
    classDef orange fill:#F5CBA7,stroke:#EB984E,color:#7E5109
    classDef purple fill:#D7BDE2,stroke:#BB8FCE,color:#6C3483
```
