# sravani0202/portfolio architecture

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

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

## Overview

This is a personal portfolio website with a server-backed contact form. Visitors browse the portfolio and can submit an inquiry: the browser validates and sends the form, a backend checks and rate-limits it, then attempts SMTP delivery and reports the outcome. The repository has both an Express server and Netlify-style function handlers using a shared contact service; the README describes both local/server hosting and Netlify. The README’s directory layout does not match the supplied tree, so paths below follow the tree; unsampled HTML and styling relationships are omitted.

Main entry points: [`contact-service.js`](https://github.com/sravani0202/portfolio/blob/main/contact-service.js) (Contact service), [`script.js`](https://github.com/sravani0202/portfolio/blob/main/script.js) (Browser interactions), [`server.js`](https://github.com/sravani0202/portfolio/blob/main/server.js) (Express server), [`contact.js`](https://github.com/sravani0202/portfolio/blob/main/contact.js) (Contact endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio experience"]
  node_portfolio_page["Portfolio page<br/>[index.html]"]
  node_portfolio_styles["Visual styling<br/>[style.css]"]
  node_browser_behavior["Browser interactions<br/>[script.js]"]
  node_profile_asset["Profile image"]
end

subgraph group_backend["HTTP backend"]
  node_express_server["Express server<br/>[server.js]"]
  node_contact_endpoint["Contact endpoint<br/>[contact.js]"]
  node_health_endpoint["Health endpoint<br/>[health.js]"]
end

subgraph group_contact["Contact processing"]
  node_contact_service["Contact service<br/>[contact-service.js]"]
end

subgraph group_integrations["External services"]
  node_smtp_provider{{"SMTP server"}}
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_portfolio_page
node_visitor -->|"interacts with"| node_browser_behavior
node_browser_behavior -->|"posts form"| node_express_server
node_express_server -->|"sends email"| node_smtp_provider
node_contact_endpoint -->|"delegates to"| node_contact_service
node_health_endpoint -->|"reads status"| node_contact_service
node_contact_service -->|"sends email"| node_smtp_provider

click node_portfolio_page "https://github.com/sravani0202/portfolio/blob/main/index.html"
click node_portfolio_styles "https://github.com/sravani0202/portfolio/blob/main/style.css"
click node_browser_behavior "https://github.com/sravani0202/portfolio/blob/main/script.js"
click node_express_server "https://github.com/sravani0202/portfolio/blob/main/server.js"
click node_contact_endpoint "https://github.com/sravani0202/portfolio/blob/main/contact.js"
click node_health_endpoint "https://github.com/sravani0202/portfolio/blob/main/health.js"
click node_contact_service "https://github.com/sravani0202/portfolio/blob/main/contact-service.js"
click node_profile_asset "https://github.com/sravani0202/portfolio/tree/main/assets"

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_portfolio_page,node_portfolio_styles,node_browser_behavior,node_profile_asset toneBlue
class node_express_server,node_contact_endpoint,node_health_endpoint toneAmber
class node_contact_service toneMint
class node_smtp_provider toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio experience

- [Portfolio page](https://github.com/sravani0202/portfolio/blob/main/index.html): `index.html`
- [Visual styling](https://github.com/sravani0202/portfolio/blob/main/style.css): `style.css`
- [Browser interactions](https://github.com/sravani0202/portfolio/blob/main/script.js): `script.js`
- [Profile image](https://github.com/sravani0202/portfolio/tree/main/assets): `assets`

### HTTP backend

- [Express server](https://github.com/sravani0202/portfolio/blob/main/server.js): `server.js`
- [Contact endpoint](https://github.com/sravani0202/portfolio/blob/main/contact.js): `contact.js`
- [Health endpoint](https://github.com/sravani0202/portfolio/blob/main/health.js): `health.js`

### Contact processing

- [Contact service](https://github.com/sravani0202/portfolio/blob/main/contact-service.js): `contact-service.js`

### External services

- **SMTP server**

### Other components

- **Visitor**

## Connections

- Visitor → Portfolio page: browses (evidence: `README.md`)
- Visitor → Browser interactions: interacts with (evidence: `README.md`)
- Browser interactions → Express server: posts form (evidence: `script.js`)
- Express server → SMTP server: sends email (evidence: `server.js`)
- Contact endpoint → Contact service: delegates to (evidence: `contact.js`)
- Health endpoint → Contact service: reads status (evidence: `health.js`)
- Contact service → SMTP server: sends email (evidence: `contact-service.js`)
