# dave-olu/ultrasonic-nigeria architecture

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

- Interactive diagram: https://gitdiagram.com/dave-olu/ultrasonic-nigeria
- Repository: https://github.com/dave-olu/ultrasonic-nigeria

## Overview

Ultrasonic Power Line Venture is a solar-services website with an admin content and account-management area. The public home-page flow loads site content, renders it for visitors, and offers quote requests via WhatsApp; admins can manage site content and authenticate by password or email link. The graph includes documented-by-tree pages and routes even where their implementation was not sampled. Those unsampled components are not connected without evidence; storage and integration links reflect the excerpts shown.

Main entry points: [`Project/lib/admin-auth.ts`](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/lib/admin-auth.ts) (Auth logic), [`Project/components/admin-auth-form.tsx`](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/admin-auth-form.tsx) (Admin auth forms), [`Project/app/page.tsx`](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/page.tsx) (Home route), [`Project/components/site-home.tsx`](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/site-home.tsx) (Home experience)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_home_route["Home route<br/>[page.tsx]"]
  node_home_ui["Home experience<br/>[site-home.tsx]"]
  node_faq["FAQ section<br/>[faq-section.tsx]"]
  node_info_pages["Info pages<br/>[page.tsx]"]
  node_service_page["Services page<br/>[page.tsx]"]
  node_project_page["Projects page<br/>[page.tsx]"]
  node_product_page["Products page<br/>[page.tsx]"]
  node_contact_page["Contact page<br/>[page.tsx]"]
end

subgraph group_content["Content management"]
  node_admin_ui["Admin dashboard<br/>[page.tsx]"]
  node_content_api["Content API<br/>[route.ts]"]
  node_content_data["Content repository<br/>[site-data.ts]"]
end

subgraph group_auth["Admin authentication"]
  node_auth_ui["Admin auth forms"]
  node_signup_api["Signup endpoint<br/>[route.ts]"]
  node_login_api["Password login<br/>[route.ts]"]
  node_email_link_api["Email-link request<br/>[route.ts]"]
  node_email_login_api["Email-link login<br/>[route.ts]"]
  node_session_api["Session endpoint<br/>[route.ts]"]
  node_other_auth_routes["Other auth routes"]
  node_auth_logic["Auth logic<br/>[admin-auth.ts]"]
end

subgraph group_storage["Persistence and integrations"]
  node_site_store[("Site content files<br/>[site-content.json]")]
  node_auth_store[("Auth storage")]
  node_resend["Resend email"]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))
node_whatsapp["WhatsApp"]

node_visitor -->|"opens"| node_home_route
node_home_route -->|"loads content"| node_content_data
node_home_route -->|"renders"| node_home_ui
node_home_ui -->|"renders"| node_faq
node_home_ui -->|"opens quote"| node_whatsapp
node_content_api -->|"checks session"| node_auth_logic
node_content_api -->|"reads and saves"| node_content_data
node_content_data -->|"reads and writes"| node_site_store
node_admin -.->|"manages content"| node_admin_ui
node_admin_ui -.->|"requests changes"| node_content_api
node_auth_ui -.->|"submits signup"| node_signup_api
node_auth_ui -.->|"submits credentials"| node_login_api
node_auth_ui -.->|"requests link"| node_email_link_api
node_auth_ui -.->|"submits token"| node_email_login_api
node_signup_api -->|"creates account"| node_auth_logic
node_login_api -->|"verifies credentials"| node_auth_logic
node_email_link_api -->|"creates token"| node_auth_logic
node_email_link_api -->|"sends email"| node_resend
node_email_login_api -->|"consumes token"| node_auth_logic
node_session_api -->|"reads session"| node_auth_logic
node_auth_logic -.->|"persists auth data"| node_auth_store
node_admin -.->|"uses account tools"| node_other_auth_routes

click node_home_route "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/page.tsx"
click node_home_ui "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/site-home.tsx"
click node_faq "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/faq-section.tsx"
click node_info_pages "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/about/page.tsx"
click node_service_page "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/services/page.tsx"
click node_project_page "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/projects/page.tsx"
click node_product_page "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/products/page.tsx"
click node_contact_page "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/contact/page.tsx"
click node_admin_ui "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/admin/page.tsx"
click node_content_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/site-content/route.ts"
click node_content_data "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/lib/site-data.ts"
click node_auth_ui "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/admin-auth-form.tsx"
click node_signup_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/signup/route.ts"
click node_login_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/login/route.ts"
click node_email_link_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/email-link/route.ts"
click node_email_login_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/email-login/route.ts"
click node_session_api "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/session/route.ts"
click node_other_auth_routes "https://github.com/dave-olu/ultrasonic-nigeria/tree/main/Project/app/api/auth"
click node_auth_logic "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/lib/admin-auth.ts"
click node_site_store "https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/data/site-content.json"

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_home_route,node_home_ui,node_faq,node_info_pages,node_service_page,node_project_page,node_product_page,node_contact_page toneBlue
class node_admin_ui,node_content_api,node_content_data toneAmber
class node_auth_ui,node_signup_api,node_login_api,node_email_link_api,node_email_login_api,node_session_api,node_other_auth_routes,node_auth_logic toneMint
class node_site_store,node_auth_store,node_resend toneRose
class node_visitor,node_admin,node_whatsapp toneIndigo
```

## Components

### Public website

- [Home route](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/page.tsx): `Project/app/page.tsx`
- [Home experience](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/site-home.tsx): `Project/components/site-home.tsx`
- [FAQ section](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/faq-section.tsx): `Project/components/faq-section.tsx`
- [Info pages](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/about/page.tsx): `Project/app/about/page.tsx`
- [Services page](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/services/page.tsx): `Project/app/services/page.tsx`
- [Projects page](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/projects/page.tsx): `Project/app/projects/page.tsx`
- [Products page](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/products/page.tsx): `Project/app/products/page.tsx`
- [Contact page](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/contact/page.tsx): `Project/app/contact/page.tsx`

### Content management

- [Admin dashboard](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/admin/page.tsx): `Project/app/admin/page.tsx`
- [Content API](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/site-content/route.ts): `Project/app/api/site-content/route.ts`
- [Content repository](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/lib/site-data.ts): `Project/lib/site-data.ts`

### Admin authentication

- [Admin auth forms](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/components/admin-auth-form.tsx): `Project/components/admin-auth-form.tsx`
- [Signup endpoint](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/signup/route.ts): `Project/app/api/auth/signup/route.ts`
- [Password login](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/login/route.ts): `Project/app/api/auth/login/route.ts`
- [Email-link request](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/email-link/route.ts): `Project/app/api/auth/email-link/route.ts`
- [Email-link login](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/email-login/route.ts): `Project/app/api/auth/email-login/route.ts`
- [Session endpoint](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/app/api/auth/session/route.ts): `Project/app/api/auth/session/route.ts`
- [Other auth routes](https://github.com/dave-olu/ultrasonic-nigeria/tree/main/Project/app/api/auth): `Project/app/api/auth`
- [Auth logic](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/lib/admin-auth.ts): `Project/lib/admin-auth.ts`

### Persistence and integrations

- [Site content files](https://github.com/dave-olu/ultrasonic-nigeria/blob/main/Project/data/site-content.json): `Project/data/site-content.json`
- **Auth storage**
- **Resend email**

### Other components

- **Visitor**
- **Administrator**
- **WhatsApp**

## Connections

- Visitor → Home route: opens
- Home route → Content repository: loads content (evidence: `Project/app/page.tsx`)
- Home route → Home experience: renders (evidence: `Project/app/page.tsx`)
- Home experience → FAQ section: renders (evidence: `Project/components/site-home.tsx`)
- Home experience → WhatsApp: opens quote (evidence: `Project/components/site-home.tsx`)
- Content API → Auth logic: checks session (evidence: `Project/app/api/site-content/route.ts`)
- Content API → Content repository: reads and saves (evidence: `Project/app/api/site-content/route.ts`)
- Content repository → Site content files: reads and writes (evidence: `Project/lib/site-data.ts`)
- Administrator → Admin dashboard: manages content
- Admin dashboard → Content API: requests changes
- Admin auth forms → Signup endpoint: submits signup
- Admin auth forms → Password login: submits credentials
- Admin auth forms → Email-link request: requests link
- Admin auth forms → Email-link login: submits token
- Signup endpoint → Auth logic: creates account (evidence: `Project/app/api/auth/signup/route.ts`)
- Password login → Auth logic: verifies credentials (evidence: `Project/app/api/auth/login/route.ts`)
- Email-link request → Auth logic: creates token (evidence: `Project/app/api/auth/email-link/route.ts`)
- Email-link request → Resend email: sends email (evidence: `Project/app/api/auth/email-link/route.ts`)
- Email-link login → Auth logic: consumes token (evidence: `Project/app/api/auth/email-login/route.ts`)
- Session endpoint → Auth logic: reads session (evidence: `Project/app/api/auth/session/route.ts`)
- Auth logic → Auth storage: persists auth data
- Administrator → Other auth routes: uses account tools
