# devsahil2063/portfolio architecture

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

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

## Overview

1. **Repository shape**
   - This is primarily a **client-side portfolio site** built with **React 18 + TypeScript + Vite**.
   - The architecture is a **single-page, section-based UI** rather than a multi-page app or a backend-driven system.

2. **Runtime and bootstrap path**
   - The browser loads `index.html`, which bootstraps the React app through `src/main.tsx`.
   - `main.tsx` is the application entry point and likely mounts the top-level portfolio component, with global theme/styling applied at startup.
   - `App.portfolio.tsx` appears to be the top-level composition file for the site’s page layout.

3. **Primary UI composition**
   - The visible app is organized into major portfolio sections:
     - `Header.tsx`
     - `HeroSection.tsx`
     - `AboutSection.tsx`
     - `ExperienceSection.tsx`
     - `ProjectsSection.tsx`
     - `Footer.tsx`
   - These are arranged as a vertical scrolling landing page, with the header providing navigation and the sections forming the content flow.

4. **Design system and theming**
   - `src/theme.ts` contains the Material UI theme configuration.
   - Styling is driven by a mix of **MUI v6**, **Emotion CSS-in-JS**, and global CSS in `index.css`.
   - The README indicates a **dark theme**, custom typography, geometric visual treatment, and responsive layout behavior.

5. **Reusable styled building blocks**
   - `src/components/styled/` contains shared UI primitives used across sections:
     - `GradientText.tsx`
     - `NavButton.tsx`
     - `ProjectCard.tsx`
     - `TechTag.tsx`
   - These are the reusable presentation units that keep the section components consistent and reduce duplication.

6. **Icon subsystem**
   - `src/components/icons/` holds isolated SVG icon components for brand and social links:
     - GitHub, LinkedIn, Instagram, X, Figma, and a logo icon
   - This is a separate presentation boundary for vector assets, likely used in the header/footer and project/social links.

7. **Content and data flow**
   - The site appears to be **mostly static content**: portfolio copy, project entries, experience items, and social links are likely embedded directly in components or simple local constants.
   - There is no visible data-fetching layer, API client, state management library, or persistence subsystem in the tree.

8. **Asset handling**
   - Static assets live under `public/assets/`.
   - These are served directly by Vite and are probably used for background imagery, project thumbnails, or decorative elements.

9. **Layout and interaction boundaries**
   - Interaction is primarily user-driven navigation within the page: scrolling, clicking nav buttons, and external social/profile links.
   - The architecture boundary is the browser itself; there is no obvious server-rendering, auth, or database layer in the repository structure.

10. **Tooling and build pipeline**
   - `vite.config.ts` defines the frontend build/dev pipeline.
   - `eslint.config.js`, `tsconfig.json`, and `tsconfig.node.json` support code quality and TypeScript compilation.
   - `package.json`/`package-lock.json` indicate a standard Node-based frontend toolchain.

11. **Styling stack implications**
   - Because both `index.css` and MUI/Emotion are present, global styles likely handle base resets/backgrounds while component-level styling handles the section cards, buttons, and theme-specific variants.
   - This split is important for an architecture diagram: global document styling plus component-scoped styling layered on top.

12. **Notable repository anomaly**
   - `app.py` exists at the root, but nothing else in the tree suggests a Python backend is part of the main system.
   - For architecture purposes, the dominant system is still the frontend portfolio app; `app.py` should be treated as auxiliary unless confirmed otherwise.

13. **What to draw in a diagram**
   - A good diagram would show:
     - Browser loading static Vite output
     - `index.html` → `src/main.tsx` → top-level app composition
     - Top-level app → section components
     - Section components → shared styled components / icons
     - Theme and global CSS applied cross-cutting
     - Static assets served from `public/assets`

Main entry points: [`App.portfolio.tsx`](https://github.com/devsahil2063/portfolio/blob/main/App.portfolio.tsx) (Portfolio App), [`src/main.tsx`](https://github.com/devsahil2063/portfolio/blob/main/src/main.tsx) (main.tsx), [`src/components/Header.tsx`](https://github.com/devsahil2063/portfolio/blob/main/src/components/Header.tsx) (Header), [`src/components/ProjectsSection.tsx`](https://github.com/devsahil2063/portfolio/blob/main/src/components/ProjectsSection.tsx) (Projects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_index_html["index.html<br/>entry document<br/>[index.html]"]
  node_main_tsx["main.tsx<br/>bootstrap<br/>[main.tsx]"]
end

subgraph group_ui["UI"]
  node_app_portfolio["Portfolio App<br/>page shell<br/>[App.portfolio.tsx]"]
  node_header["Header<br/>navigation<br/>[Header.tsx]"]
  node_hero["Hero<br/>landing section<br/>[HeroSection.tsx]"]
  node_about["About<br/>content section<br/>[AboutSection.tsx]"]
  node_experience["Experience<br/>timeline section"]
  node_projects["Projects<br/>showcase section"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

subgraph group_shared["Shared UI"]
  node_theme["Theme<br/>[theme.ts]"]
  node_global_css["Global CSS<br/>base styles<br/>[index.css]"]
  node_gradient_text["Gradient Text<br/>styled text<br/>[GradientText.tsx]"]
  node_nav_button["Nav Button<br/>styled control<br/>[NavButton.tsx]"]
  node_project_card["Project Card<br/>styled card<br/>[ProjectCard.tsx]"]
  node_tech_tag["Tech Tag<br/>styled badge<br/>[TechTag.tsx]"]
  node_icons{{"Icons<br/>svg set"}}
end

subgraph group_assets["Assets"]
  node_assets_dir[("Assets<br/>static media")]
end

subgraph group_tooling["Tooling"]
  node_vite_config["Vite Config<br/>build config<br/>[vite.config.ts]"]
  node_tsconfig["TS Config<br/>type config<br/>[tsconfig.json]"]
  node_eslint_config["ESLint<br/>lint config<br/>[eslint.config.js]"]
end

node_index_html -->|"loads"| node_main_tsx
node_main_tsx -->|"mounts"| node_app_portfolio
node_app_portfolio -->|"composes"| node_header
node_app_portfolio -->|"composes"| node_hero
node_app_portfolio -->|"composes"| node_about
node_app_portfolio -->|"composes"| node_experience
node_app_portfolio -->|"composes"| node_projects
node_app_portfolio -->|"composes"| node_footer
node_app_portfolio -->|"applies"| node_theme
node_app_portfolio -->|"styles"| node_global_css
node_header -->|"uses"| node_nav_button
node_hero -->|"uses"| node_gradient_text
node_projects -->|"uses"| node_project_card
node_projects -->|"uses"| node_tech_tag
node_footer -->|"uses"| node_icons
node_header -->|"uses"| node_icons
node_app_portfolio -.->|"references"| node_assets_dir
node_vite_config -->|"serves"| node_main_tsx
node_vite_config -->|"starts from"| node_index_html
node_tsconfig -->|"types"| node_main_tsx
node_eslint_config -->|"checks"| node_app_portfolio

click node_index_html "https://github.com/devsahil2063/portfolio/blob/main/index.html"
click node_main_tsx "https://github.com/devsahil2063/portfolio/blob/main/src/main.tsx"
click node_app_portfolio "https://github.com/devsahil2063/portfolio/blob/main/App.portfolio.tsx"
click node_header "https://github.com/devsahil2063/portfolio/blob/main/src/components/Header.tsx"
click node_hero "https://github.com/devsahil2063/portfolio/blob/main/src/components/HeroSection.tsx"
click node_about "https://github.com/devsahil2063/portfolio/blob/main/src/components/AboutSection.tsx"
click node_experience "https://github.com/devsahil2063/portfolio/blob/main/src/components/ExperienceSection.tsx"
click node_projects "https://github.com/devsahil2063/portfolio/blob/main/src/components/ProjectsSection.tsx"
click node_footer "https://github.com/devsahil2063/portfolio/blob/main/src/components/Footer.tsx"
click node_theme "https://github.com/devsahil2063/portfolio/blob/main/src/theme.ts"
click node_global_css "https://github.com/devsahil2063/portfolio/blob/main/index.css"
click node_gradient_text "https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/GradientText.tsx"
click node_nav_button "https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/NavButton.tsx"
click node_project_card "https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/ProjectCard.tsx"
click node_tech_tag "https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/TechTag.tsx"
click node_icons "https://github.com/devsahil2063/portfolio/tree/main/src/components/icons"
click node_assets_dir "https://github.com/devsahil2063/portfolio/tree/main/public/assets"
click node_vite_config "https://github.com/devsahil2063/portfolio/blob/main/vite.config.ts"
click node_tsconfig "https://github.com/devsahil2063/portfolio/blob/main/tsconfig.json"
click node_eslint_config "https://github.com/devsahil2063/portfolio/blob/main/eslint.config.js"

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_html,node_main_tsx toneBlue
class node_app_portfolio,node_header,node_hero,node_about,node_experience,node_projects,node_footer toneAmber
class node_theme,node_global_css,node_gradient_text,node_nav_button,node_project_card,node_tech_tag,node_icons toneMint
class node_assets_dir toneRose
class node_vite_config,node_tsconfig,node_eslint_config toneIndigo
```

## Components

### Runtime

Browser-executed portfolio app

- [index.html](https://github.com/devsahil2063/portfolio/blob/main/index.html): entry document · Vite entry document that loads the app · `index.html`
- [main.tsx](https://github.com/devsahil2063/portfolio/blob/main/src/main.tsx): bootstrap · React entry point that mounts the app · `src/main.tsx`

### UI

Top-level page composition and sections

- [Portfolio App](https://github.com/devsahil2063/portfolio/blob/main/App.portfolio.tsx): page shell · Top-level composition for the portfolio site · `App.portfolio.tsx`
- [Header](https://github.com/devsahil2063/portfolio/blob/main/src/components/Header.tsx): navigation · Section navigation and top bar · `src/components/Header.tsx`
- [Hero](https://github.com/devsahil2063/portfolio/blob/main/src/components/HeroSection.tsx): landing section · Introductory above-the-fold section · `src/components/HeroSection.tsx`
- [About](https://github.com/devsahil2063/portfolio/blob/main/src/components/AboutSection.tsx): content section · Background and profile section · `src/components/AboutSection.tsx`
- [Experience](https://github.com/devsahil2063/portfolio/blob/main/src/components/ExperienceSection.tsx): timeline section · Work history and experience content · `src/components/ExperienceSection.tsx`
- [Projects](https://github.com/devsahil2063/portfolio/blob/main/src/components/ProjectsSection.tsx): showcase section · Project gallery and highlights · `src/components/ProjectsSection.tsx`
- [Footer](https://github.com/devsahil2063/portfolio/blob/main/src/components/Footer.tsx): page footer · Closing links and site footer · `src/components/Footer.tsx`

### Shared UI

Reusable presentation building blocks

- [Theme](https://github.com/devsahil2063/portfolio/blob/main/src/theme.ts): mui theme · Material UI theme configuration · `src/theme.ts`
- [Global CSS](https://github.com/devsahil2063/portfolio/blob/main/index.css): base styles · Document-level styling and resets · `index.css`
- [Gradient Text](https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/GradientText.tsx): styled text · Reusable emphasized text treatment · `src/components/styled/GradientText.tsx`
- [Nav Button](https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/NavButton.tsx): styled control · Reusable navigation button styling · `src/components/styled/NavButton.tsx`
- [Project Card](https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/ProjectCard.tsx): styled card · Reusable project presentation card · `src/components/styled/ProjectCard.tsx`
- [Tech Tag](https://github.com/devsahil2063/portfolio/blob/main/src/components/styled/TechTag.tsx): styled badge · Reusable technology label chip · `src/components/styled/TechTag.tsx`
- [Icons](https://github.com/devsahil2063/portfolio/tree/main/src/components/icons): svg set · Brand and social icon components · `src/components/icons`

### Assets

Static files served directly

- [Assets](https://github.com/devsahil2063/portfolio/tree/main/public/assets): static media · Public images and other static files · `public/assets`

### Tooling

Build and type-check pipeline

- [Vite Config](https://github.com/devsahil2063/portfolio/blob/main/vite.config.ts): build config · Frontend dev and build configuration · `vite.config.ts`
- [TS Config](https://github.com/devsahil2063/portfolio/blob/main/tsconfig.json): type config · TypeScript project configuration · `tsconfig.json`
- [ESLint](https://github.com/devsahil2063/portfolio/blob/main/eslint.config.js): lint config · Code quality and linting rules · `eslint.config.js`

## Connections

- index.html → main.tsx: loads · Browser document bootstraps the React entry point
- main.tsx → Portfolio App: mounts · Entry point renders the top-level portfolio app
- Portfolio App → Header: composes · Top-level layout includes navigation header
- Portfolio App → Hero: composes · Top-level layout includes hero section
- Portfolio App → About: composes · Top-level layout includes about section
- Portfolio App → Experience: composes · Top-level layout includes experience section
- Portfolio App → Projects: composes · Top-level layout includes projects section
- Portfolio App → Footer: composes · Top-level layout includes footer
- Portfolio App → Theme: applies · App uses shared Material UI theme
- Portfolio App → Global CSS: styles · App is layered on global document CSS
- Header → Nav Button: uses · Header navigation reuses styled buttons
- Hero → Gradient Text: uses · Hero emphasizes key words with gradient text
- Projects → Project Card: uses · Projects are rendered with reusable cards
- Projects → Tech Tag: uses · Project metadata is shown as tech tags
- Footer → Icons: uses · Footer uses social and brand icons
- Header → Icons: uses · Header may use logo or social icons
- Portfolio App → Assets: references · Sections likely draw from public static assets
- Vite Config → main.tsx: serves · Vite pipeline serves the application entry
- Vite Config → index.html: starts from · Vite development and build starts at the document entry
- TS Config → main.tsx: types · TypeScript config governs source compilation
- ESLint → Portfolio App: checks · Linting applies to the React source tree
