# hrushi2711/portfolio architecture

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

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

## Overview

1. **Project type and runtime boundary**  
   This is a **static, browser-only portfolio site**. There is no backend, build step, or framework runtime in the repo. The app runs entirely in the browser using **HTML, CSS, and vanilla JavaScript**.

2. **Primary content source: `data.json`**  
   `data.json` is the **single source of truth** for most portfolio content: personal bio, experience, education, skills, project details, links, and likely resume metadata. The README makes clear the UI is meant to be driven from this file rather than hard-coded in HTML.

3. **Rendering engine: `app.js`**  
   `app.js` is the central orchestration layer. It likely:
   - fetches `data.json`
   - transforms JSON into DOM sections
   - injects timelines, skill bars, and profile/contact blocks
   - wires up UI interactions such as theme switching and collapsible sections

4. **Presentation shell: `index.html`**  
   `index.html` is the static entry point and probably contains the root containers that `app.js` populates. It also anchors the CSS and JS assets, making it the minimal structural shell for the dynamically rendered portfolio.

5. **Visual system: `style.css`**  
   `style.css` defines the entire look-and-feel: **glassmorphism panels, dark/light theme styling, grid-based layout, responsive breakpoints, transitions, and micro-animations**. The README emphasizes CSS Grid alignment and theme-driven styling as key architectural features.

6. **Theme and persistence boundary**  
   The site includes a **dark/light mode engine** that persists user preference via **`localStorage`**. This is an important client-side state boundary: the visual theme is stored in the browser, not in the JSON data or HTML.

7. **Interactive content components**  
   The UI appears to include a few dynamic components beyond simple text rendering:
   - progress bars for skill levels
   - expandable/collapsible timeline or education items
   - animated emphasis nodes and other micro-interactions  
   These are all likely driven from the JSON content and DOM manipulation in `app.js`.

8. **Asset handling**  
   The repository includes a PDF resume file, `Hrushikesh_Tiwari_Resume_03_2026_SD.pdf`, which is likely linked from the page for direct download. This makes the resume part of the static asset layer rather than an external service dependency.

9. **Hosting and deployment signal**  
   The presence of `CNAME` indicates the site is intended for **custom-domain static hosting**, most likely on a platform like GitHub Pages. That means deployment is primarily an asset upload / static publish flow.

10. **Data flow summary**  
   The architecture is straightforward: **browser loads `index.html` → `app.js` fetches `data.json` → JavaScript renders content into the DOM → `style.css` applies the full visual system → `localStorage` preserves theme choice**. The PDF resume and any social links act as outbound static assets/external endpoints.

11. **Important diagram boundaries**  
   For an architecture diagram, the main boundaries are:
   - **Static file layer**: HTML/CSS/JS/JSON/PDF/CNAME
   - **Client runtime**: browser DOM, fetch, localStorage
   - **External links**: resume download and social profiles
   - **No server-side API boundary**: everything is resolved client-side from local files and hosted static assets

Main entry points: [`app.js`](https://github.com/hrushi2711/portfolio/blob/main/app.js) (app.js), [`data.json`](https://github.com/hrushi2711/portfolio/blob/main/data.json) (data.json), [`index.html`](https://github.com/hrushi2711/portfolio/blob/main/index.html) (index.html), [`style.css`](https://github.com/hrushi2711/portfolio/blob/main/style.css) (style.css)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_static["Static files"]
  node_index["index.html<br/>entrypoint<br/>[index.html]"]
  node_styles["style.css<br/>presentation<br/>[style.css]"]
  node_app["app.js<br/>client app<br/>[app.js]"]
  node_data["data.json<br/>content source<br/>[data.json]"]
  node_resume["Resume PDF<br/>asset"]
  node_cname["CNAME<br/>hosting config"]
end

subgraph group_runtime["Browser runtime"]
  node_browser(("Browser<br/>runtime"))
  node_dom["DOM<br/>render tree"]
  node_fetch["Fetch<br/>network API"]
  node_storage[("localStorage<br/>state store")]
  node_renderer["Renderer<br/>ui orchestrator"]
  node_theme(("Theme mode<br/>ui state"))
  node_content["Content blocks<br/>ui sections"]
  node_widgets["Interactive widgets<br/>ui controls"]
end

subgraph group_external["External targets"]
  node_links["Outbound links<br/>external refs"]
  node_host["Static host<br/>hosting"]
end

node_browser -->|"loads"| node_index
node_index -->|"includes"| node_styles
node_index -->|"includes"| node_app
node_app -->|"uses"| node_fetch
node_fetch -->|"reads"| node_data
node_app -->|"drives"| node_renderer
node_renderer -->|"updates"| node_dom
node_styles -->|"styles"| node_dom
node_app -->|"persists"| node_storage
node_storage -->|"restores"| node_theme
node_app -->|"toggles"| node_theme
node_renderer -->|"builds"| node_content
node_renderer -->|"builds"| node_widgets
node_data -->|"defines"| node_content
node_data -->|"feeds"| node_widgets
node_data -->|"references"| node_links
node_links -->|"downloads"| node_resume
node_cname -->|"targets"| node_host

click node_index "https://github.com/hrushi2711/portfolio/blob/main/index.html"
click node_styles "https://github.com/hrushi2711/portfolio/blob/main/style.css"
click node_app "https://github.com/hrushi2711/portfolio/blob/main/app.js"
click node_data "https://github.com/hrushi2711/portfolio/blob/main/data.json"
click node_resume "https://github.com/hrushi2711/portfolio/blob/main/Hrushikesh_Tiwari_Resume_03_2026_SD.pdf"
click node_cname "https://github.com/hrushi2711/portfolio/tree/main/CNAME"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_index,node_styles,node_app,node_data,node_resume,node_cname toneBlue
class node_browser,node_dom,node_fetch,node_storage,node_renderer,node_theme,node_content,node_widgets toneAmber
class node_links,node_host toneMint
```

## Components

### Static files

Browser-delivered source and assets that make up the portfolio site.

- [index.html](https://github.com/hrushi2711/portfolio/blob/main/index.html): entrypoint · Static page shell that loads the app and anchors the layout. · `index.html`
- [style.css](https://github.com/hrushi2711/portfolio/blob/main/style.css): presentation · Global visual system for layout, themes, and responsive styling. · `style.css`
- [app.js](https://github.com/hrushi2711/portfolio/blob/main/app.js): client app · Main orchestration layer that fetches data and renders the portfolio UI. · `app.js`
- [data.json](https://github.com/hrushi2711/portfolio/blob/main/data.json): content source · Single source of truth for portfolio content and metadata. · `data.json`
- [Resume PDF](https://github.com/hrushi2711/portfolio/blob/main/Hrushikesh_Tiwari_Resume_03_2026_SD.pdf): asset · Downloadable résumé document served as a static file. · `Hrushikesh_Tiwari_Resume_03_2026_SD.pdf`
- [CNAME](https://github.com/hrushi2711/portfolio/tree/main/CNAME): hosting config · Custom-domain configuration for static hosting. · `CNAME`

### Browser runtime

Client-side DOM, fetch, and persistence behavior executed in the browser.

- **Browser**: runtime · Client environment that loads the page, executes JavaScript, and renders the UI.
- **DOM**: render tree · Document structure populated by the portfolio renderer.
- **Fetch**: network API · Browser API used to load JSON content from the static site.
- **localStorage**: state store · Browser persistence for the selected visual theme.
- **Renderer**: ui orchestrator · Transforms portfolio data into sections, cards, and interactive widgets.
- **Theme mode**: ui state · Dark/light appearance state maintained in the client.
- **Content blocks**: ui sections · Rendered bio, experience, education, skills, and project sections.
- **Interactive widgets**: ui controls · Skill bars, collapsible items, and other micro-interactions.

### External targets

Outbound destinations and hosting boundaries referenced by the site.

- **Outbound links**: external refs · External profile links and download targets surfaced by the portfolio.
- **Static host**: hosting · Custom-domain static hosting target for the published site.

## Connections

- Browser → index.html: loads · The browser opens the static entry page.
- index.html → style.css: includes · The HTML shell links the global stylesheet.
- index.html → app.js: includes · The HTML shell loads the client-side script.
- app.js → Fetch: uses · The app requests structured content from the JSON file.
- Fetch → data.json: reads · Portfolio content is loaded from the static data source.
- app.js → Renderer: drives · The orchestration layer turns data into visible sections.
- Renderer → DOM: updates · Rendered portfolio markup is injected into the document.
- style.css → DOM: styles · CSS controls layout, theme styling, and responsive presentation.
- app.js → localStorage: persists · Theme choice is saved in browser storage.
- localStorage → Theme mode: restores · Saved preference initializes the active theme.
- app.js → Theme mode: toggles · User interaction switches the visual mode.
- Renderer → Content blocks: builds · The renderer creates the main portfolio sections.
- Renderer → Interactive widgets: builds · The renderer also creates interactive skill and timeline UI.
- data.json → Content blocks: defines · Portfolio content is driven by the JSON model.
- data.json → Interactive widgets: feeds · Skill levels and item states populate interactive widgets.
- data.json → Outbound links: references · Profile links and download targets are included in the data model.
- Outbound links → Resume PDF: downloads · The résumé PDF is exposed as a static downloadable asset.
- CNAME → Static host: targets · Custom-domain configuration points the site at static hosting.
