# supratimghosh/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/supratimghosh/portfolio
- Repository: https://github.com/supratimghosh/portfolio

## Overview

##### Project type and purpose
- This is a single-page static portfolio website that showcases Supratim Ghosh’s background, skills, projects, and contact information.
- Built with plain HTML, CSS, and JavaScript, and deployed on Netlify, with one small serverless function for visitor logging.

##### File structure
- Top-level files:
- index.html → the entry point / single page
- styles.css, script.js → the CSS and JavaScript for interactivity and styling
- hero-bg.mp4, Supratim_Ghosh_resume.pdf → static media assets
- netlify.toml, netlify/functions/log-visitor.js → configuration and a serverless function
- No backend or database folders; purely static, except for the one Netlify Function.

##### README for additional insights
- Confirms it’s a static HTML/CSS/JS site.
- Tech stack: HTML5, CSS3 (Glassmorphism), vanilla JS, hosted via GitHub Pages / Netlify.
- No complex dependencies or server-side components beyond the log-visitor function.

a. Main components
- Client Browser (User Agent)
- Static Assets (HTML, CSS, JS, media files) served from Netlify CDN
- Netlify Platform (hosting + edge CDN)
- Netlify Serverless Function (log-visitor.js)
- External Services / Third-party (e.g., analytics, resume download link, social links)
b. Relationships & interactions
1. User’s browser requests index.html from Netlify CDN.
2. Browser fetches CSS, JS, video, PDF from the CDN.
3. On page load (or on specific events), script.js invokes the log-visitor serverless function endpoint.
4. Serverless function records a visit (e.g., writes to logs or an analytics endpoint).
5. User can click links (resume PDF, LinkedIn, GitHub) which navigate to external services.
c. Architectural patterns/design principles
- Static-First Architecture: all UI assets are prebuilt and cached at the edge.
- Serverless microservice: a tiny function for visitor logging.
- CDN distribution for high performance and reliability.
d. Key technologies/frameworks
- HTML5, CSS3 (Glassmorphism)
- Vanilla JavaScript
- Netlify Hosting & Edge CDN
- Netlify Functions (AWS Lambda under the hood)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["User Browser"]:::user
    Browser -->|"Request index.html"| CDN

    subgraph "Netlify Platform"
        CDN[(Netlify Edge CDN)]:::cdn
        subgraph "Static Assets"
            HTML["index.html"]:::static
            CSS["styles.css"]:::static
            JS["script.js"]:::static
            Video["hero-bg.mp4"]:::static
            PDF["Supratim_Ghosh_resume.pdf"]:::static
        end
        Config["netlify.toml"]:::static
        Function["netlify/functions/log-visitor.js"]:::function
    end

    CDN --> HTML
    CDN --> CSS
    CDN --> JS
    CDN --> Video
    CDN --> PDF

    Browser -->|"Invoke visitor log"| Function

    subgraph "External Services"
        LinkedIn["LinkedIn"]:::external
        GitHub["GitHub"]:::external
    end
    Browser -->|"Navigate to social links"| LinkedIn
    Browser -->|"Navigate to social links"| GitHub

    click HTML "https://github.com/supratimghosh/portfolio/blob/main/index.html"
    click CSS "https://github.com/supratimghosh/portfolio/blob/main/styles.css"
    click JS "https://github.com/supratimghosh/portfolio/blob/main/script.js"
    click Video "https://github.com/supratimghosh/portfolio/blob/main/hero-bg.mp4"
    click PDF "https://github.com/supratimghosh/portfolio/blob/main/Supratim_Ghosh_resume.pdf"
    click Config "https://github.com/supratimghosh/portfolio/blob/main/netlify.toml"
    click Function "https://github.com/supratimghosh/portfolio/blob/main/netlify/functions/log-visitor.js"

    classDef static fill:#ADD8E6,stroke:#000;
    classDef cdn fill:#D3D3D3,stroke:#000;
    classDef function fill:#90EE90,stroke:#000;
    classDef user fill:#FFFFFF,stroke:#000;
    classDef external fill:#FFA500,stroke:#000;
```
