# riteshpandey9450/ritesh-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/riteshpandey9450/ritesh-portfolio
- Repository: https://github.com/riteshpandey9450/ritesh-portfolio

## Overview

This is a full-stack personal portfolio: visitors browse React portfolio pages, search or submit a contact message, while the backend records visitor activity and processes contact submissions in MongoDB. The graph preserves the documented GitHub repo-count capability, but the supplied tree has no identifiable implementation path for it. Edges reflect shown imports/calls or README-documented behavior; dashed edges mark documented links whose implementation details were not excerpted.

Main entry points: [`client/src/App.jsx`](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/App.jsx) (Application shell), [`server/src/routes/contact.routes.js`](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/contact.routes.js) (Contact routes), [`server/src/routes/visitor.routes.js`](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/visitor.routes.js) (Visitor routes), [`client/src/components/SearchDialog.jsx`](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/components/SearchDialog.jsx) (Smart search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portfolio experience"]
  node_app["Application shell<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_about["About page<br/>[About.jsx]"]
  node_education["Education page<br/>[Education.jsx]"]
  node_experience["Experience page<br/>[Experience.jsx]"]
  node_skills["Skills page<br/>[Skills.jsx]"]
  node_projects["Projects page<br/>[Projects.jsx]"]
  node_certificates["Certificates page<br/>[Certificates.jsx]"]
  node_contactpage["Contact page<br/>[Contact.jsx]"]
  node_notfound["Not-found page<br/>[NotFound.jsx]"]
  node_search["Smart search<br/>[SearchDialog.jsx]"]
  node_searchdata["Search index<br/>[searchData.js]"]
  node_seo["SEO behavior<br/>[useSEO.js]"]
  node_trackinghook["Visitor tracking hook"]
end

subgraph group_api["API workflows"]
  node_server["Express application<br/>[app.js]"]
  node_routes["API route registry<br/>[index.js]"]
  node_contactroutes["Contact routes<br/>[contact.routes.js]"]
  node_visitorroutes["Visitor routes<br/>[visitor.routes.js]"]
  node_contactcontroller["Contact workflow"]
  node_visitorcontroller["Visitor workflow"]
end

subgraph group_policy["Validation and access"]
  node_contactpolicy["Contact validation"]
  node_contentfilter["Spam filtering<br/>[contentFilter.js]"]
  node_ratelimit["Rate limiting"]
  node_adminauth["Admin key check<br/>[auth.middleware.js]"]
end

subgraph group_data["Persistence"]
  node_contactmodel[("Contact records<br/>[Contact.model.js]")]
  node_visitormodel[("Visitor records<br/>[Visitor.model.js]")]
  node_dbconfig["Database connection<br/>[db.js]"]
end

node_visitor(("Portfolio visitor"))
node_github["GitHub service"]
node_mongo[("MongoDB")]

node_visitor -->|"browses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_education
node_app -->|"routes to"| node_experience
node_app -->|"routes to"| node_skills
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_certificates
node_app -->|"routes to"| node_contactpage
node_app -->|"routes to"| node_notfound
node_app -->|"uses"| node_seo
node_app -->|"uses"| node_trackinghook
node_app -.->|"renders"| node_search
node_search -->|"filters"| node_searchdata
node_search -->|"navigates"| node_app
node_home -.->|"fetches count"| node_github
node_contactpage -.->|"submits message"| node_visitor
node_trackinghook -.->|"sends tracking"| node_server
node_server -->|"mounts routes"| node_routes
node_routes -->|"registers"| node_contactroutes
node_routes -->|"registers"| node_visitorroutes
node_contactroutes -->|"dispatches"| node_contactcontroller
node_contactroutes -->|"limits submissions"| node_ratelimit
node_contactroutes -->|"validates"| node_contactpolicy
node_contactroutes -->|"guards admin"| node_adminauth
node_contactpolicy -->|"filters content"| node_contentfilter
node_visitorroutes -->|"dispatches"| node_visitorcontroller
node_visitorroutes -->|"limits tracking"| node_ratelimit
node_visitorroutes -->|"guards listing"| node_adminauth
node_contactcontroller -->|"reads and writes"| node_contactmodel
node_visitorcontroller -->|"reads and writes"| node_visitormodel
node_dbconfig -.->|"connects"| node_mongo

click node_app "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/App.jsx"
click node_home "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Home.jsx"
click node_about "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/About.jsx"
click node_education "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Education.jsx"
click node_experience "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Experience.jsx"
click node_skills "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Skills.jsx"
click node_projects "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Projects.jsx"
click node_certificates "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Certificates.jsx"
click node_contactpage "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Contact.jsx"
click node_notfound "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/NotFound.jsx"
click node_search "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/components/SearchDialog.jsx"
click node_searchdata "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/config/searchData.js"
click node_seo "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/hooks/useSEO.js"
click node_trackinghook "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/hooks/useVisitorTracking.js"
click node_server "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/app.js"
click node_routes "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/index.js"
click node_contactroutes "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/contact.routes.js"
click node_visitorroutes "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/visitor.routes.js"
click node_contactcontroller "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/controllers/contact.controller.js"
click node_visitorcontroller "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/controllers/visitor.controller.js"
click node_contactpolicy "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/validate.middleware.js"
click node_contentfilter "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/utils/contentFilter.js"
click node_ratelimit "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/rateLimiter.middleware.js"
click node_adminauth "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/auth.middleware.js"
click node_contactmodel "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/models/Contact.model.js"
click node_visitormodel "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/models/Visitor.model.js"
click node_dbconfig "https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/config/db.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_about,node_education,node_experience,node_skills,node_projects,node_certificates,node_contactpage,node_notfound,node_search,node_searchdata,node_seo,node_trackinghook toneBlue
class node_server,node_routes,node_contactroutes,node_visitorroutes,node_contactcontroller,node_visitorcontroller,node_mongo toneAmber
class node_contactpolicy,node_contentfilter,node_ratelimit,node_adminauth toneMint
class node_contactmodel,node_visitormodel,node_dbconfig toneRose
class node_visitor,node_github toneIndigo
```

## Components

### Portfolio experience

- [Application shell](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Home page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [About page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/About.jsx): `client/src/pages/About.jsx`
- [Education page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Education.jsx): `client/src/pages/Education.jsx`
- [Experience page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Experience.jsx): `client/src/pages/Experience.jsx`
- [Skills page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Skills.jsx): `client/src/pages/Skills.jsx`
- [Projects page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Projects.jsx): `client/src/pages/Projects.jsx`
- [Certificates page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Certificates.jsx): `client/src/pages/Certificates.jsx`
- [Contact page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/Contact.jsx): `client/src/pages/Contact.jsx`
- [Not-found page](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/pages/NotFound.jsx): `client/src/pages/NotFound.jsx`
- [Smart search](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/components/SearchDialog.jsx): `client/src/components/SearchDialog.jsx`
- [Search index](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/config/searchData.js): `client/src/config/searchData.js`
- [SEO behavior](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/hooks/useSEO.js): `client/src/hooks/useSEO.js`
- [Visitor tracking hook](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/client/src/hooks/useVisitorTracking.js): `client/src/hooks/useVisitorTracking.js`

### API workflows

- [Express application](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/app.js): `server/src/app.js`
- [API route registry](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/index.js): `server/src/routes/index.js`
- [Contact routes](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/contact.routes.js): `server/src/routes/contact.routes.js`
- [Visitor routes](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/routes/visitor.routes.js): `server/src/routes/visitor.routes.js`
- [Contact workflow](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/controllers/contact.controller.js): `server/src/controllers/contact.controller.js`
- [Visitor workflow](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/controllers/visitor.controller.js): `server/src/controllers/visitor.controller.js`

### Validation and access

- [Contact validation](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/validate.middleware.js): `server/src/middleware/validate.middleware.js`
- [Spam filtering](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/utils/contentFilter.js): `server/src/utils/contentFilter.js`
- [Rate limiting](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/rateLimiter.middleware.js): `server/src/middleware/rateLimiter.middleware.js`
- [Admin key check](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/middleware/auth.middleware.js): `server/src/middleware/auth.middleware.js`

### Persistence

- [Contact records](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/models/Contact.model.js): `server/src/models/Contact.model.js`
- [Visitor records](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/models/Visitor.model.js): `server/src/models/Visitor.model.js`
- [Database connection](https://github.com/riteshpandey9450/ritesh-portfolio/blob/main/server/src/config/db.js): `server/src/config/db.js`

### Other components

- **Portfolio visitor**
- **GitHub service**
- **MongoDB**

## Connections

- Portfolio visitor → Application shell: browses (evidence: `client/src/App.jsx`)
- Application shell → Home page: routes to (evidence: `client/src/App.jsx`)
- Application shell → About page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Education page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Experience page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Skills page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Projects page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Certificates page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Contact page: routes to (evidence: `client/src/App.jsx`)
- Application shell → Not-found page: routes to (evidence: `client/src/App.jsx`)
- Application shell → SEO behavior: uses (evidence: `client/src/App.jsx`)
- Application shell → Visitor tracking hook: uses (evidence: `client/src/App.jsx`)
- Application shell → Smart search: renders
- Smart search → Search index: filters (evidence: `client/src/components/SearchDialog.jsx`)
- Smart search → Application shell: navigates (evidence: `client/src/components/SearchDialog.jsx`)
- Home page → GitHub service: fetches count (evidence: `README.md`)
- Contact page → Portfolio visitor: submits message (evidence: `README.md`)
- Visitor tracking hook → Express application: sends tracking (evidence: `README.md`)
- Express application → API route registry: mounts routes (evidence: `server/src/app.js`)
- API route registry → Contact routes: registers (evidence: `server/src/routes/index.js`)
- API route registry → Visitor routes: registers (evidence: `server/src/routes/index.js`)
- Contact routes → Contact workflow: dispatches (evidence: `server/src/routes/contact.routes.js`)
- Contact routes → Rate limiting: limits submissions (evidence: `server/src/routes/contact.routes.js`)
- Contact routes → Contact validation: validates (evidence: `server/src/routes/contact.routes.js`)
- Contact routes → Admin key check: guards admin (evidence: `server/src/routes/contact.routes.js`)
- Contact validation → Spam filtering: filters content (evidence: `server/src/middleware/validate.middleware.js`)
- Visitor routes → Visitor workflow: dispatches (evidence: `server/src/routes/visitor.routes.js`)
- Visitor routes → Rate limiting: limits tracking (evidence: `server/src/routes/visitor.routes.js`)
- Visitor routes → Admin key check: guards listing (evidence: `server/src/routes/visitor.routes.js`)
- Contact workflow → Contact records: reads and writes (evidence: `server/src/controllers/contact.controller.js`)
- Visitor workflow → Visitor records: reads and writes (evidence: `server/src/controllers/visitor.controller.js`)
- Database connection → MongoDB: connects
