# aviralacharya/portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a simple, static portfolio website. The README and file tree show a collection of static assets (HTML, CSS, JavaScript, plus configuration files).
- Purpose: serve a personal or professional portfolio, possibly as a Progressive Web App (site.webmanifest indicates PWA support).

##### File structure
- Top‑level files only—no subdirectories. That means everything is served from a flat structure.
- Key files:
- index.html – entry point for the browser.
- styles.css – global stylesheet.
- script.js – client‑side behavior or interactivity.
- robots.txt and sitemap.xml – SEO and crawler directives.
- CNAME – custom domain configuration (e.g., on GitHub Pages).
- No backend code, no build scripts, no server‑side logic.

##### README for additional insights
- README only says “portfolio,” so there are no extra instructions on build steps or runtime dependencies.
- We infer deployment targets (e.g., GitHub Pages or any static‑file hosting).

##### Elements
- From Browser → DNS lookup.
- From Browser → Hosting (HTTP requests).
- From Hosting → Browser (HTTP responses with static files).
- Blue for “Network” elements (DNS, Hosting).
- Green for “Client” elements (Browser, local cache).
- Yellow for “Static resources” (HTML, CSS, JS, manifest).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    subgraph "Client"
        Browser["Browser"]:::client
        SWCache["Service Worker Cache"]:::client
    end

    %% Network Layer
    subgraph "Network"
        DNS["DNS / Custom Domain"]:::network
        Hosting["Static‑file Hosting"]:::network
    end

    %% Asset Store
    subgraph "Static Assets" 
        HTML["index.html"]:::resource
        CSS["styles.css"]:::resource
        JS["script.js"]:::resource
        Manifest["site.webmanifest"]:::resource
        Sitemap["sitemap.xml"]:::resource
        Robots["robots.txt"]:::resource
        CNAMEfile["CNAME"]:::resource
        Readme["README.md"]:::resource
    end

    %% Data Flows
    Browser -->|"DNS query"| DNS
    DNS -->|"Resolves domain"| Hosting

    Browser -->|"GET index.html"| Hosting
    Hosting -->|"200 OK + HTML"| Browser

    Browser -->|"GET other assets"| Hosting
    Hosting -->|"200 OK + CSS, JS, Manifest, sitemap, robots, CNAME"| Browser

    Browser -->|"Registers PWA"| Manifest
    Browser -->|"Caches via SW"| SWCache

    %% Hosting internal asset mapping
    Hosting --> HTML
    Hosting --> CSS
    Hosting --> JS
    Hosting --> Manifest
    Hosting --> Sitemap
    Hosting --> Robots
    Hosting --> CNAMEfile
    Hosting --> Readme

    %% Click Events
    click HTML "https://github.com/aviralacharya/portfolio/blob/main/index.html"
    click CSS "https://github.com/aviralacharya/portfolio/blob/main/styles.css"
    click JS "https://github.com/aviralacharya/portfolio/blob/main/script.js"
    click Manifest "https://github.com/aviralacharya/portfolio/blob/main/site.webmanifest"
    click Sitemap "https://github.com/aviralacharya/portfolio/blob/main/sitemap.xml"
    click Robots "https://github.com/aviralacharya/portfolio/blob/main/robots.txt"
    click CNAMEfile "https://github.com/aviralacharya/portfolio/tree/main/CNAME"
    click Readme "https://github.com/aviralacharya/portfolio/blob/main/README.md"

    %% Styles
    classDef client fill:#98fb98,stroke:#333,stroke-width:1px
    classDef network fill:#add8e6,stroke:#333,stroke-width:1px
    classDef resource fill:#ffff99,stroke:#333,stroke-width:1px
```
