# sipemnyaka/peterelectrical architecture

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

- Interactive diagram: https://gitdiagram.com/sipemnyaka/peterelectrical
- Repository: https://github.com/sipemnyaka/peterelectrical

## Overview

Peter Electrical is a business website for presenting electrical services and collecting quote requests. The main workflow runs from the customer-facing quote form through the browser script and Azure HTTP Function to Cosmos DB, then through a change-feed notification function to Resend and the business. README capabilities such as site sections, Maps, WhatsApp, and SEO are represented, but their implementation details were not sampled; those integration links are therefore indicative and optional.

Main entry points: [`index.html`](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html) (Business site), [`api/src/functions/quoteNotification.js`](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quoteNotification.js) (Change-feed trigger), [`js/script.js`](https://github.com/sipemnyaka/peterelectrical/blob/main/js/script.js) (Form interaction), [`api/src/functions/quote.js`](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quote.js) (Quote endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Business website"]
  node_website["Business site<br/>[index.html]"]
  node_service_content["Services and testimonials<br/>[index.html]"]
  node_quote_form["Quote form<br/>[index.html]"]
  node_browser_logic["Form interaction<br/>[script.js]"]
  node_style["Responsive styling<br/>[styles.css]"]
end

subgraph group_api["Quote API"]
  node_quote_endpoint["Quote endpoint<br/>[quote.js]"]
  node_api_registration["Function registration<br/>[index.js]"]
  node_quote_store[("Quote container")]
  node_health["Health endpoint<br/>[health.js]"]
end

subgraph group_notify["Notifications"]
  node_change_trigger["Change-feed trigger"]
  node_notification_status["Notification status"]
  node_resend["Resend email API"]
end

subgraph group_discovery["Contact and discovery"]
  node_contact_options["WhatsApp and Maps<br/>[index.html]"]
  node_search_metadata["SEO metadata<br/>[index.html]"]
  node_search_files["Crawling metadata<br/>[robots.txt]"]
  node_sitemap["XML sitemap<br/>[sitemap.xml]"]
end

node_customer(("Potential customer"))
node_business(("Peter Electrical"))

node_customer -->|"browses"| node_website
node_website -->|"presents"| node_service_content
node_customer -->|"submits"| node_quote_form
node_quote_form -->|"handled by"| node_browser_logic
node_browser_logic -->|"POSTs request"| node_quote_endpoint
node_quote_endpoint -->|"writes quote"| node_quote_store
node_quote_store -->|"change feed"| node_change_trigger
node_change_trigger -->|"reads and updates"| node_quote_store
node_change_trigger -->|"sets status"| node_notification_status
node_change_trigger -->|"sends email"| node_resend
node_resend -->|"delivers notification"| node_business
node_customer -.->|"uses"| node_contact_options
node_website -->|"provides metadata"| node_search_metadata
node_search_files -->|"guides crawling"| node_website
node_sitemap -->|"lists pages"| node_website

click node_website "https://github.com/sipemnyaka/peterelectrical/blob/main/index.html"
click node_service_content "https://github.com/sipemnyaka/peterelectrical/blob/main/index.html"
click node_quote_form "https://github.com/sipemnyaka/peterelectrical/blob/main/index.html"
click node_browser_logic "https://github.com/sipemnyaka/peterelectrical/blob/main/js/script.js"
click node_style "https://github.com/sipemnyaka/peterelectrical/blob/main/css/styles.css"
click node_quote_endpoint "https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quote.js"
click node_api_registration "https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/index.js"
click node_health "https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/health.js"
click node_change_trigger "https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quoteNotification.js"
click node_notification_status "https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quoteNotification.js"
click node_contact_options "https://github.com/sipemnyaka/peterelectrical/blob/main/index.html"
click node_search_metadata "https://github.com/sipemnyaka/peterelectrical/blob/main/index.html"
click node_search_files "https://github.com/sipemnyaka/peterelectrical/blob/main/robots.txt"
click node_sitemap "https://github.com/sipemnyaka/peterelectrical/blob/main/sitemap.xml"

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_website,node_service_content,node_quote_form,node_browser_logic,node_style toneBlue
class node_quote_endpoint,node_api_registration,node_quote_store,node_health toneAmber
class node_change_trigger,node_notification_status,node_resend toneMint
class node_contact_options,node_search_metadata,node_search_files,node_sitemap toneRose
class node_customer,node_business toneIndigo
```

## Components

### Business website

- [Business site](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html): `index.html`
- [Services and testimonials](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html): `index.html`
- [Quote form](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html): `index.html`
- [Form interaction](https://github.com/sipemnyaka/peterelectrical/blob/main/js/script.js): `js/script.js`
- [Responsive styling](https://github.com/sipemnyaka/peterelectrical/blob/main/css/styles.css): `css/styles.css`

### Quote API

- [Quote endpoint](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quote.js): `api/src/functions/quote.js`
- [Function registration](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/index.js): `api/src/functions/index.js`
- **Quote container**
- [Health endpoint](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/health.js): `api/src/functions/health.js`

### Notifications

- [Change-feed trigger](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quoteNotification.js): `api/src/functions/quoteNotification.js`
- [Notification status](https://github.com/sipemnyaka/peterelectrical/blob/main/api/src/functions/quoteNotification.js): `api/src/functions/quoteNotification.js`
- **Resend email API**

### Contact and discovery

- [WhatsApp and Maps](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html): `index.html`
- [SEO metadata](https://github.com/sipemnyaka/peterelectrical/blob/main/index.html): `index.html`
- [Crawling metadata](https://github.com/sipemnyaka/peterelectrical/blob/main/robots.txt): `robots.txt`
- [XML sitemap](https://github.com/sipemnyaka/peterelectrical/blob/main/sitemap.xml): `sitemap.xml`

### Other components

- **Potential customer**
- **Peter Electrical**

## Connections

- Potential customer → Business site: browses
- Business site → Services and testimonials: presents
- Potential customer → Quote form: submits
- Quote form → Form interaction: handled by
- Form interaction → Quote endpoint: POSTs request
- Quote endpoint → Quote container: writes quote
- Quote container → Change-feed trigger: change feed
- Change-feed trigger → Quote container: reads and updates
- Change-feed trigger → Notification status: sets status
- Change-feed trigger → Resend email API: sends email
- Resend email API → Peter Electrical: delivers notification
- Potential customer → WhatsApp and Maps: uses
- Business site → SEO metadata: provides metadata
- Crawling metadata → Business site: guides crawling
- XML sitemap → Business site: lists pages
