# sohamwalam11/soham-portfolio architecture

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

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

## Overview

##### Project type and purpose
- This is a single-page portfolio website built with React and TypeScript.
- It’s deployed as a static site (via Vercel), showcasing projects, skills, achievements, and a contact form.

##### File structure
- Top-level files: package.json, tsconfig.json, vite.config.ts, postcss.config.js, tailwind.config.ts. → build & tooling config.
- public/ → static assets (resume, images, projects data folders).
- src/
- pages/Index.tsx, NotFound.tsx → route targets (SPA routing).
- App.tsx, main.tsx → application root and bootstrapping.
- components/ui/… → reusable UI primitives (shadcn/ui wrappers).
- hooks/ → custom React hooks (e.g., useMobile, useToast).
- lib/ → helper modules (data loaders: achieve.ts, certs.ts, utilities).
- README describes tech stack: React, TypeScript, TailwindCSS, shadcn/ui, Framer Motion, Vercel.

##### README for additional insights
- No backend/API; all data is static or loaded at build time.
- Animations via Framer Motion; UI styling via Tailwind + shadcn/ui.
- Deployment on Vercel implies a CI/CD pipeline that runs the Vite build and serves the dist folder.

##### Main components & relationships
a. Components:
1. Developer Workstation
- Source code (Git), VS Code, local dev server (Vite).
2. Build System (Vite)
- Transpilation (TSX → JS), bundling, PostCSS (Tailwind) → production assets.
3. CI/CD (Vercel)
- Git integration triggers build & deploy.
4. CDN/Static Hosting
- Serves index.html, JS/CSS bundles, public assets.
5. Client Browser
- Loads SPA, executes React + hooks, renders UI.
6. External Services (optional)
- Contact form submission (e.g., formspree, email API).

b. Relationships & data flow:
- Developer pushes code → Vercel CI → Vite build → generated static files → deployed to CDN.
- End user browser → requests index.html & assets → receives JS bundle → React app bootstraps (main.tsx → App.tsx) → client-side routing (pages/Index, NotFound) → loads static data from lib/ modules → renders UI components from components/ui.
- If contact form is used, client makes an HTTP POST to an external API/service.

c. Architectural patterns & design principles:
- SPA architecture: client-side routing + component-driven UI.
- Atomic UI components (shadcn/ui library wrappers).
- Utility-first CSS (Tailwind) with design system tokens.
- Build-time data loading (lib/achieve.ts, lib/certs.ts).
- CI/CD with “deploy on push” model.

d. Key technologies & frameworks:
- React 18, TypeScript, Vite (bundler), TailwindCSS + PostCSS, shadcn/ui, Framer Motion, Vercel.

##### Detailed capture of essential elements
- Break out UI sub-systems:
- Layout & pages (Index, NotFound)
- UI primitives (accordion, button, modal, etc.)
- Animation layer (Framer Motion)
- Config files as part of the build node.
- That “public/” content is directly served off CDN.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Workstation"
        Developer["Developer Workstation"]:::dev
        DevGit["Git Repository"]:::dev
        Editor["VS Code"]:::dev
    end

    %% CI/CD Pipeline
    subgraph "CI/CD Pipeline"
        Vercel["Vercel CI/CD"]:::ci
    end

    %% Build System
    subgraph "Build System"
        Vite["Vite Build (bundler)"]:::build
        Configs["Tooling Configs"]:::build
        Styles["Global Styles"]:::build
        HTML["HTML Template"]:::build
    end

    %% CDN / Static Hosting
    subgraph "CDN / Static Hosting"
        CDN["CDN"]:::cdn
        PublicAssets["public/ (static assets)"]:::cdn
    end

    %% Client Browser
    subgraph "Client Browser"
        Browser["Browser"]:::browser
        ReactApp["React App Runtime"]:::browser
        AppComp["App.tsx"]:::browser
        Bootstrap["main.tsx"]:::browser
        subgraph "Pages"
            HomePage["Index.tsx"]:::browser
            NotFound["NotFound.tsx"]:::browser
        end
        UIPrims["UI Primitives"]:::browser
        HooksComp["Custom Hooks"]:::browser
        subgraph "Data Modules"
            Achieve["achieve.ts"]:::browser
            Certs["certs.ts"]:::browser
            Utils["utils.ts"]:::browser
        end
        Anim["Framer Motion Animations"]:::browser
    end

    %% External Service
    External["External Email API"]:::external

    %% Connections
    Developer --> DevGit
    Developer --> Editor
    DevGit -->|push triggers| Vercel
    Vercel -->|runs build| Vite
    Vite -->|reads config| Configs
    Vite -->|includes styles| Styles
    Vite -->|bundles HTML| HTML
    Vite -->|outputs dist| CDN
    CDN -->|serves index.html & assets| Browser
    CDN --> PublicAssets
    Browser -->|loads| ReactApp
    ReactApp --> Bootstrap
    ReactApp --> AppComp
    ReactApp --> HomePage
    ReactApp --> NotFound
    ReactApp --> UIPrims
    ReactApp --> HooksComp
    ReactApp --> Achieve
    ReactApp --> Certs
    ReactApp --> Utils
    ReactApp --> Anim
    Browser -->|POST contact| External

    %% Click Events
    click Bootstrap "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/main.tsx"
    click AppComp "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/App.tsx"
    click HomePage "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/pages/Index.tsx"
    click NotFound "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/pages/NotFound.tsx"
    click UIPrims "https://github.com/sohamwalam11/soham-portfolio/tree/main/src/components/ui/"
    click HooksComp "https://github.com/sohamwalam11/soham-portfolio/tree/main/src/hooks/"
    click Achieve "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/lib/achieve.ts"
    click Certs "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/lib/certs.ts"
    click Utils "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/lib/utils.ts"
    click Styles "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/index.css"
    click Styles "https://github.com/sohamwalam11/soham-portfolio/blob/main/src/App.css"
    click PublicAssets "https://github.com/sohamwalam11/soham-portfolio/tree/main/public/"
    click HTML "https://github.com/sohamwalam11/soham-portfolio/blob/main/index.html"
    click Configs "https://github.com/sohamwalam11/soham-portfolio/blob/main/vite.config.ts"
    click Configs "https://github.com/sohamwalam11/soham-portfolio/blob/main/tsconfig.json"
    click Configs "https://github.com/sohamwalam11/soham-portfolio/blob/main/tailwind.config.ts"
    click Configs "https://github.com/sohamwalam11/soham-portfolio/blob/main/postcss.config.js"
    click Configs "https://github.com/sohamwalam11/soham-portfolio/blob/main/package.json"

    %% Styles
    classDef dev fill:#ffe4e1,stroke:#333,stroke-width:1px
    classDef ci fill:#fff8dc,stroke:#333,stroke-width:1px
    classDef build fill:#e0ffff,stroke:#333,stroke-width:1px
    classDef cdn fill:#f0fff0,stroke:#333,stroke-width:1px
    classDef browser fill:#e6e6fa,stroke:#333,stroke-width:1px
    classDef external fill:#f5f5f5,stroke:#333,stroke-width:1px
```
