# shivam5551/gaurav-kumar-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/shivam5551/gaurav-kumar-portfolio
- Repository: https://github.com/shivam5551/gaurav-kumar-portfolio

## Overview

This is a designer portfolio site with work, about, résumé, and lab pages, plus an interactive portfolio assistant. Visitors navigate the pages and browse project details; they can also ask the assistant questions, optionally grounding them in selected page text. The assistant flow is supported by the UI provider, API route, portfolio context, and Gemini client. Page-to-component wiring beyond the sampled excerpts is inferred from the repository’s route and component structure; uncertain links are omitted.

Main entry points: [`app/api/llm/route.ts`](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/api/llm/route.ts) (Assistant API), [`components/providers/UIProvider.tsx`](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/providers/UIProvider.tsx) (UI state), [`components/llm/LLMPanel.tsx`](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/LLMPanel.tsx) (Assistant panel), [`components/navigation/Nav.tsx`](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/navigation/Nav.tsx) (Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site experience"]
  node_home["Home route<br/>[page.tsx]"]
  node_about_route["About route<br/>[page.tsx]"]
  node_resume_route["Résumé route<br/>[page.tsx]"]
  node_lab_route["Lab route<br/>[page.tsx]"]
  node_nav["Navigation<br/>[Nav.tsx]"]
  node_shell["Page shell<br/>[Shell.tsx]"]
  node_site_data["Site content<br/>[site.ts]"]
end

subgraph group_portfolio["Portfolio content"]
  node_work["Work view<br/>[WorkView.tsx]"]
  node_about_view["About view<br/>[AboutView.tsx]"]
  node_lab_view["Lab view<br/>[LabView.tsx]"]
  node_experience["Experience<br/>[Experience.tsx]"]
  node_project_card["Project card<br/>[ProjectCard.tsx]"]
  node_project_viewer["Project viewer<br/>[ProjectViewer.tsx]"]
  node_project_data["Project data<br/>[projects.ts]"]
  node_about_data["About data<br/>[about.ts]"]
  node_lab_data["Lab data<br/>[lab.ts]"]
end

subgraph group_assistant["Portfolio assistant"]
  node_ui_provider["UI state<br/>[UIProvider.tsx]"]
  node_selection["Selection action"]
  node_panel["Assistant panel<br/>[LLMPanel.tsx]"]
  node_composer["Question composer<br/>[Composer.tsx]"]
  node_suggestions["Follow-up suggestions<br/>[Suggestions.tsx]"]
  node_knowledge["Assistant knowledge<br/>[knowledge.ts]"]
  node_api["Assistant API<br/>[route.ts]"]
  node_context["Portfolio context<br/>[context.ts]"]
  node_gemini["Gemini client<br/>[gemini.ts]"]
end

subgraph group_shared["Shared UI"]
end

node_visitor(("Visitor"))
node_gemini_service{{"Google Gemini"}}

node_visitor -->|"uses navigation"| node_nav
node_visitor -->|"opens site"| node_home
node_nav -->|"opens assistant"| node_ui_provider
node_nav -->|"reads navigation content"| node_site_data
node_home -->|"renders work"| node_work
node_about_route -->|"renders about"| node_about_view
node_resume_route -->|"renders résumé"| node_experience
node_lab_route -->|"renders lab"| node_lab_view
node_work -->|"reads projects"| node_project_data
node_work -->|"renders projects"| node_project_card
node_project_card -->|"opens details"| node_project_viewer
node_project_viewer -->|"reads project details"| node_project_data
node_about_view -->|"reads about content"| node_about_data
node_about_view -->|"opens selected project"| node_project_viewer
node_lab_view -->|"reads lab content"| node_lab_data
node_experience -->|"reads experience"| node_site_data
node_selection -->|"opens with selection"| node_ui_provider
node_ui_provider -->|"posts question"| node_api
node_panel -->|"reads and updates state"| node_ui_provider
node_panel -->|"renders composer"| node_composer
node_panel -->|"renders follow-ups"| node_suggestions
node_api -->|"uses system context"| node_context
node_api -->|"requests generation"| node_gemini
node_api -->|"generates response"| node_gemini_service
node_api -.->|"not established"| node_knowledge
node_gemini -->|"connects to model"| node_gemini_service

click node_home "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/page.tsx"
click node_about_route "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/about/page.tsx"
click node_resume_route "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/resume/page.tsx"
click node_lab_route "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/lab/page.tsx"
click node_nav "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/navigation/Nav.tsx"
click node_shell "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/layout/Shell.tsx"
click node_work "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/WorkView.tsx"
click node_about_view "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/about/AboutView.tsx"
click node_lab_view "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/lab/LabView.tsx"
click node_experience "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/Experience.tsx"
click node_project_card "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/ProjectCard.tsx"
click node_project_viewer "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/ProjectViewer.tsx"
click node_project_data "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/projects.ts"
click node_about_data "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/about.ts"
click node_lab_data "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/lab.ts"
click node_site_data "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/site.ts"
click node_ui_provider "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/providers/UIProvider.tsx"
click node_selection "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/selection/SelectionAction.tsx"
click node_panel "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/LLMPanel.tsx"
click node_composer "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/Composer.tsx"
click node_suggestions "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/Suggestions.tsx"
click node_knowledge "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/knowledge.ts"
click node_api "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/api/llm/route.ts"
click node_context "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/llm/context.ts"
click node_gemini "https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/llm/gemini.ts"

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_home,node_about_route,node_resume_route,node_lab_route,node_nav,node_shell,node_site_data toneBlue
class node_work,node_about_view,node_lab_view,node_experience,node_project_card,node_project_viewer,node_project_data,node_about_data,node_lab_data toneAmber
class node_ui_provider,node_selection,node_panel,node_composer,node_suggestions,node_knowledge,node_api,node_context,node_gemini toneMint
class node_visitor,node_gemini_service toneIndigo
```

## Components

### Site experience

- [Home route](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/page.tsx): `app/page.tsx`
- [About route](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/about/page.tsx): `app/about/page.tsx`
- [Résumé route](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/resume/page.tsx): `app/resume/page.tsx`
- [Lab route](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/lab/page.tsx): `app/lab/page.tsx`
- [Navigation](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/navigation/Nav.tsx): `components/navigation/Nav.tsx`
- [Page shell](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/layout/Shell.tsx): `components/layout/Shell.tsx`
- [Site content](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/site.ts): `lib/data/site.ts`

### Portfolio content

- [Work view](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/WorkView.tsx): `components/portfolio/WorkView.tsx`
- [About view](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/about/AboutView.tsx): `components/about/AboutView.tsx`
- [Lab view](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/lab/LabView.tsx): `components/lab/LabView.tsx`
- [Experience](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/Experience.tsx): `components/portfolio/Experience.tsx`
- [Project card](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/ProjectCard.tsx): `components/portfolio/ProjectCard.tsx`
- [Project viewer](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/portfolio/ProjectViewer.tsx): `components/portfolio/ProjectViewer.tsx`
- [Project data](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/projects.ts): `lib/data/projects.ts`
- [About data](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/about.ts): `lib/data/about.ts`
- [Lab data](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/lab.ts): `lib/data/lab.ts`

### Portfolio assistant

- [UI state](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/providers/UIProvider.tsx): `components/providers/UIProvider.tsx`
- [Selection action](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/selection/SelectionAction.tsx): `components/selection/SelectionAction.tsx`
- [Assistant panel](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/LLMPanel.tsx): `components/llm/LLMPanel.tsx`
- [Question composer](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/Composer.tsx): `components/llm/Composer.tsx`
- [Follow-up suggestions](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/components/llm/Suggestions.tsx): `components/llm/Suggestions.tsx`
- [Assistant knowledge](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/data/knowledge.ts): `lib/data/knowledge.ts`
- [Assistant API](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/app/api/llm/route.ts): `app/api/llm/route.ts`
- [Portfolio context](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/llm/context.ts): `lib/llm/context.ts`
- [Gemini client](https://github.com/shivam5551/gaurav-kumar-portfolio/blob/main/lib/llm/gemini.ts): `lib/llm/gemini.ts`

### Other components

- **Visitor**
- **Google Gemini**

## Connections

- Visitor → Navigation: uses navigation
- Visitor → Home route: opens site
- Navigation → UI state: opens assistant
- Navigation → Site content: reads navigation content
- Home route → Work view: renders work
- About route → About view: renders about
- Résumé route → Experience: renders résumé
- Lab route → Lab view: renders lab
- Work view → Project data: reads projects
- Work view → Project card: renders projects
- Project card → Project viewer: opens details
- Project viewer → Project data: reads project details
- About view → About data: reads about content
- About view → Project viewer: opens selected project
- Lab view → Lab data: reads lab content
- Experience → Site content: reads experience
- Selection action → UI state: opens with selection
- UI state → Assistant API: posts question
- Assistant panel → UI state: reads and updates state
- Assistant panel → Question composer: renders composer
- Assistant panel → Follow-up suggestions: renders follow-ups
- Assistant API → Portfolio context: uses system context
- Assistant API → Gemini client: requests generation
- Assistant API → Google Gemini: generates response
- Assistant API → Assistant knowledge: not established
- Gemini client → Google Gemini: connects to model
