# yogeshykg/v2-portfolio architecture

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

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

## Overview

1. **Overall shape**
   - This is a **Next.js App Router** project for a portfolio-style site.
   - The architecture is mostly **presentation + content + a few lightweight API endpoints**, with no separate backend service or database visible in the repo.

2. **Route-level structure**
   - The `src/app` directory defines the main navigation surface: home (`page.js`), projects, resume, archive, case studies, and a dynamic **3D configurator** route at `3d-configurator/[model]`.
   - `layout.js` provides the shared application shell, while `not-found.js` handles missing routes.

3. **Homepage and content pages**
   - The home page is assembled from reusable sections under `src/app/components` and content definitions in `src/app/data/homepage`.
   - Similar separation exists for archive and SEO content, which suggests the site is **data-driven rather than hardcoded** page-by-page.

4. **3D configurator subsystem**
   - The most distinctive subsystem is the **interactive 3D model configurator**.
   - It has a dedicated route hierarchy under `src/app/3d-configurator`, plus reusable viewer/configurator components in `src/app/components/configurator-viewer`, `model_configurator`, and `configurator-previews`.
   - The configurator uses model-specific scene setup components for different assets like the arm chair, sofa, and winter jacket.

5. **3D asset pipeline**
   - Runtime model assets live in `public/models/...` as **glTF scenes, binary data, and textures**.
   - Matching generated React model components live in `src/app/components/3d-models`, which strongly suggests a rendering layer built around those static assets.
   - This is a self-contained frontend asset pipeline: static files in `public`, scene wiring in React components.

6. **Support/contact subsystem**
   - There are two serverless API routes under `src/app/api`: `contact` and `cold-mail`.
   - These likely handle outbound form submissions or email-triggered workflows from the site’s support/contact surfaces.
   - The support UI itself is split into a launcher/panel and plug-in style panels under `supportWidget/supportPanel/plugins`.

7. **Shared interaction UI**
   - Common interactive building blocks are centralized under `src/app/components`, including navbar, tooltip, cursor overlay, buttons, credits, and experience/project cards.
   - This indicates the site is composed of **many small client-facing components** rather than large page monoliths.

8. **Data and configuration layer**
   - Static content/config is separated into `src/app/data`, including:
     - homepage content,
     - project archive data,
     - schema metadata,
     - SEO definitions.
   - This gives the app a clear boundary between **content models** and **rendering components**.

9. **SEO, metadata, and discoverability**
   - The presence of `robots.txt`, `sitemap.xml`, `manifest.json`, and SEO data files shows the site is built for public indexing and shareability.
   - `public/og` likely contains social preview assets, supporting link unfurling and social sharing.

10. **PWA / client-side runtime support**
   - `public/sw.js` and `public/workbox-*.js` indicate a **service worker / PWA-style** delivery layer.
   - This affects architecture at the edge of the app: some assets and navigation may be cached for offline or fast repeat loading.

11. **Static media and documents**
   - `public/resume.pdf` and `public/thumbnails` are served as direct static assets.
   - The site mixes routed pages with downloadable/public assets, so any diagram should show a **static asset boundary** alongside the app routes.

12. **Scripts and generated artifacts**
   - `src/scripts` contains generators for email HTML and tree/structure outputs.
   - These look like developer tooling rather than runtime code, used to generate auxiliary artifacts under `scripts_outputs`.

13. **Implementation style**
   - Components use **CSS Modules** extensively, keeping styles local to each UI unit.
   - The repo also uses `jsconfig.json` and ESLint configuration, which suggests a fairly standard Next.js frontend toolchain rather than a custom build system.

14. **How data flows through the app**
   - Static content/data files feed page components.
   - Page components assemble reusable UI sections.
   - The configurator pages load model-specific scenes and assets from `public/models`.
   - User actions from contact/support surfaces can flow to the `api/contact` and `api/cold-mail` routes.
   - Everything else appears to remain client-side or statically served.

15. **Best diagram boundary**
   - A good architecture diagram would separate the repo into:
     - **App Router pages**
     - **Reusable UI components**
     - **3D configurator and model assets**
     - **API routes for messaging**
     - **Static/public assets and PWA files**
     - **Content/SEO data and developer scripts**

Main entry points: [`src/app/layout.js`](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/layout.js) (Shell), [`src/app/data/homepage/projects.js`](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/data/homepage/projects.js) (Content Data), [`src/app/page.js`](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/page.js) (Home), [`src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx`](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx) (Scene Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_routes["App Router"]
  node_layout["Shell<br/>layout<br/>[layout.js]"]
  node_home_page["Home<br/>route<br/>[page.js]"]
  node_projects_page["Projects<br/>route<br/>[page.js]"]
  node_resume_page["Resume<br/>route<br/>[page.js]"]
  node_archive_page["Archive<br/>route<br/>[page.js]"]
  node_case_studies["Case Studies<br/>route<br/>[page.js]"]
  node_configurator_route["3D Route<br/>[page.js]"]
  node_contact_api["Contact API<br/>serverless api<br/>[route.js]"]
  node_cold_mail_api["Cold Mail API<br/>serverless api<br/>[route.js]"]
end

subgraph group_ui_components["UI Components"]
  node_home_sections["Home Blocks<br/>section components<br/>[Experience.jsx]"]
  node_support_widget["Support Widget<br/>interaction ui<br/>[SupportWidget.jsx]"]
  node_projects_ui["Project Cards<br/>[Projects.jsx]"]
  node_archive_table["Archive Table<br/>table ui<br/>[ProjectArchive.jsx]"]
end

subgraph group_configurator["3D Configurator"]
  node_configurator_viewer["Viewer"]
  node_model_configurator["Configurator<br/>3d controls"]
  node_scene_setup["Scene Setup<br/>scene wiring<br/>[ArmChairScene.jsx]"]
  node_model_components["Model Components<br/>react models"]
end

subgraph group_content_data["Content Data"]
  node_content_data_files["Content Data<br/>static content<br/>[projects.js]"]
  node_seo_data["SEO Data<br/>metadata<br/>[seo.js]"]
end

subgraph group_assets["Public Assets"]
  node_public_models[("Model Assets<br/>gltf assets<br/>[scene.gltf]")]
  node_public_media["Media Assets<br/>static assets<br/>[resume.pdf]"]
end

subgraph group_tooling["Scripts"]
  node_scripts_tooling["Generators<br/>build scripts"]
end

node_layout -->|"wraps"| node_home_page
node_layout -->|"wraps"| node_projects_page
node_layout -->|"wraps"| node_resume_page
node_layout -->|"wraps"| node_archive_page
node_layout -->|"wraps"| node_case_studies
node_layout -->|"wraps"| node_configurator_route
node_home_page -->|"assembles"| node_home_sections
node_home_page -->|"reads"| node_content_data_files
node_projects_page -->|"renders"| node_projects_ui
node_projects_page -->|"reads"| node_content_data_files
node_archive_page -->|"renders"| node_archive_table
node_archive_page -->|"reads"| node_content_data_files
node_case_studies -->|"reads"| node_content_data_files
node_resume_page -->|"serves"| node_public_media
node_configurator_route -->|"uses"| node_configurator_viewer
node_configurator_route -->|"uses"| node_model_configurator
node_configurator_viewer -->|"loads"| node_scene_setup
node_scene_setup -->|"renders"| node_model_components
node_scene_setup -->|"loads"| node_public_models
node_model_configurator -->|"controls"| node_scene_setup
node_support_widget -->|"submits"| node_contact_api
node_support_widget -->|"submits"| node_cold_mail_api
node_support_widget -->|"uses"| node_content_data_files
node_seo_data -->|"metadata"| node_home_page
node_seo_data -->|"feeds"| node_content_data_files
node_scripts_tooling -.->|"generates"| node_content_data_files
node_scripts_tooling -.->|"generates"| node_public_media

click node_layout "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/layout.js"
click node_home_page "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/page.js"
click node_projects_page "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/projects/page.js"
click node_resume_page "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/resume/page.js"
click node_archive_page "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/archive/page.js"
click node_case_studies "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/case-study/techbinary/page.js"
click node_configurator_route "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/3d-configurator/[model]/page.js"
click node_contact_api "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/api/contact/route.js"
click node_cold_mail_api "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/api/cold-mail/route.js"
click node_home_sections "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/experience/Experience.jsx"
click node_support_widget "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/supportWidget/SupportWidget.jsx"
click node_projects_ui "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/projects/Projects.jsx"
click node_archive_table "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/project_archive_table/ProjectArchive.jsx"
click node_configurator_viewer "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/configurator-viewer/ConfiguratorViewer.jsx"
click node_model_configurator "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/model_configurator/ModelConfigurator.jsx"
click node_scene_setup "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx"
click node_model_components "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/3d-models/Arm_Chair__Furniture.jsx"
click node_content_data_files "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/data/homepage/projects.js"
click node_seo_data "https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/data/seo/seo.js"
click node_public_models "https://github.com/yogeshykg/v2-portfolio/blob/main/public/models/arm_chair__furniture/scene.gltf"
click node_public_media "https://github.com/yogeshykg/v2-portfolio/blob/main/public/resume.pdf"
click node_scripts_tooling "https://github.com/yogeshykg/v2-portfolio/blob/main/src/scripts/generateEmailHTML.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_layout,node_home_page,node_projects_page,node_resume_page,node_archive_page,node_case_studies,node_configurator_route,node_contact_api,node_cold_mail_api toneBlue
class node_home_sections,node_support_widget,node_projects_ui,node_archive_table toneAmber
class node_configurator_viewer,node_model_configurator,node_scene_setup,node_model_components toneMint
class node_content_data_files,node_seo_data toneRose
class node_public_models,node_public_media toneIndigo
class node_scripts_tooling toneTeal
```

## Components

### App Router

Route pages, layout, and API handlers

- [Shell](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/layout.js): layout · Shared application shell and metadata boundary · `src/app/layout.js`
- [Home](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/page.js): route · Landing page composition · `src/app/page.js`
- [Projects](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/projects/page.js): route · Projects listing page · `src/app/projects/page.js`
- [Resume](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/resume/page.js): route · Resume download/view page · `src/app/resume/page.js`
- [Archive](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/archive/page.js): route · Archive listing page · `src/app/archive/page.js`
- [Case Studies](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/case-study/techbinary/page.js): route · Individual case study routes · `src/app/case-study/techbinary/page.js`
- [3D Route](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/3d-configurator/[model]/page.js): route · Configurator entry and dynamic model route · `src/app/3d-configurator/[model]/page.js`
- [Contact API](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/api/contact/route.js): serverless api · Outbound contact submission endpoint · `src/app/api/contact/route.js`
- [Cold Mail API](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/api/cold-mail/route.js): serverless api · Outbound cold-mail workflow endpoint · `src/app/api/cold-mail/route.js`

### UI Components

Reusable presentation and interaction components

- [Home Blocks](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/experience/Experience.jsx): section components · Reusable homepage sections and cards · `src/app/components/experience/Experience.jsx`
- [Support Widget](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/supportWidget/SupportWidget.jsx): interaction ui · Launcher, panel, and plugin-based support surface · `src/app/components/supportWidget/SupportWidget.jsx`
- [Project Cards](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/projects/Projects.jsx): cards · Project presentation components · `src/app/components/projects/Projects.jsx`
- [Archive Table](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/project_archive_table/ProjectArchive.jsx): table ui · Archive presentation component · `src/app/components/project_archive_table/ProjectArchive.jsx`

### 3D Configurator

Viewer, scene setup, and model customization stack

- [Viewer](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/configurator-viewer/ConfiguratorViewer.jsx): 3d viewer · Interactive model viewer and render surface · `src/app/components/configurator-viewer/ConfiguratorViewer.jsx`
- [Configurator](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/model_configurator/ModelConfigurator.jsx): 3d controls · Model customization and configuration logic · `src/app/components/model_configurator/ModelConfigurator.jsx`
- [Scene Setup](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx): scene wiring · Model-specific scene setup components · `src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx`
- [Model Components](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/components/3d-models/Arm_Chair__Furniture.jsx): react models · Generated React wrappers for 3D assets · `src/app/components/3d-models/Arm_Chair__Furniture.jsx`

### Content Data

Static content and SEO metadata

- [Content Data](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/data/homepage/projects.js): static content · Homepage, archive, and SEO data definitions · `src/app/data/homepage/projects.js`
- [SEO Data](https://github.com/yogeshykg/v2-portfolio/blob/main/src/app/data/seo/seo.js): metadata · SEO definitions and schema metadata · `src/app/data/seo/seo.js`

### Public Assets

Static files, models, and service worker assets

- [Model Assets](https://github.com/yogeshykg/v2-portfolio/blob/main/public/models/arm_chair__furniture/scene.gltf): gltf assets · Static glTF scenes, binaries, and textures · `public/models/arm_chair__furniture/scene.gltf`
- [Media Assets](https://github.com/yogeshykg/v2-portfolio/blob/main/public/resume.pdf): static assets · Resume, thumbnails, social preview, and PWA files · `public/resume.pdf`

### Scripts

Repository generators and developer tooling

- [Generators](https://github.com/yogeshykg/v2-portfolio/blob/main/src/scripts/generateEmailHTML.js): build scripts · Repository structure and email HTML generators · `src/scripts/generateEmailHTML.js`

## Connections

- Shell → Home: wraps · Shared shell renders routed pages
- Shell → Projects: wraps · Shared shell renders routed pages
- Shell → Resume: wraps · Shared shell renders routed pages
- Shell → Archive: wraps · Shared shell renders routed pages
- Shell → Case Studies: wraps · Shared shell renders routed pages
- Shell → 3D Route: wraps · Shared shell renders routed pages
- Home → Home Blocks: assembles · Homepage composes reusable sections
- Home → Content Data: reads · Homepage content comes from static data
- Projects → Project Cards: renders · Projects route uses project card UI
- Projects → Content Data: reads · Projects content is data-driven
- Archive → Archive Table: renders · Archive route uses table component
- Archive → Content Data: reads · Archive entries come from static data
- Case Studies → Content Data: reads · Case study content is stored as content/data
- Resume → Media Assets: serves · Resume page exposes downloadable PDF and media
- 3D Route → Viewer: uses · Dynamic model route mounts viewer
- 3D Route → Configurator: uses · Dynamic model route mounts configuration controls
- Viewer → Scene Setup: loads · Viewer selects model-specific scenes
- Scene Setup → Model Components: renders · Scene setup uses generated model wrappers
- Scene Setup → Model Assets: loads · Scenes consume static glTF assets
- Configurator → Scene Setup: controls · Configuration state drives scene setup
- Support Widget → Contact API: submits · Support/contact flows can reach contact endpoint
- Support Widget → Cold Mail API: submits · Cold-mail plugin can trigger email workflow
- Support Widget → Content Data: uses · Support copy and options are content-driven
- SEO Data → Home: metadata · SEO definitions support public pages
- SEO Data → Content Data: feeds · SEO metadata is maintained alongside content definitions
- Generators → Content Data: generates · Developer scripts produce auxiliary structure outputs
- Generators → Media Assets: generates · Scripts may emit email HTML and related artifacts
