# kamalesh-suresh-kumar/portfolio-kai-hq architecture

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

- Interactive diagram: https://gitdiagram.com/kamalesh-suresh-kumar/portfolio-kai-hq
- Repository: https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq

## Overview

This is a React portfolio presented as an interactive headquarters: visitors explore rooms containing projects, skills, achievements, experience, resumes and contact options, with an assistant and global search as discovery tools. The experience layer tracks visitor mode and room routes; a client-side knowledge engine supplies typed portfolio content and search. The README describes an earlier sample portfolio as retired, while the supplied tree shows the newer headquarters implementation. Room-to-shell wiring and several room internals were not sampled, so those connections are omitted rather than inferred.

Main entry points: [`src/knowledge-engine/KnowledgeEngine.ts`](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/knowledge-engine/KnowledgeEngine.ts) (Knowledge Queries), [`src/components/assistant/Assistant.tsx`](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/components/assistant/Assistant.tsx) (KAI Assistant), [`src/app/HeadquartersShell.tsx`](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/app/HeadquartersShell.tsx) (Headquarters Shell), [`src/App.tsx`](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/App.tsx) (App Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Experience Shell"]
  node_app["App Entry<br/>[App.tsx]"]
  node_headquarters["Headquarters Shell"]
  node_layout["Application Layout<br/>[Layout.tsx]"]
  node_experience_provider["Experience State"]
  node_route_helper["Route Helpers<br/>[routeHelper.ts]"]
end

subgraph group_discovery["Visitor Discovery"]
  node_assistant_ui["KAI Assistant<br/>[Assistant.tsx]"]
  node_intent_router["Intent Router<br/>[intentRouter.ts]"]
  node_response_templates["Response Generation"]
  node_speech_adapter["Speech Adapter<br/>[speechAdapter.ts]"]
  node_global_search["Global Search<br/>[GlobalSearch.tsx]"]
end

subgraph group_portfolio["Portfolio Rooms"]
  node_mission_control["Mission Control<br/>[MissionControl.tsx]"]
  node_lobby["Lobby<br/>[Lobby.tsx]"]
  node_engineering_lab["Engineering Laboratory"]
  node_skill_processor["Skill Processor<br/>[SkillProcessor.tsx]"]
  node_achievement_hall["Achievement Hall"]
  node_memory_archive["Memory Archive<br/>[MemoryArchive.tsx]"]
  node_document_vault["Document Vault<br/>[DocumentVault.tsx]"]
  node_communication_center["Communication Center"]
  node_transmission_form["Transmission Form"]
end

subgraph group_knowledge["Knowledge Content"]
  node_knowledge_engine["Knowledge Queries<br/>[KnowledgeEngine.ts]"]
  node_knowledge_data["Portfolio Datasets"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_headquarters
node_headquarters -->|"renders"| node_layout
node_headquarters -->|"uses exports"| node_experience_provider
node_layout -->|"renders"| node_assistant_ui
node_experience_provider -->|"parses routes"| node_route_helper
node_assistant_ui -->|"routes intent"| node_intent_router
node_assistant_ui -->|"generates replies"| node_response_templates
node_assistant_ui -->|"uses speech"| node_speech_adapter
node_global_search -->|"searches"| node_knowledge_engine
node_engineering_lab -->|"loads projects"| node_knowledge_engine
node_achievement_hall -->|"loads achievements"| node_knowledge_engine
node_document_vault -->|"loads resumes"| node_knowledge_engine
node_knowledge_engine -->|"queries datasets"| node_knowledge_data
node_transmission_form -.->|"accepts message"| node_visitor

click node_app "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/App.tsx"
click node_headquarters "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/app/HeadquartersShell.tsx"
click node_layout "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/components/layout/Layout.tsx"
click node_experience_provider "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/experience-engine/ExperienceEngineProvider.tsx"
click node_route_helper "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/experience-engine/routeHelper.ts"
click node_assistant_ui "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/components/assistant/Assistant.tsx"
click node_intent_router "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/intentRouter.ts"
click node_response_templates "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/responseTemplates.ts"
click node_speech_adapter "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/speechAdapter.ts"
click node_global_search "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MissionControl/GlobalSearch.tsx"
click node_mission_control "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MissionControl/MissionControl.tsx"
click node_lobby "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/Lobby/Lobby.tsx"
click node_engineering_lab "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/EngineeringLaboratory/EngineeringLaboratory.tsx"
click node_skill_processor "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/SkillProcessor/SkillProcessor.tsx"
click node_achievement_hall "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/AchievementHall/AchievementHall.tsx"
click node_memory_archive "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MemoryArchive/MemoryArchive.tsx"
click node_document_vault "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/DocumentVault/DocumentVault.tsx"
click node_communication_center "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/CommunicationCenter/CommunicationCenter.tsx"
click node_transmission_form "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/CommunicationCenter/TransmissionForm.tsx"
click node_knowledge_engine "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/knowledge-engine/KnowledgeEngine.ts"
click node_knowledge_data "https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/tree/main/src/knowledge-engine/data"

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_app,node_headquarters,node_layout,node_experience_provider,node_route_helper toneBlue
class node_assistant_ui,node_intent_router,node_response_templates,node_speech_adapter,node_global_search toneAmber
class node_mission_control,node_lobby,node_engineering_lab,node_skill_processor,node_achievement_hall,node_memory_archive,node_document_vault,node_communication_center,node_transmission_form toneMint
class node_knowledge_engine,node_knowledge_data toneRose
class node_visitor toneIndigo
```

## Components

### Experience Shell

- [App Entry](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/App.tsx): `src/App.tsx`
- [Headquarters Shell](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/app/HeadquartersShell.tsx): `src/app/HeadquartersShell.tsx`
- [Application Layout](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`
- [Experience State](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/experience-engine/ExperienceEngineProvider.tsx): `src/experience-engine/ExperienceEngineProvider.tsx`
- [Route Helpers](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/experience-engine/routeHelper.ts): `src/experience-engine/routeHelper.ts`

### Visitor Discovery

- [KAI Assistant](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/components/assistant/Assistant.tsx): `src/components/assistant/Assistant.tsx`
- [Intent Router](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/intentRouter.ts): `src/assistant/intentRouter.ts`
- [Response Generation](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/responseTemplates.ts): `src/assistant/responseTemplates.ts`
- [Speech Adapter](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/assistant/speechAdapter.ts): `src/assistant/speechAdapter.ts`
- [Global Search](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MissionControl/GlobalSearch.tsx): `src/rooms/MissionControl/GlobalSearch.tsx`

### Portfolio Rooms

- [Mission Control](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MissionControl/MissionControl.tsx): `src/rooms/MissionControl/MissionControl.tsx`
- [Lobby](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/Lobby/Lobby.tsx): `src/rooms/Lobby/Lobby.tsx`
- [Engineering Laboratory](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/EngineeringLaboratory/EngineeringLaboratory.tsx): `src/rooms/EngineeringLaboratory/EngineeringLaboratory.tsx`
- [Skill Processor](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/SkillProcessor/SkillProcessor.tsx): `src/rooms/SkillProcessor/SkillProcessor.tsx`
- [Achievement Hall](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/AchievementHall/AchievementHall.tsx): `src/rooms/AchievementHall/AchievementHall.tsx`
- [Memory Archive](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/MemoryArchive/MemoryArchive.tsx): `src/rooms/MemoryArchive/MemoryArchive.tsx`
- [Document Vault](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/DocumentVault/DocumentVault.tsx): `src/rooms/DocumentVault/DocumentVault.tsx`
- [Communication Center](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/CommunicationCenter/CommunicationCenter.tsx): `src/rooms/CommunicationCenter/CommunicationCenter.tsx`
- [Transmission Form](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/rooms/CommunicationCenter/TransmissionForm.tsx): `src/rooms/CommunicationCenter/TransmissionForm.tsx`

### Knowledge Content

- [Knowledge Queries](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/blob/main/src/knowledge-engine/KnowledgeEngine.ts): `src/knowledge-engine/KnowledgeEngine.ts`
- [Portfolio Datasets](https://github.com/kamalesh-suresh-kumar/portfolio-kai-hq/tree/main/src/knowledge-engine/data): `src/knowledge-engine/data`

### Other components

- **Visitor**

## Connections

- Visitor → App Entry: opens
- App Entry → Headquarters Shell: renders (evidence: `src/App.tsx`)
- Headquarters Shell → Application Layout: renders (evidence: `src/app/HeadquartersShell.tsx`)
- Headquarters Shell → Experience State: uses exports (evidence: `src/app/HeadquartersShell.tsx`)
- Application Layout → KAI Assistant: renders (evidence: `src/components/layout/Layout.tsx`)
- Experience State → Route Helpers: parses routes (evidence: `src/experience-engine/ExperienceEngineProvider.tsx`)
- KAI Assistant → Intent Router: routes intent (evidence: `src/components/assistant/Assistant.tsx`)
- KAI Assistant → Response Generation: generates replies (evidence: `src/components/assistant/Assistant.tsx`)
- KAI Assistant → Speech Adapter: uses speech (evidence: `src/components/assistant/Assistant.tsx`)
- Global Search → Knowledge Queries: searches (evidence: `src/rooms/MissionControl/GlobalSearch.tsx`)
- Engineering Laboratory → Knowledge Queries: loads projects (evidence: `src/rooms/EngineeringLaboratory/EngineeringLaboratory.tsx`)
- Achievement Hall → Knowledge Queries: loads achievements (evidence: `src/rooms/AchievementHall/AchievementHall.tsx`)
- Document Vault → Knowledge Queries: loads resumes (evidence: `src/rooms/DocumentVault/DocumentVault.tsx`)
- Knowledge Queries → Portfolio Datasets: queries datasets (evidence: `src/knowledge-engine/KnowledgeEngine.ts`)
- Transmission Form → Visitor: accepts message
