# tom-ai/sophia-website architecture

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

- Interactive diagram: https://gitdiagram.com/tom-ai/sophia-website
- Repository: https://github.com/tom-ai/sophia-website

## Overview

This is a musician’s portfolio and contact website. Visitors view the home page’s introduction, featured collaborators and recent posts, then can open collaborator-specific gig details or submit a contact message. Server-rendered page components fetch content from DatoCMS; shared presentation components render structured text and post cards. The README also documents the Formspree contact integration. The graph reflects the shown page calls and documented CMS/Formspree behavior; other route or layout wiring is not expanded beyond visible evidence.

Main entry points: [`src/app/latest-work/[slug]/page.tsx`](https://github.com/tom-ai/sophia-website/blob/main/src/app/latest-work/%5Bslug%5D/page.tsx) (Collaborator detail), [`src/app/components/Collaborators.tsx`](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/Collaborators.tsx) (Featured collaborators), [`src/app/page.tsx`](https://github.com/tom-ai/sophia-website/blob/main/src/app/page.tsx) (Hero and about), [`src/app/lib/datocms.js`](https://github.com/tom-ai/sophia-website/blob/main/src/app/lib/datocms.js) (CMS request)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Website pages"]
  node_home["Home page<br/>[page.tsx]"]
  node_work["Collaborator detail<br/>[page.tsx]"]
  node_contactpage["Contact page<br/>[page.tsx]"]
end

subgraph group_content["CMS content"]
  node_cms[("DatoCMS")]
  node_request["CMS request<br/>[datocms.js]"]
  node_collaborators["Featured collaborators<br/>[Collaborators.tsx]"]
  node_heroabout["Hero and about<br/>[page.tsx]"]
  node_posts["Gig posts<br/>[page.tsx]"]
end

subgraph group_presentation["Presentation"]
  node_postlist["Post list<br/>[PostList.tsx]"]
  node_bodytext["Structured text<br/>[BodyText.tsx]"]
  node_sectionheader["Section header<br/>[SectionHeader.tsx]"]
end

subgraph group_contact["Contact"]
  node_contactform["Contact form<br/>[ContactForm.tsx]"]
  node_formspree["Formspree"]
end

node_visitor(("Site visitor"))

node_visitor -->|"views"| node_home
node_visitor -->|"opens"| node_work
node_visitor -->|"opens"| node_contactpage
node_home -->|"renders"| node_heroabout
node_home -->|"renders"| node_collaborators
node_heroabout -->|"fetches"| node_request
node_collaborators -->|"fetches"| node_request
node_work -->|"fetches"| node_request
node_request -->|"queries"| node_cms
node_collaborators -->|"renders"| node_postlist
node_work -->|"renders"| node_posts
node_posts -->|"renders"| node_postlist
node_heroabout -->|"renders"| node_bodytext
node_work -->|"renders"| node_bodytext
node_heroabout -->|"renders"| node_sectionheader
node_collaborators -->|"renders"| node_sectionheader
node_contactpage -->|"renders"| node_contactform
node_contactform -.->|"submits"| node_formspree

click node_home "https://github.com/tom-ai/sophia-website/blob/main/src/app/page.tsx"
click node_work "https://github.com/tom-ai/sophia-website/blob/main/src/app/latest-work/%5Bslug%5D/page.tsx"
click node_contactpage "https://github.com/tom-ai/sophia-website/blob/main/src/app/contact/page.tsx"
click node_request "https://github.com/tom-ai/sophia-website/blob/main/src/app/lib/datocms.js"
click node_collaborators "https://github.com/tom-ai/sophia-website/blob/main/src/app/components/Collaborators.tsx"
click node_heroabout "https://github.com/tom-ai/sophia-website/blob/main/src/app/page.tsx"
click node_posts "https://github.com/tom-ai/sophia-website/blob/main/src/app/latest-work/%5Bslug%5D/page.tsx"
click node_postlist "https://github.com/tom-ai/sophia-website/blob/main/src/app/components/PostList.tsx"
click node_bodytext "https://github.com/tom-ai/sophia-website/blob/main/src/app/components/BodyText.tsx"
click node_sectionheader "https://github.com/tom-ai/sophia-website/blob/main/src/app/components/SectionHeader.tsx"
click node_contactform "https://github.com/tom-ai/sophia-website/blob/main/src/app/components/ContactForm.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_work,node_contactpage toneBlue
class node_cms,node_request,node_collaborators,node_heroabout,node_posts toneAmber
class node_postlist,node_bodytext,node_sectionheader toneMint
class node_contactform,node_formspree toneRose
class node_visitor toneIndigo
```

## Components

### Website pages

- [Home page](https://github.com/tom-ai/sophia-website/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Collaborator detail](https://github.com/tom-ai/sophia-website/blob/main/src/app/latest-work/%5Bslug%5D/page.tsx): `src/app/latest-work/[slug]/page.tsx`
- [Contact page](https://github.com/tom-ai/sophia-website/blob/main/src/app/contact/page.tsx): `src/app/contact/page.tsx`

### CMS content

- **DatoCMS**
- [CMS request](https://github.com/tom-ai/sophia-website/blob/main/src/app/lib/datocms.js): `src/app/lib/datocms.js`
- [Featured collaborators](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/Collaborators.tsx): `src/app/components/Collaborators.tsx`
- [Hero and about](https://github.com/tom-ai/sophia-website/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Gig posts](https://github.com/tom-ai/sophia-website/blob/main/src/app/latest-work/%5Bslug%5D/page.tsx): `src/app/latest-work/[slug]/page.tsx`

### Presentation

- [Post list](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/PostList.tsx): `src/app/components/PostList.tsx`
- [Structured text](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/BodyText.tsx): `src/app/components/BodyText.tsx`
- [Section header](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/SectionHeader.tsx): `src/app/components/SectionHeader.tsx`

### Contact

- [Contact form](https://github.com/tom-ai/sophia-website/blob/main/src/app/components/ContactForm.tsx): `src/app/components/ContactForm.tsx`
- **Formspree**

### Other components

- **Site visitor**

## Connections

- Site visitor → Home page: views
- Site visitor → Collaborator detail: opens
- Site visitor → Contact page: opens
- Home page → Hero and about: renders (evidence: `src/app/page.tsx`)
- Home page → Featured collaborators: renders (evidence: `src/app/page.tsx`)
- Hero and about → CMS request: fetches (evidence: `src/app/page.tsx`)
- Featured collaborators → CMS request: fetches (evidence: `src/app/components/Collaborators.tsx`)
- Collaborator detail → CMS request: fetches (evidence: `src/app/latest-work/[slug]/page.tsx`)
- CMS request → DatoCMS: queries (evidence: `src/app/lib/datocms.js`)
- Featured collaborators → Post list: renders (evidence: `src/app/components/Collaborators.tsx`)
- Collaborator detail → Gig posts: renders (evidence: `src/app/latest-work/[slug]/page.tsx`)
- Gig posts → Post list: renders (evidence: `src/app/latest-work/[slug]/page.tsx`)
- Hero and about → Structured text: renders (evidence: `src/app/page.tsx`)
- Collaborator detail → Structured text: renders (evidence: `src/app/latest-work/[slug]/page.tsx`)
- Hero and about → Section header: renders (evidence: `src/app/page.tsx`)
- Featured collaborators → Section header: renders (evidence: `src/app/components/Collaborators.tsx`)
- Contact page → Contact form: renders (evidence: `src/app/contact/page.tsx`)
- Contact form → Formspree: submits (evidence: `README.md`)
