# suriya1230/suriya-3d-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/suriya1230/suriya-3d-portfolio
- Repository: https://github.com/suriya1230/suriya-3d-portfolio

## Overview

Suriya AI Animated Portfolio is a visitor-facing portfolio with manual and 3D agentic experiences, visitor logging, feedback, and an admin CMS with analytics. The main journey begins at the home page, captures or reuses visitor details, records visits, then selects a portfolio experience. Admins authenticate separately before using content-management and analytics screens. Source excerpts show the active app using Firebase Realtime Database; the README also documents Firestore, so that documented data capability is represented separately. Some unsampled subsystem links are omitted where their wiring is not evidenced.

Main entry points: [`components/portfolio/ManualPortfolio.js`](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ManualPortfolio.js) (Manual portfolio), [`app/page.js`](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/page.js) (Entry flow), [`lib/rtdb.js`](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/rtdb.js) (Realtime DB helpers), [`app/admin-dashboard/page.js`](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/admin-dashboard/page.js) (Admin dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Visitor entry"]
  node_home["Entry flow<br/>[page.js]"]
  node_visit_popup["Visit form<br/>[VisitPopup.js]"]
  node_mode_selector["Mode selector<br/>[ModeSelector.js]"]
  node_feedback["Feedback widget<br/>[FeedbackWidget.js]"]
end

subgraph group_portfolio["Portfolio experiences"]
  node_manual["Manual portfolio<br/>[ManualPortfolio.js]"]
  node_navbar["Portfolio navigation<br/>[Navbar.js]"]
  node_hero["Hero section<br/>[HeroSection.js]"]
  node_about["About section<br/>[AboutSection.js]"]
  node_education["Education section"]
  node_projects["Projects section<br/>[ProjectsSection.js]"]
  node_certificates["Certificates section"]
  node_skills["Skills section<br/>[SkillsSection.js]"]
  node_achievements["Achievements section"]
  node_contact["Contact section<br/>[ContactSection.js]"]
  node_agentic_page["Agentic route<br/>[page.js]"]
  node_scene["3D scene<br/>[AgenticScene.js]"]
  node_hud["Scene HUD<br/>[AgentHUD.js]"]
  node_voice["Voice narration<br/>[useVoice.js]"]
end

subgraph group_admin["Admin tools"]
  node_login["Admin login<br/>[page.js]"]
  node_auth["Admin auth<br/>[auth.js]"]
  node_dashboard["Admin dashboard<br/>[page.js]"]
  node_crud["Content editor<br/>[CRUDPanel.js]"]
  node_analytics["Visit analytics"]
  node_sidebar["Admin navigation<br/>[AdminSidebar.js]"]
end

subgraph group_data["Firebase data"]
  node_rtdb_helpers["Realtime DB helpers<br/>[rtdb.js]"]
  node_realtime_db[("Realtime Database")]
  node_firestore_hook["Firestore data hook"]
  node_firestore[("Firestore")]
  node_firebase["Firebase setup<br/>[firebase.js]"]
end

node_visitor(("Visitor"))
node_admin_actor(("Administrator"))

node_visitor -->|"opens"| node_home
node_home -->|"shows"| node_visit_popup
node_visit_popup -->|"submits details"| node_home
node_home -->|"shows"| node_mode_selector
node_home -->|"logs visits"| node_rtdb_helpers
node_home -->|"renders manual mode"| node_manual
node_home -->|"routes agentic mode"| node_agentic_page
node_mode_selector -->|"selects mode"| node_home
node_home -->|"renders feedback"| node_feedback
node_manual -->|"renders"| node_navbar
node_manual -->|"renders"| node_hero
node_manual -->|"renders"| node_about
node_manual -->|"renders"| node_education
node_manual -->|"renders"| node_projects
node_manual -->|"renders"| node_certificates
node_manual -->|"renders"| node_skills
node_manual -->|"renders"| node_achievements
node_manual -->|"renders"| node_contact
node_manual -->|"fetches portfolio data"| node_rtdb_helpers
node_agentic_page -->|"loads scene"| node_scene
node_scene -->|"fetches section data"| node_rtdb_helpers
node_scene -->|"renders"| node_hud
node_scene -->|"uses narration"| node_voice
node_feedback -->|"reads and writes reviews"| node_rtdb_helpers
node_admin_actor -->|"opens"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"uses auth setup"| node_firebase
node_admin_actor -->|"opens"| node_dashboard
node_dashboard -->|"checks session"| node_auth
node_dashboard -->|"renders"| node_sidebar
node_dashboard -->|"renders"| node_crud
node_dashboard -->|"renders"| node_analytics
node_crud -->|"manages records"| node_rtdb_helpers
node_analytics -->|"reads visit data"| node_rtdb_helpers
node_rtdb_helpers -->|"uses database setup"| node_firebase
node_rtdb_helpers -->|"reads and writes"| node_realtime_db
node_firestore_hook -->|"fetches collections"| node_firestore
node_firestore_hook -->|"uses Firestore helpers"| node_firebase

click node_home "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/page.js"
click node_visit_popup "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/VisitPopup.js"
click node_mode_selector "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/ModeSelector.js"
click node_feedback "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/FeedbackWidget.js"
click node_manual "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ManualPortfolio.js"
click node_navbar "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/Navbar.js"
click node_hero "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/HeroSection.js"
click node_about "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/AboutSection.js"
click node_education "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/EducationSection.js"
click node_projects "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ProjectsSection.js"
click node_certificates "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/CertificatesSection.js"
click node_skills "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/SkillsSection.js"
click node_achievements "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/AchievementsSection.js"
click node_contact "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ContactSection.js"
click node_agentic_page "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/agentic/page.js"
click node_scene "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/agentic/AgenticScene.js"
click node_hud "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/agentic/AgentHUD.js"
click node_voice "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/hooks/useVoice.js"
click node_login "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/admin-login/page.js"
click node_auth "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/auth.js"
click node_dashboard "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/admin-dashboard/page.js"
click node_crud "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/CRUDPanel.js"
click node_analytics "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/AnalyticsDashboard.js"
click node_sidebar "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/AdminSidebar.js"
click node_rtdb_helpers "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/rtdb.js"
click node_firestore_hook "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/hooks/usePortfolioData.js"
click node_firebase "https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/firebase.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_home,node_visit_popup,node_mode_selector,node_feedback toneBlue
class node_manual,node_navbar,node_hero,node_about,node_education,node_projects,node_certificates,node_skills,node_achievements,node_contact,node_agentic_page,node_scene,node_hud,node_voice toneAmber
class node_login,node_auth,node_dashboard,node_crud,node_analytics,node_sidebar toneMint
class node_rtdb_helpers,node_realtime_db,node_firestore_hook,node_firestore,node_firebase toneRose
class node_visitor,node_admin_actor toneIndigo
```

## Components

### Visitor entry

- [Entry flow](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/page.js): `app/page.js`
- [Visit form](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/VisitPopup.js): `components/ui/VisitPopup.js`
- [Mode selector](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/ModeSelector.js): `components/ui/ModeSelector.js`
- [Feedback widget](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/ui/FeedbackWidget.js): `components/ui/FeedbackWidget.js`

### Portfolio experiences

- [Manual portfolio](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ManualPortfolio.js): `components/portfolio/ManualPortfolio.js`
- [Portfolio navigation](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/Navbar.js): `components/portfolio/Navbar.js`
- [Hero section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/HeroSection.js): `components/portfolio/HeroSection.js`
- [About section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/AboutSection.js): `components/portfolio/AboutSection.js`
- [Education section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/EducationSection.js): `components/portfolio/EducationSection.js`
- [Projects section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ProjectsSection.js): `components/portfolio/ProjectsSection.js`
- [Certificates section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/CertificatesSection.js): `components/portfolio/CertificatesSection.js`
- [Skills section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/SkillsSection.js): `components/portfolio/SkillsSection.js`
- [Achievements section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/AchievementsSection.js): `components/portfolio/AchievementsSection.js`
- [Contact section](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/portfolio/ContactSection.js): `components/portfolio/ContactSection.js`
- [Agentic route](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/agentic/page.js): `app/agentic/page.js`
- [3D scene](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/agentic/AgenticScene.js): `components/agentic/AgenticScene.js`
- [Scene HUD](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/agentic/AgentHUD.js): `components/agentic/AgentHUD.js`
- [Voice narration](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/hooks/useVoice.js): `hooks/useVoice.js`

### Admin tools

- [Admin login](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/admin-login/page.js): `app/admin-login/page.js`
- [Admin auth](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/auth.js): `lib/auth.js`
- [Admin dashboard](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/app/admin-dashboard/page.js): `app/admin-dashboard/page.js`
- [Content editor](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/CRUDPanel.js): `components/admin/CRUDPanel.js`
- [Visit analytics](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/AnalyticsDashboard.js): `components/admin/AnalyticsDashboard.js`
- [Admin navigation](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/components/admin/AdminSidebar.js): `components/admin/AdminSidebar.js`

### Firebase data

- [Realtime DB helpers](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/rtdb.js): `lib/rtdb.js`
- **Realtime Database**
- [Firestore data hook](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/hooks/usePortfolioData.js): `hooks/usePortfolioData.js`
- **Firestore**
- [Firebase setup](https://github.com/suriya1230/suriya-3d-portfolio/blob/main/lib/firebase.js): `lib/firebase.js`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Entry flow: opens (evidence: `README.md`)
- Entry flow → Visit form: shows (evidence: `app/page.js`)
- Visit form → Entry flow: submits details (evidence: `app/page.js`)
- Entry flow → Mode selector: shows (evidence: `app/page.js`)
- Entry flow → Realtime DB helpers: logs visits (evidence: `app/page.js`)
- Entry flow → Manual portfolio: renders manual mode (evidence: `app/page.js`)
- Entry flow → Agentic route: routes agentic mode (evidence: `app/page.js`)
- Mode selector → Entry flow: selects mode (evidence: `app/page.js`)
- Entry flow → Feedback widget: renders feedback (evidence: `app/page.js`)
- Manual portfolio → Portfolio navigation: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Hero section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → About section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Education section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Projects section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Certificates section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Skills section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Achievements section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Contact section: renders (evidence: `components/portfolio/ManualPortfolio.js`)
- Manual portfolio → Realtime DB helpers: fetches portfolio data (evidence: `components/portfolio/ManualPortfolio.js`)
- Agentic route → 3D scene: loads scene (evidence: `app/agentic/page.js`)
- 3D scene → Realtime DB helpers: fetches section data (evidence: `components/agentic/AgenticScene.js`)
- 3D scene → Scene HUD: renders (evidence: `components/agentic/AgenticScene.js`)
- 3D scene → Voice narration: uses narration (evidence: `components/agentic/AgenticScene.js`)
- Feedback widget → Realtime DB helpers: reads and writes reviews (evidence: `components/ui/FeedbackWidget.js`)
- Administrator → Admin login: opens (evidence: `README.md`)
- Admin login → Admin auth: authenticates (evidence: `app/admin-login/page.js`)
- Admin auth → Firebase setup: uses auth setup (evidence: `lib/auth.js`)
- Administrator → Admin dashboard: opens (evidence: `README.md`)
- Admin dashboard → Admin auth: checks session (evidence: `app/admin-dashboard/page.js`)
- Admin dashboard → Admin navigation: renders (evidence: `app/admin-dashboard/page.js`)
- Admin dashboard → Content editor: renders (evidence: `app/admin-dashboard/page.js`)
- Admin dashboard → Visit analytics: renders (evidence: `app/admin-dashboard/page.js`)
- Content editor → Realtime DB helpers: manages records (evidence: `components/admin/CRUDPanel.js`)
- Visit analytics → Realtime DB helpers: reads visit data (evidence: `components/admin/AnalyticsDashboard.js`)
- Realtime DB helpers → Firebase setup: uses database setup (evidence: `lib/rtdb.js`)
- Realtime DB helpers → Realtime Database: reads and writes (evidence: `lib/rtdb.js`)
- Firestore data hook → Firestore: fetches collections (evidence: `hooks/usePortfolioData.js`)
- Firestore data hook → Firebase setup: uses Firestore helpers
