# k-vignesh07/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/k-vignesh07/portfolio
- Repository: https://github.com/k-vignesh07/portfolio

## Overview

This is a data-driven personal portfolio with a public browsing and contact workflow, plus a protected administration workflow for editing portfolio content and reviewing messages. The app routes visitors to portfolio views, which consume shared data loaded from Firestore with local seed defaults; contact submissions are stored separately. Administrators authenticate, edit sections or use an AI assistant, and changes sync through the shared data layer. The graph also preserves the public AI chatbot and image/PDF upload capability. Edges reflect shown imports, calls, or documented behavior; unsampled modules are represented only where the source index supports their role.

Main entry points: [`app/src/components/admin/AdminPanel.jsx`](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/AdminPanel.jsx) (Admin Panel), [`app/src/context/DataContext.jsx`](https://github.com/k-vignesh07/portfolio/blob/main/app/src/context/DataContext.jsx) (Portfolio Data Context), [`app/src/App.jsx`](https://github.com/k-vignesh07/portfolio/blob/main/app/src/App.jsx) (App Router), [`app/src/services/firestoreService.js`](https://github.com/k-vignesh07/portfolio/blob/main/app/src/services/firestoreService.js) (Firestore Operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public Portfolio"]
  node_app["App Router<br/>[App.jsx]"]
  node_portfolio["Portfolio Sections"]
  node_chatbot["Portfolio Chatbot<br/>[AIChatbot.jsx]"]
  node_contact["Contact Form<br/>[Contact.jsx]"]
end

subgraph group_admin["Administration"]
  node_adminpanel["Admin Panel<br/>[AdminPanel.jsx]"]
  node_auth["Firebase Auth Hook<br/>[useFirebaseAuth.js]"]
  node_editors["Section Editors"]
  node_adminchat["AI Admin Chat<br/>[AIAdminChat.jsx]"]
  node_messages["Message Manager"]
  node_uploader["Image Uploader<br/>[ImageUploader.jsx]"]
end

subgraph group_data["Data and Services"]
  node_datactx["Portfolio Data Context<br/>[DataContext.jsx]"]
  node_defaults["Seed Portfolio Data<br/>[portfolioData.js]"]
  node_firestore["Firestore Operations"]
  node_storage["File Encoding Service<br/>[storageService.js]"]
  node_firebaseconfig["Firebase Configuration<br/>[firebase.js]"]
end

subgraph group_integrations["External Integrations"]
  node_firebase[("Firebase")]
  node_gemini["Gemini API"]
end

node_visitor(("Visitor"))
node_administrator(("Administrator"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_portfolio
node_app -->|"renders"| node_contact
node_app -->|"renders"| node_chatbot
node_app -->|"routes to"| node_adminpanel
node_portfolio -->|"reads"| node_datactx
node_contact -->|"saves message"| node_firestore
node_chatbot -->|"reads"| node_datactx
node_chatbot -->|"queries"| node_gemini
node_administrator -->|"opens"| node_adminpanel
node_adminpanel -->|"uses"| node_auth
node_adminpanel -->|"selects"| node_editors
node_adminpanel -->|"selects"| node_adminchat
node_adminpanel -->|"selects"| node_messages
node_editors -->|"updates"| node_datactx
node_editors -->|"uses"| node_uploader
node_uploader -->|"uploads via"| node_storage
node_adminchat -->|"updates"| node_datactx
node_adminchat -->|"uploads via"| node_storage
node_adminchat -->|"queries"| node_gemini
node_messages -->|"manages messages"| node_firestore
node_datactx -->|"loads defaults"| node_defaults
node_datactx -->|"loads and saves"| node_firestore
node_firestore -->|"uses database config"| node_firebaseconfig
node_firestore -->|"reads and writes"| node_firebase
node_auth -->|"uses auth config"| node_firebaseconfig
node_auth -->|"authenticates"| node_firebase

click node_app "https://github.com/k-vignesh07/portfolio/blob/main/app/src/App.jsx"
click node_portfolio "https://github.com/k-vignesh07/portfolio/tree/main/app/src/components/sections"
click node_chatbot "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/chatbot/AIChatbot.jsx"
click node_contact "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/sections/Contact.jsx"
click node_adminpanel "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/AdminPanel.jsx"
click node_auth "https://github.com/k-vignesh07/portfolio/blob/main/app/src/hooks/useFirebaseAuth.js"
click node_editors "https://github.com/k-vignesh07/portfolio/tree/main/app/src/components/admin/editors"
click node_adminchat "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/AIAdminChat.jsx"
click node_messages "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/ContactMessages.jsx"
click node_uploader "https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/editors/ImageUploader.jsx"
click node_datactx "https://github.com/k-vignesh07/portfolio/blob/main/app/src/context/DataContext.jsx"
click node_defaults "https://github.com/k-vignesh07/portfolio/blob/main/app/src/data/portfolioData.js"
click node_firestore "https://github.com/k-vignesh07/portfolio/blob/main/app/src/services/firestoreService.js"
click node_storage "https://github.com/k-vignesh07/portfolio/blob/main/app/src/services/storageService.js"
click node_firebaseconfig "https://github.com/k-vignesh07/portfolio/blob/main/app/src/config/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_app,node_portfolio,node_chatbot,node_contact toneBlue
class node_adminpanel,node_auth,node_editors,node_adminchat,node_messages,node_uploader toneAmber
class node_datactx,node_defaults,node_firestore,node_storage,node_firebaseconfig toneMint
class node_firebase,node_gemini toneRose
class node_visitor,node_administrator toneIndigo
```

## Components

### Public Portfolio

- [App Router](https://github.com/k-vignesh07/portfolio/blob/main/app/src/App.jsx): `app/src/App.jsx`
- [Portfolio Sections](https://github.com/k-vignesh07/portfolio/tree/main/app/src/components/sections): `app/src/components/sections`
- [Portfolio Chatbot](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/chatbot/AIChatbot.jsx): `app/src/components/chatbot/AIChatbot.jsx`
- [Contact Form](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/sections/Contact.jsx): `app/src/components/sections/Contact.jsx`

### Administration

- [Admin Panel](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/AdminPanel.jsx): `app/src/components/admin/AdminPanel.jsx`
- [Firebase Auth Hook](https://github.com/k-vignesh07/portfolio/blob/main/app/src/hooks/useFirebaseAuth.js): `app/src/hooks/useFirebaseAuth.js`
- [Section Editors](https://github.com/k-vignesh07/portfolio/tree/main/app/src/components/admin/editors): `app/src/components/admin/editors`
- [AI Admin Chat](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/AIAdminChat.jsx): `app/src/components/admin/AIAdminChat.jsx`
- [Message Manager](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/ContactMessages.jsx): `app/src/components/admin/ContactMessages.jsx`
- [Image Uploader](https://github.com/k-vignesh07/portfolio/blob/main/app/src/components/admin/editors/ImageUploader.jsx): `app/src/components/admin/editors/ImageUploader.jsx`

### Data and Services

- [Portfolio Data Context](https://github.com/k-vignesh07/portfolio/blob/main/app/src/context/DataContext.jsx): `app/src/context/DataContext.jsx`
- [Seed Portfolio Data](https://github.com/k-vignesh07/portfolio/blob/main/app/src/data/portfolioData.js): `app/src/data/portfolioData.js`
- [Firestore Operations](https://github.com/k-vignesh07/portfolio/blob/main/app/src/services/firestoreService.js): `app/src/services/firestoreService.js`
- [File Encoding Service](https://github.com/k-vignesh07/portfolio/blob/main/app/src/services/storageService.js): `app/src/services/storageService.js`
- [Firebase Configuration](https://github.com/k-vignesh07/portfolio/blob/main/app/src/config/firebase.js): `app/src/config/firebase.js`

### External Integrations

- **Firebase**
- **Gemini API**

### Other components

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

## Connections

- Visitor → App Router: opens (evidence: `app/src/App.jsx`)
- App Router → Portfolio Sections: renders (evidence: `app/src/App.jsx`)
- App Router → Contact Form: renders (evidence: `app/src/App.jsx`)
- App Router → Portfolio Chatbot: renders (evidence: `app/src/App.jsx`)
- App Router → Admin Panel: routes to (evidence: `app/src/App.jsx`)
- Portfolio Sections → Portfolio Data Context: reads (evidence: `app/src/components/sections/About.jsx`)
- Contact Form → Firestore Operations: saves message (evidence: `app/src/components/sections/Contact.jsx`)
- Portfolio Chatbot → Portfolio Data Context: reads (evidence: `app/src/components/chatbot/AIChatbot.jsx`)
- Portfolio Chatbot → Gemini API: queries (evidence: `app/src/components/chatbot/AIChatbot.jsx`)
- Administrator → Admin Panel: opens
- Admin Panel → Firebase Auth Hook: uses (evidence: `app/src/components/admin/AdminPanel.jsx`)
- Admin Panel → Section Editors: selects (evidence: `app/src/components/admin/AdminPanel.jsx`)
- Admin Panel → AI Admin Chat: selects (evidence: `app/src/components/admin/AdminPanel.jsx`)
- Admin Panel → Message Manager: selects (evidence: `app/src/components/admin/AdminPanel.jsx`)
- Section Editors → Portfolio Data Context: updates (evidence: `app/src/components/admin/editors/AboutEditor.jsx`)
- Section Editors → Image Uploader: uses (evidence: `app/src/components/admin/editors/AboutEditor.jsx`)
- Image Uploader → File Encoding Service: uploads via (evidence: `app/src/components/admin/editors/ImageUploader.jsx`)
- AI Admin Chat → Portfolio Data Context: updates (evidence: `app/src/components/admin/AIAdminChat.jsx`)
- AI Admin Chat → File Encoding Service: uploads via (evidence: `app/src/components/admin/AIAdminChat.jsx`)
- AI Admin Chat → Gemini API: queries (evidence: `app/src/components/admin/AIAdminChat.jsx`)
- Message Manager → Firestore Operations: manages messages (evidence: `app/src/components/admin/ContactMessages.jsx`)
- Portfolio Data Context → Seed Portfolio Data: loads defaults (evidence: `app/src/context/DataContext.jsx`)
- Portfolio Data Context → Firestore Operations: loads and saves (evidence: `app/src/context/DataContext.jsx`)
- Firestore Operations → Firebase Configuration: uses database config (evidence: `app/src/services/firestoreService.js`)
- Firestore Operations → Firebase: reads and writes (evidence: `app/src/services/firestoreService.js`)
- Firebase Auth Hook → Firebase Configuration: uses auth config (evidence: `app/src/hooks/useFirebaseAuth.js`)
- Firebase Auth Hook → Firebase: authenticates (evidence: `app/src/hooks/useFirebaseAuth.js`)
