# vishaljadhav003/my_portfolio_website architecture

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

- Interactive diagram: https://gitdiagram.com/vishaljadhav003/my_portfolio_website
- Repository: https://github.com/vishaljadhav003/my_portfolio_website

## Overview

This repository implements a personal portfolio and lead-generation site, backed by a Node service. Visitors browse profile and project content, submit inquiries, and can use an AI chat; the owner can sign in to manage inquiries and view analytics. The graph also preserves the documented-by-code analytics, Google Search Console, security, and email subsystems. Several server modules and chat UI components were not excerpted, so their internal connections are omitted where the supplied evidence does not establish them.

Main entry points: [`src/App.jsx`](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/App.jsx) (App shell), [`server/src/routes/public.js`](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/public.js) (Public API routes), [`server/src/routes/admin.js`](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/admin.js) (Admin API routes), [`server/src/index.js`](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/index.js) (Service startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Portfolio site"]
  node_app["App shell<br/>[App.jsx]"]
  node_router["History router<br/>[router.jsx]"]
  node_pages["Portfolio pages"]
  node_content["Site content<br/>[data.js]"]
  node_contact["Contact form<br/>[Contact.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_tracking["Visitor tracking<br/>[track.js]"]
end

subgraph group_chat["AI assistant"]
  node_chatui["Chat interface<br/>[ChatOverlay.jsx]"]
  node_chatstate["Chat state<br/>[useChat.js]"]
  node_chatstream["Chat streaming<br/>[stream.js]"]
end

subgraph group_service["Node service"]
  node_assistant["Assistant engine<br/>[assistant.js]"]
  node_publicroutes["Public API routes<br/>[public.js]"]
  node_server["HTTP application<br/>[app.js]"]
  node_entry["Service startup<br/>[index.js]"]
  node_database[("Database<br/>[db.js]")]
  node_security["Request security<br/>[security.js]"]
  node_mailer["Email delivery<br/>[mailer.js]"]
  node_adminroutes["Admin API routes<br/>[admin.js]"]
  node_analytics["Analytics<br/>[analytics.js]"]
  node_gsc["Search Console sync<br/>[gsc.js]"]
end

subgraph group_admin["Owner tools"]
  node_adminpage["Admin page<br/>[Admin.jsx]"]
  node_dashboard["Analytics dashboard<br/>[Dashboard.jsx]"]
  node_inquiries["Inquiry management<br/>[Inquiries.jsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"reads route"| node_router
node_app -->|"renders"| node_pages
node_pages -->|"uses content"| node_content
node_contact -->|"submits inquiry"| node_api
node_app -->|"tracks visits"| node_tracking
node_app -->|"renders widget"| node_chatui
node_chatui -->|"uses state"| node_chatstate
node_chatstate -->|"requests stream"| node_chatstream
node_chatstream -.->|"sends chat request"| node_publicroutes
node_publicroutes -->|"dispatches chat"| node_assistant
node_entry -->|"creates app"| node_server
node_server -->|"registers routes"| node_publicroutes
node_server -->|"registers routes"| node_adminroutes
node_adminpage -->|"renders dashboard"| node_dashboard
node_dashboard -->|"loads metrics"| node_api
node_dashboard -->|"renders inquiries"| node_inquiries
node_api -->|"calls admin endpoints"| node_adminroutes
node_adminroutes -->|"queries overview"| node_analytics
node_adminroutes -->|"runs sync"| node_gsc
node_assistant -->|"uses safeguards"| node_security
node_publicroutes -->|"uses safeguards"| node_security
node_entry -->|"initializes database"| node_database
node_entry -->|"initializes mailer"| node_mailer

click node_app "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/App.jsx"
click node_router "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/router.jsx"
click node_pages "https://github.com/vishaljadhav003/my_portfolio_website/tree/main/src/pages"
click node_content "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/data.js"
click node_contact "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/pages/Contact.jsx"
click node_api "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/lib/api.js"
click node_tracking "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/lib/track.js"
click node_chatui "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/ChatOverlay.jsx"
click node_chatstate "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/useChat.js"
click node_chatstream "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/stream.js"
click node_assistant "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/assistant.js"
click node_publicroutes "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/public.js"
click node_server "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/app.js"
click node_entry "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/index.js"
click node_database "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/db.js"
click node_security "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/security.js"
click node_mailer "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/mailer.js"
click node_adminpage "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/pages/Admin.jsx"
click node_dashboard "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/admin/Dashboard.jsx"
click node_inquiries "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/admin/Inquiries.jsx"
click node_adminroutes "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/admin.js"
click node_analytics "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/analytics.js"
click node_gsc "https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/gsc.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_router,node_pages,node_content,node_contact,node_api,node_tracking toneBlue
class node_chatui,node_chatstate,node_chatstream toneAmber
class node_assistant,node_publicroutes,node_server,node_entry,node_database,node_security,node_mailer,node_adminroutes,node_analytics,node_gsc toneMint
class node_adminpage,node_dashboard,node_inquiries toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio site

- [App shell](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/App.jsx): `src/App.jsx`
- [History router](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/router.jsx): `src/router.jsx`
- [Portfolio pages](https://github.com/vishaljadhav003/my_portfolio_website/tree/main/src/pages): `src/pages`
- [Site content](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/data.js): `src/data.js`
- [Contact form](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`
- [API client](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/lib/api.js): `src/lib/api.js`
- [Visitor tracking](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/lib/track.js): `src/lib/track.js`

### AI assistant

- [Chat interface](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/ChatOverlay.jsx): `src/chat/ChatOverlay.jsx`
- [Chat state](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/useChat.js): `src/chat/useChat.js`
- [Chat streaming](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/chat/stream.js): `src/chat/stream.js`

### Node service

- [Assistant engine](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/assistant.js): `server/src/assistant.js`
- [Public API routes](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/public.js): `server/src/routes/public.js`
- [HTTP application](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/app.js): `server/src/app.js`
- [Service startup](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/index.js): `server/src/index.js`
- [Database](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/db.js): `server/src/db.js`
- [Request security](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/security.js): `server/src/security.js`
- [Email delivery](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/mailer.js): `server/src/mailer.js`
- [Admin API routes](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/routes/admin.js): `server/src/routes/admin.js`
- [Analytics](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/analytics.js): `server/src/analytics.js`
- [Search Console sync](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/server/src/gsc.js): `server/src/gsc.js`

### Owner tools

- [Admin page](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/pages/Admin.jsx): `src/pages/Admin.jsx`
- [Analytics dashboard](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/admin/Dashboard.jsx): `src/admin/Dashboard.jsx`
- [Inquiry management](https://github.com/vishaljadhav003/my_portfolio_website/blob/main/src/admin/Inquiries.jsx): `src/admin/Inquiries.jsx`

### Other components

- **Visitor**

## Connections

- Visitor → App shell: opens (evidence: `src/App.jsx`)
- App shell → History router: reads route (evidence: `src/App.jsx`)
- App shell → Portfolio pages: renders (evidence: `src/App.jsx`)
- Portfolio pages → Site content: uses content (evidence: `src/data.js`)
- Contact form → API client: submits inquiry (evidence: `src/pages/Contact.jsx`)
- App shell → Visitor tracking: tracks visits (evidence: `src/App.jsx`)
- App shell → Chat interface: renders widget (evidence: `src/App.jsx`)
- Chat interface → Chat state: uses state (evidence: `src/chat/ChatOverlay.jsx`)
- Chat state → Chat streaming: requests stream (evidence: `src/chat/useChat.js`)
- Chat streaming → Public API routes: sends chat request
- Public API routes → Assistant engine: dispatches chat (evidence: `server/src/routes/public.js`)
- Service startup → HTTP application: creates app (evidence: `server/src/index.js`)
- HTTP application → Public API routes: registers routes (evidence: `server/src/app.js`)
- HTTP application → Admin API routes: registers routes (evidence: `server/src/app.js`)
- Admin page → Analytics dashboard: renders dashboard (evidence: `src/pages/Admin.jsx`)
- Analytics dashboard → API client: loads metrics (evidence: `src/admin/Dashboard.jsx`)
- Analytics dashboard → Inquiry management: renders inquiries (evidence: `src/admin/Dashboard.jsx`)
- API client → Admin API routes: calls admin endpoints (evidence: `server/src/routes/admin.js`)
- Admin API routes → Analytics: queries overview (evidence: `server/src/routes/admin.js`)
- Admin API routes → Search Console sync: runs sync (evidence: `server/src/routes/admin.js`)
- Assistant engine → Request security: uses safeguards (evidence: `server/src/assistant.js`)
- Public API routes → Request security: uses safeguards (evidence: `server/src/routes/public.js`)
- Service startup → Database: initializes database (evidence: `server/src/index.js`)
- Service startup → Email delivery: initializes mailer (evidence: `server/src/index.js`)
