# syedaaiman-123/aimverse architecture

> Architecture diagram of the GitHub repository syedaaiman-123/aimverse, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syedaaiman-123/aimverse
- Repository: https://github.com/syedaaiman-123/aimverse

## Overview

AIMVERSE is a 3D interactive portfolio with an always-available Classic view, project details, contact, promo media and a grounded AI assistant. Visitors enter the portfolio and explore its world or use Classic; the separate NEDVERSE mode offers campus exploration and optional quests. The graph preserves these distinct experiences and the server-side assistant/contact capabilities. Some subsystem links are documented in the README; unsampled implementation details and uncertain calls are omitted or shown as unverified.

Main entry points: [`frontend/src/App.tsx`](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/App.tsx) (Portfolio entry), [`frontend/src/Scene.tsx`](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Scene.tsx) (3D portfolio scene), [`frontend/src/nedverse/PlayScene.tsx`](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/PlayScene.tsx) (Campus exploration), [`frontend/src/data.ts`](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/data.ts) (Portfolio content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio experience"]
  node_app["Portfolio entry<br/>[App.tsx]"]
  node_classic["Classic view<br/>[Classic.tsx]"]
  node_cases["Project case files<br/>[CaseSheet.tsx]"]
  node_portfolio_data["Portfolio content<br/>[data.ts]"]
end

subgraph group_world["3D portfolio world"]
  node_scene["3D portfolio scene<br/>[Scene.tsx]"]
  node_islands["Project islands<br/>[Islands.tsx]"]
  node_extras["Skills and journey<br/>[Extras.tsx]"]
  node_world_state["World interaction state<br/>[state.ts]"]
end

subgraph group_quest["NEDVERSE quest"]
  node_quest_entry["Quest entry<br/>[QuestEntry.tsx]"]
  node_quest_main["Quest app entry<br/>[main.tsx]"]
  node_play_scene["Campus exploration<br/>[PlayScene.tsx]"]
  node_player["Player movement<br/>[Player.tsx]"]
  node_collision["Movement collision<br/>[collision.ts]"]
  node_input["Movement input<br/>[input.ts]"]
  node_interiors["Campus interiors<br/>[interiors.ts]"]
  node_quests["Quest progress<br/>[quests.ts]"]
end

subgraph group_services["Assistant and contact"]
  node_chat_ui["AI chat interface<br/>[Chat.tsx]"]
  node_chat_api["Chat API<br/>[chat.ts]"]
  node_rag_engine["Grounded retrieval<br/>[engine.ts]"]
  node_ingestion["Document ingestion<br/>[ingest.ts]"]
  node_contact_ui["Contact form<br/>[Contact.tsx]"]
  node_contact_api["Contact delivery API<br/>[contact.ts]"]
  node_validation["Contact validation<br/>[validate.ts]"]
end

subgraph group_media["Media production"]
  node_promo["Promo video<br/>[PromoVideo.tsx]"]
  node_promo_build["Promo production<br/>[build_promo.jsx]"]
end

node_visitor(("Visitor"))
node_resend["Resend email service"]

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_scene
node_app -->|"offers view"| node_classic
node_app -->|"opens"| node_cases
node_classic -->|"opens"| node_cases
node_app -->|"reads"| node_portfolio_data
node_islands -->|"reads"| node_portfolio_data
node_extras -->|"reads"| node_portfolio_data
node_scene -->|"renders"| node_islands
node_scene -->|"renders"| node_extras
node_scene -->|"reads state"| node_world_state
node_visitor -->|"opens"| node_quest_entry
node_quest_entry -->|"reads progress"| node_quests
node_quest_main -->|"renders"| node_play_scene
node_play_scene -->|"uses"| node_player
node_player -->|"reads controls"| node_input
node_player -->|"resolves movement"| node_collision
node_play_scene -->|"uses"| node_interiors
node_play_scene -->|"uses"| node_quests
node_app -->|"opens"| node_chat_ui
node_chat_ui -.->|"sends questions"| node_chat_api
node_chat_api -->|"calls"| node_rag_engine
node_rag_engine -.->|"uses Gemini"| node_resend
node_ingestion -->|"reads content"| node_portfolio_data
node_app -->|"opens"| node_contact_ui
node_contact_ui -.->|"submits message"| node_contact_api
node_contact_api -->|"validates"| node_validation
node_contact_api -.->|"sends email"| node_resend
node_app -->|"opens"| node_promo
node_promo_build -.->|"produces video"| node_promo

click node_app "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/App.tsx"
click node_classic "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Classic.tsx"
click node_cases "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/CaseSheet.tsx"
click node_portfolio_data "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/data.ts"
click node_scene "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Scene.tsx"
click node_islands "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/Islands.tsx"
click node_extras "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/Extras.tsx"
click node_world_state "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/state.ts"
click node_quest_entry "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/QuestEntry.tsx"
click node_quest_main "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/main.tsx"
click node_play_scene "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/PlayScene.tsx"
click node_player "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/Player.tsx"
click node_collision "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/collision.ts"
click node_input "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/input.ts"
click node_interiors "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/interiors.ts"
click node_quests "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/quests.ts"
click node_chat_ui "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Chat.tsx"
click node_chat_api "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/chat.ts"
click node_rag_engine "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/_rag/engine.ts"
click node_ingestion "https://github.com/syedaaiman-123/aimverse/blob/main/rag-system/ingest.ts"
click node_contact_ui "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Contact.tsx"
click node_contact_api "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/contact.ts"
click node_validation "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/_lib/validate.ts"
click node_promo "https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/PromoVideo.tsx"
click node_promo_build "https://github.com/syedaaiman-123/aimverse/blob/main/after-effects/scripts/build_promo.jsx"

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_classic,node_cases,node_portfolio_data toneBlue
class node_scene,node_islands,node_extras,node_world_state toneAmber
class node_quest_entry,node_quest_main,node_play_scene,node_player,node_collision,node_input,node_interiors,node_quests toneMint
class node_chat_ui,node_chat_api,node_rag_engine,node_ingestion,node_contact_ui,node_contact_api,node_validation toneRose
class node_promo,node_promo_build,node_visitor,node_resend toneIndigo
```

## Components

### Portfolio experience

- [Portfolio entry](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Classic view](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Classic.tsx): `frontend/src/Classic.tsx`
- [Project case files](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/CaseSheet.tsx): `frontend/src/CaseSheet.tsx`
- [Portfolio content](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/data.ts): `frontend/src/data.ts`

### 3D portfolio world

- [3D portfolio scene](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Scene.tsx): `frontend/src/Scene.tsx`
- [Project islands](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/Islands.tsx): `frontend/src/world/Islands.tsx`
- [Skills and journey](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/Extras.tsx): `frontend/src/world/Extras.tsx`
- [World interaction state](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/world/state.ts): `frontend/src/world/state.ts`

### NEDVERSE quest

- [Quest entry](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/QuestEntry.tsx): `frontend/src/QuestEntry.tsx`
- [Quest app entry](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/main.tsx): `frontend/src/nedverse/main.tsx`
- [Campus exploration](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/PlayScene.tsx): `frontend/src/nedverse/PlayScene.tsx`
- [Player movement](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/Player.tsx): `frontend/src/nedverse/Player.tsx`
- [Movement collision](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/collision.ts): `frontend/src/nedverse/collision.ts`
- [Movement input](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/input.ts): `frontend/src/nedverse/input.ts`
- [Campus interiors](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/interiors.ts): `frontend/src/nedverse/interiors.ts`
- [Quest progress](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/nedverse/quests.ts): `frontend/src/nedverse/quests.ts`

### Assistant and contact

- [AI chat interface](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Chat.tsx): `frontend/src/Chat.tsx`
- [Chat API](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/chat.ts): `frontend/api/chat.ts`
- [Grounded retrieval](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/_rag/engine.ts): `frontend/api/_rag/engine.ts`
- [Document ingestion](https://github.com/syedaaiman-123/aimverse/blob/main/rag-system/ingest.ts): `rag-system/ingest.ts`
- [Contact form](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/Contact.tsx): `frontend/src/Contact.tsx`
- [Contact delivery API](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/contact.ts): `frontend/api/contact.ts`
- [Contact validation](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/api/_lib/validate.ts): `frontend/api/_lib/validate.ts`

### Media production

- [Promo video](https://github.com/syedaaiman-123/aimverse/blob/main/frontend/src/PromoVideo.tsx): `frontend/src/PromoVideo.tsx`
- [Promo production](https://github.com/syedaaiman-123/aimverse/blob/main/after-effects/scripts/build_promo.jsx): `after-effects/scripts/build_promo.jsx`

### Other components

- **Visitor**
- **Resend email service**

## Connections

- Visitor → Portfolio entry: opens
- Portfolio entry → 3D portfolio scene: renders (evidence: `frontend/src/App.tsx`)
- Portfolio entry → Classic view: offers view (evidence: `frontend/src/App.tsx`)
- Portfolio entry → Project case files: opens (evidence: `frontend/src/App.tsx`)
- Classic view → Project case files: opens (evidence: `frontend/src/Classic.tsx`)
- Portfolio entry → Portfolio content: reads (evidence: `frontend/src/App.tsx`)
- Project islands → Portfolio content: reads (evidence: `frontend/src/world/Islands.tsx`)
- Skills and journey → Portfolio content: reads (evidence: `frontend/src/world/Extras.tsx`)
- 3D portfolio scene → Project islands: renders (evidence: `frontend/src/Scene.tsx`)
- 3D portfolio scene → Skills and journey: renders (evidence: `frontend/src/Scene.tsx`)
- 3D portfolio scene → World interaction state: reads state (evidence: `frontend/src/Scene.tsx`)
- Visitor → Quest entry: opens
- Quest entry → Quest progress: reads progress (evidence: `frontend/src/QuestEntry.tsx`)
- Quest app entry → Campus exploration: renders (evidence: `frontend/src/nedverse/main.tsx`)
- Campus exploration → Player movement: uses (evidence: `frontend/src/nedverse/PlayScene.tsx`)
- Player movement → Movement input: reads controls (evidence: `frontend/src/nedverse/Player.tsx`)
- Player movement → Movement collision: resolves movement (evidence: `frontend/src/nedverse/Player.tsx`)
- Campus exploration → Campus interiors: uses (evidence: `frontend/src/nedverse/PlayScene.tsx`)
- Campus exploration → Quest progress: uses (evidence: `frontend/src/nedverse/PlayScene.tsx`)
- Portfolio entry → AI chat interface: opens (evidence: `frontend/src/App.tsx`)
- AI chat interface → Chat API: sends questions
- Chat API → Grounded retrieval: calls (evidence: `frontend/api/chat.ts`)
- Grounded retrieval → Resend email service: uses Gemini
- Document ingestion → Portfolio content: reads content (evidence: `rag-system/ingest.ts`)
- Portfolio entry → Contact form: opens (evidence: `frontend/src/App.tsx`)
- Contact form → Contact delivery API: submits message
- Contact delivery API → Contact validation: validates (evidence: `frontend/api/contact.ts`)
- Contact delivery API → Resend email service: sends email
- Portfolio entry → Promo video: opens (evidence: `frontend/src/App.tsx`)
- Promo production → Promo video: produces video
