How yogeshykg/v2-portfolio works
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: layout.js Shell · projects.js Content Data · page.js Home · ArmChairScene.jsx Scene Setup
Components 22
App Router
Route pages, layout, and API handlers
- Shell · Shared application shell and metadata boundary
src/app/layout.js - Home · Landing page composition
src/app/page.js - Projects · Projects listing page
src/app/projects/page.js - Resume · Resume download/view page
src/app/resume/page.js - Archive · Archive listing page
src/app/archive/page.js - Case Studies · Individual case study routes
src/app/case-study/techbinary/page.js - 3D Route · Configurator entry and dynamic model route
src/app/3d-configurator/[model]/page.js - Contact API · Outbound contact submission endpoint
src/app/api/contact/route.js - Cold Mail API · Outbound cold-mail workflow endpoint
src/app/api/cold-mail/route.js
UI Components
Reusable presentation and interaction components
- Home Blocks · Reusable homepage sections and cards
src/app/components/experience/Experience.jsx - Support Widget · Launcher, panel, and plugin-based support surface
src/app/components/supportWidget/SupportWidget.jsx - Project Cards · Project presentation components
src/app/components/projects/Projects.jsx - Archive Table · Archive presentation component
src/app/components/project_archive_table/ProjectArchive.jsx
3D Configurator
Viewer, scene setup, and model customization stack
- Viewer · Interactive model viewer and render surface
src/app/components/configurator-viewer/ConfiguratorViewer.jsx - Configurator · Model customization and configuration logic
src/app/components/model_configurator/ModelConfigurator.jsx - Scene Setup · Model-specific scene setup components
src/app/components/configurator-viewer/scene-setup/ArmChairScene.jsx - Model Components · Generated React wrappers for 3D assets
src/app/components/3d-models/Arm_Chair__Furniture.jsx
Content Data
Static content and SEO metadata
- Content Data · Homepage, archive, and SEO data definitions
src/app/data/homepage/projects.js - SEO Data · SEO definitions and schema metadata
src/app/data/seo/seo.js
Public Assets
Static files, models, and service worker assets
- Model Assets · Static glTF scenes, binaries, and textures
public/models/arm_chair__furniture/scene.gltf - Media Assets · Resume, thumbnails, social preview, and PWA files
public/resume.pdf
Scripts
Repository generators and developer tooling
- Generators · Repository structure and email HTML generators
src/scripts/generateEmailHTML.js
Connections 27
- 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