# ux-finesse/noah-legal-website architecture

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

- Interactive diagram: https://gitdiagram.com/ux-finesse/noah-legal-website
- Repository: https://github.com/ux-finesse/noah-legal-website

## Overview

NOAH LEGAL is a public law-firm website with an embedded Sanity editorial CMS. Visitors browse firm expertise, lawyers, insights and open roles, and can submit contact or newsletter forms. Content is fetched through a shared Sanity-or-fallback layer; editors manage the content models in Studio. The graph includes documented content types and careers, firm and legal pages from the README, but sampled excerpts do not show every page implementation or the full Studio wiring.

Main entry points: [`lib/content.ts`](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/content.ts) (Content queries), [`app/(site)/insights`](https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/insights) (Insights pages), [`lib/validation.ts`](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/validation.ts) (Form validation), [`app/(site)/page.tsx`](https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/page.tsx) (Homepage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_home["Homepage<br/>[page.tsx]"]
  node_expertise["Expertise pages"]
  node_people["People pages"]
  node_insights["Insights pages"]
  node_firm["Firm and legal<br/>[page.tsx]"]
  node_careers["Careers<br/>[page.tsx]"]
  node_header["Site navigation<br/>[Header.tsx]"]
  node_insightbrowser["Insights browser"]
  node_joblist["Job listings<br/>[JobsList.tsx]"]
end

subgraph group_content["Content platform"]
  node_studio["Sanity Studio<br/>[page.tsx]"]
  node_schemas["CMS schemas"]
  node_sanity[("Sanity CMS")]
end

subgraph group_engagement["Visitor engagement"]
  node_contactform["Contact form<br/>[forms.tsx]"]
  node_subscribeform["Subscribe form<br/>[forms.tsx]"]
  node_contactapi["Contact endpoint<br/>[route.ts]"]
  node_subscribeapi["Subscribe endpoint<br/>[route.ts]"]
  node_resend["Resend"]
end

subgraph group_internal["Shared runtime"]
  node_contentapi["Content queries<br/>[content.ts]"]
  node_fallback["Placeholder content<br/>[fallback.ts]"]
  node_validation["Form validation<br/>[validation.ts]"]
  node_mail["Email delivery<br/>[mail.ts]"]
  node_portablebody["Rich text renderer<br/>[PortableBody.tsx]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"opens site"| node_home
node_visitor -->|"browses"| node_expertise
node_visitor -->|"browses"| node_people
node_visitor -->|"browses"| node_insights
node_visitor -->|"browses"| node_firm
node_visitor -->|"browses"| node_careers
node_home -->|"fetches content"| node_contentapi
node_expertise -->|"fetches content"| node_contentapi
node_people -->|"fetches content"| node_contentapi
node_insights -->|"fetches content"| node_contentapi
node_firm -->|"fetches content"| node_contentapi
node_careers -->|"fetches roles"| node_contentapi
node_home -->|"renders"| node_header
node_insights -->|"renders"| node_insightbrowser
node_careers -->|"renders"| node_joblist
node_insights -->|"renders body"| node_portablebody
node_studio -->|"configures"| node_schemas
node_schemas -->|"defines content models"| node_sanity
node_contentapi -->|"queries"| node_sanity
node_contentapi -->|"falls back to"| node_fallback
node_visitor -->|"submits inquiry"| node_contactform
node_visitor -->|"subscribes"| node_subscribeform
node_contactform -->|"validates fields"| node_validation
node_subscribeform -->|"validates email"| node_validation
node_contactform -->|"posts inquiry"| node_contactapi
node_subscribeform -->|"posts signup"| node_subscribeapi
node_contactapi -->|"checks input"| node_validation
node_subscribeapi -->|"checks input"| node_validation
node_contactapi -->|"sends message"| node_mail
node_subscribeapi -->|"sends signup"| node_mail
node_mail -.->|"delivers email"| node_resend

click node_home "https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/page.tsx"
click node_expertise "https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/expertise"
click node_people "https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/people"
click node_insights "https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/insights"
click node_firm "https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/firm/page.tsx"
click node_careers "https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/careers/page.tsx"
click node_header "https://github.com/ux-finesse/noah-legal-website/blob/main/components/Header.tsx"
click node_insightbrowser "https://github.com/ux-finesse/noah-legal-website/blob/main/components/InsightsBrowser.tsx"
click node_joblist "https://github.com/ux-finesse/noah-legal-website/blob/main/components/JobsList.tsx"
click node_studio "https://github.com/ux-finesse/noah-legal-website/blob/main/app/studio/%5B%5B...tool%5D%5D/page.tsx"
click node_schemas "https://github.com/ux-finesse/noah-legal-website/tree/main/sanity/schemaTypes"
click node_contentapi "https://github.com/ux-finesse/noah-legal-website/blob/main/lib/content.ts"
click node_fallback "https://github.com/ux-finesse/noah-legal-website/blob/main/lib/fallback.ts"
click node_contactform "https://github.com/ux-finesse/noah-legal-website/blob/main/components/forms.tsx"
click node_subscribeform "https://github.com/ux-finesse/noah-legal-website/blob/main/components/forms.tsx"
click node_contactapi "https://github.com/ux-finesse/noah-legal-website/blob/main/app/api/contact/route.ts"
click node_subscribeapi "https://github.com/ux-finesse/noah-legal-website/blob/main/app/api/subscribe/route.ts"
click node_validation "https://github.com/ux-finesse/noah-legal-website/blob/main/lib/validation.ts"
click node_mail "https://github.com/ux-finesse/noah-legal-website/blob/main/lib/mail.ts"
click node_portablebody "https://github.com/ux-finesse/noah-legal-website/blob/main/components/PortableBody.tsx"

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,node_expertise,node_people,node_insights,node_firm,node_careers,node_header,node_insightbrowser,node_joblist toneBlue
class node_studio,node_schemas,node_sanity toneAmber
class node_contactform,node_subscribeform,node_contactapi,node_subscribeapi,node_resend toneMint
class node_contentapi,node_fallback,node_validation,node_mail,node_portablebody toneRose
class node_visitor toneIndigo
```

## Components

### Public website

- [Homepage](https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/page.tsx): `app/(site)/page.tsx`
- [Expertise pages](https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/expertise): `app/(site)/expertise`
- [People pages](https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/people): `app/(site)/people`
- [Insights pages](https://github.com/ux-finesse/noah-legal-website/tree/main/app/(site)/insights): `app/(site)/insights`
- [Firm and legal](https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/firm/page.tsx): `app/(site)/firm/page.tsx`
- [Careers](https://github.com/ux-finesse/noah-legal-website/blob/main/app/(site)/careers/page.tsx): `app/(site)/careers/page.tsx`
- [Site navigation](https://github.com/ux-finesse/noah-legal-website/blob/main/components/Header.tsx): `components/Header.tsx`
- [Insights browser](https://github.com/ux-finesse/noah-legal-website/blob/main/components/InsightsBrowser.tsx): `components/InsightsBrowser.tsx`
- [Job listings](https://github.com/ux-finesse/noah-legal-website/blob/main/components/JobsList.tsx): `components/JobsList.tsx`

### Content platform

- [Sanity Studio](https://github.com/ux-finesse/noah-legal-website/blob/main/app/studio/%5B%5B...tool%5D%5D/page.tsx): `app/studio/[[...tool]]/page.tsx`
- [CMS schemas](https://github.com/ux-finesse/noah-legal-website/tree/main/sanity/schemaTypes): `sanity/schemaTypes`
- **Sanity CMS**

### Visitor engagement

- [Contact form](https://github.com/ux-finesse/noah-legal-website/blob/main/components/forms.tsx): `components/forms.tsx`
- [Subscribe form](https://github.com/ux-finesse/noah-legal-website/blob/main/components/forms.tsx): `components/forms.tsx`
- [Contact endpoint](https://github.com/ux-finesse/noah-legal-website/blob/main/app/api/contact/route.ts): `app/api/contact/route.ts`
- [Subscribe endpoint](https://github.com/ux-finesse/noah-legal-website/blob/main/app/api/subscribe/route.ts): `app/api/subscribe/route.ts`
- **Resend**

### Shared runtime

- [Content queries](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/content.ts): `lib/content.ts`
- [Placeholder content](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/fallback.ts): `lib/fallback.ts`
- [Form validation](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/validation.ts): `lib/validation.ts`
- [Email delivery](https://github.com/ux-finesse/noah-legal-website/blob/main/lib/mail.ts): `lib/mail.ts`
- [Rich text renderer](https://github.com/ux-finesse/noah-legal-website/blob/main/components/PortableBody.tsx): `components/PortableBody.tsx`

### Other components

- **Site visitor**

## Connections

- Site visitor → Homepage: opens site (evidence: `README.md`)
- Site visitor → Expertise pages: browses (evidence: `README.md`)
- Site visitor → People pages: browses (evidence: `README.md`)
- Site visitor → Insights pages: browses (evidence: `README.md`)
- Site visitor → Firm and legal: browses (evidence: `README.md`)
- Site visitor → Careers: browses (evidence: `README.md`)
- Homepage → Content queries: fetches content (evidence: `app/(site)/page.tsx`)
- Expertise pages → Content queries: fetches content (evidence: `app/(site)/expertise/page.tsx`)
- People pages → Content queries: fetches content (evidence: `README.md`)
- Insights pages → Content queries: fetches content (evidence: `app/(site)/insights/[slug]/page.tsx`)
- Firm and legal → Content queries: fetches content (evidence: `app/(site)/firm/page.tsx`)
- Careers → Content queries: fetches roles (evidence: `app/(site)/careers/page.tsx`)
- Homepage → Site navigation: renders (evidence: `app/(site)/page.tsx`)
- Insights pages → Insights browser: renders (evidence: `app/(site)/insights/page.tsx`)
- Careers → Job listings: renders (evidence: `app/(site)/careers/page.tsx`)
- Insights pages → Rich text renderer: renders body (evidence: `app/(site)/insights/[slug]/page.tsx`)
- Sanity Studio → CMS schemas: configures
- CMS schemas → Sanity CMS: defines content models (evidence: `README.md`)
- Content queries → Sanity CMS: queries (evidence: `lib/content.ts`)
- Content queries → Placeholder content: falls back to (evidence: `lib/content.ts`)
- Site visitor → Contact form: submits inquiry (evidence: `README.md`)
- Site visitor → Subscribe form: subscribes (evidence: `README.md`)
- Contact form → Form validation: validates fields (evidence: `components/forms.tsx`)
- Subscribe form → Form validation: validates email (evidence: `components/forms.tsx`)
- Contact form → Contact endpoint: posts inquiry (evidence: `components/forms.tsx`)
- Subscribe form → Subscribe endpoint: posts signup (evidence: `components/forms.tsx`)
- Contact endpoint → Form validation: checks input (evidence: `app/api/contact/route.ts`)
- Subscribe endpoint → Form validation: checks input (evidence: `app/api/subscribe/route.ts`)
- Contact endpoint → Email delivery: sends message (evidence: `app/api/contact/route.ts`)
- Subscribe endpoint → Email delivery: sends signup (evidence: `app/api/subscribe/route.ts`)
- Email delivery → Resend: delivers email (evidence: `README.md`)
