# sumanthgupta11/my-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/sumanthgupta11/my-portfolio
- Repository: https://github.com/sumanthgupta11/my-portfolio

## Overview

This is a portfolio website with a React frontend and an Express API for project listings and contact submissions. Visitors browse profile, experience, projects, and resume content, then can submit a contact message; project data is fetched from the API. The README describes MongoDB, but the sampled database implementation creates MySQL tables and uses mysql2, so the graph reflects that implementation. Some UI and utility files were not sampled; their subsystem roles follow the README and file tree, and uncertain links are omitted or marked optional.

Main entry points: [`client/src/pages/Home.jsx`](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/pages/Home.jsx) (Home page), [`client/src/api/api.js`](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/api/api.js) (API client), [`server/utils/db.js`](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/utils/db.js) (Database setup and mapping), [`client/src/components/Reveal.jsx`](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Reveal.jsx) (Scroll reveal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portfolio frontend"]
  node_app["App shell<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_hero["Hero section<br/>[Hero.jsx]"]
  node_profile["Profile section<br/>[Profile.jsx]"]
  node_experience["Experience section<br/>[Experience.jsx]"]
  node_projectcard["Project cards<br/>[ProjectCard.jsx]"]
  node_resume["Resume section<br/>[Resume.jsx]"]
  node_resume_pdf["Resume PDF<br/>[resume.pdf]"]
  node_contactform["Contact form<br/>[ContactForm.jsx]"]
  node_reveal["Scroll reveal<br/>[Reveal.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["HTTP API"]
  node_express["Express server<br/>[server.js]"]
  node_project_routes["Project routes<br/>[projects.js]"]
  node_contact_routes["Contact routes<br/>[contact.js]"]
end

subgraph group_domain["Portfolio data"]
  node_project_controller["Project operations"]
  node_contact_controller["Message operations"]
  node_db["Database setup and mapping<br/>[db.js]"]
end

subgraph group_infra["External services"]
  node_mysql[("MySQL database")]
  node_mailer["Email notification<br/>[mailer.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_home -->|"renders"| node_hero
node_home -->|"renders"| node_profile
node_home -->|"renders"| node_experience
node_home -->|"renders"| node_projectcard
node_home -->|"renders"| node_resume
node_home -->|"renders"| node_contactform
node_home -->|"renders"| node_reveal
node_profile -->|"wraps content"| node_reveal
node_experience -->|"wraps content"| node_reveal
node_resume -->|"wraps content"| node_reveal
node_resume -->|"links to"| node_resume_pdf
node_home -->|"requests projects"| node_api_client
node_contactform -->|"submits message"| node_api_client
node_api_client -->|"GET projects"| node_project_routes
node_api_client -->|"POST contact"| node_contact_routes
node_express -->|"mounts route"| node_project_routes
node_express -->|"mounts route"| node_contact_routes
node_project_routes -->|"dispatches"| node_project_controller
node_contact_routes -->|"dispatches"| node_contact_controller
node_project_controller -->|"queries and maps"| node_db
node_contact_controller -->|"stores and lists"| node_db
node_express -->|"initializes"| node_db
node_db -->|"creates tables and queries"| node_mysql
node_contact_controller -.->|"may notify"| node_mailer

click node_app "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/App.jsx"
click node_home "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/pages/Home.jsx"
click node_navbar "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Navbar.jsx"
click node_hero "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Hero.jsx"
click node_profile "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Profile.jsx"
click node_experience "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Experience.jsx"
click node_projectcard "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/ProjectCard.jsx"
click node_resume "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Resume.jsx"
click node_resume_pdf "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/public/resume.pdf"
click node_contactform "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/ContactForm.jsx"
click node_reveal "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Reveal.jsx"
click node_api_client "https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/api/api.js"
click node_express "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/server.js"
click node_project_routes "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/routes/projects.js"
click node_contact_routes "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/routes/contact.js"
click node_project_controller "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/controllers/projectController.js"
click node_contact_controller "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/controllers/contactController.js"
click node_db "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/utils/db.js"
click node_mailer "https://github.com/sumanthgupta11/my-portfolio/blob/main/server/utils/mailer.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_home,node_navbar,node_hero,node_profile,node_experience,node_projectcard,node_resume,node_resume_pdf,node_contactform,node_reveal,node_api_client toneBlue
class node_express,node_project_routes,node_contact_routes toneAmber
class node_project_controller,node_contact_controller,node_db toneMint
class node_mysql,node_mailer toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio frontend

- [App shell](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Home page](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Navigation](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Navbar.jsx): `client/src/components/Navbar.jsx`
- [Hero section](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Hero.jsx): `client/src/components/Hero.jsx`
- [Profile section](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Profile.jsx): `client/src/components/Profile.jsx`
- [Experience section](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Experience.jsx): `client/src/components/Experience.jsx`
- [Project cards](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/ProjectCard.jsx): `client/src/components/ProjectCard.jsx`
- [Resume section](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Resume.jsx): `client/src/components/Resume.jsx`
- [Resume PDF](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/public/resume.pdf): `client/public/resume.pdf`
- [Contact form](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/ContactForm.jsx): `client/src/components/ContactForm.jsx`
- [Scroll reveal](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/components/Reveal.jsx): `client/src/components/Reveal.jsx`
- [API client](https://github.com/sumanthgupta11/my-portfolio/blob/main/client/src/api/api.js): `client/src/api/api.js`

### HTTP API

- [Express server](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/server.js): `server/server.js`
- [Project routes](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/routes/projects.js): `server/routes/projects.js`
- [Contact routes](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/routes/contact.js): `server/routes/contact.js`

### Portfolio data

- [Project operations](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/controllers/projectController.js): `server/controllers/projectController.js`
- [Message operations](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/controllers/contactController.js): `server/controllers/contactController.js`
- [Database setup and mapping](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/utils/db.js): `server/utils/db.js`

### External services

- **MySQL database**
- [Email notification](https://github.com/sumanthgupta11/my-portfolio/blob/main/server/utils/mailer.js): `server/utils/mailer.js`

### Other components

- **Visitor**

## Connections

- Visitor → App shell: opens site
- App shell → Navigation: renders (evidence: `client/src/App.jsx`)
- App shell → Home page: routes to (evidence: `client/src/App.jsx`)
- Home page → Hero section: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Profile section: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Experience section: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Project cards: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Resume section: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Contact form: renders (evidence: `client/src/pages/Home.jsx`)
- Home page → Scroll reveal: renders (evidence: `client/src/pages/Home.jsx`)
- Profile section → Scroll reveal: wraps content (evidence: `client/src/components/Profile.jsx`)
- Experience section → Scroll reveal: wraps content (evidence: `client/src/components/Experience.jsx`)
- Resume section → Scroll reveal: wraps content (evidence: `client/src/components/Resume.jsx`)
- Resume section → Resume PDF: links to (evidence: `README.md`)
- Home page → API client: requests projects (evidence: `client/src/pages/Home.jsx`)
- Contact form → API client: submits message (evidence: `client/src/components/ContactForm.jsx`)
- API client → Project routes: GET projects (evidence: `README.md`)
- API client → Contact routes: POST contact (evidence: `client/src/api/api.js`)
- Express server → Project routes: mounts route (evidence: `server/server.js`)
- Express server → Contact routes: mounts route (evidence: `server/server.js`)
- Project routes → Project operations: dispatches (evidence: `server/routes/projects.js`)
- Contact routes → Message operations: dispatches (evidence: `server/routes/contact.js`)
- Project operations → Database setup and mapping: queries and maps (evidence: `server/controllers/projectController.js`)
- Message operations → Database setup and mapping: stores and lists (evidence: `server/controllers/contactController.js`)
- Express server → Database setup and mapping: initializes (evidence: `server/server.js`)
- Database setup and mapping → MySQL database: creates tables and queries (evidence: `server/utils/db.js`)
- Message operations → Email notification: may notify (evidence: `README.md`)
