# aidanschreder/aidan-website-2 architecture

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

- Interactive diagram: https://gitdiagram.com/aidanschreder/aidan-website-2
- Repository: https://github.com/aidanschreder/aidan-website-2

## Overview

aidanschreder.com is an audience-specific portfolio site: visitors enter through section links, browse engineering, design, photography or 3D work and section-specific about pages, and can contact the owner. Its internal workflows also collect privacy-conscious analytics and administer counts and messages through private /stats. README documents all four portfolio modes, photography collections, contact delivery, and analytics; unsampled feature wiring is shown only where documentation supports it.

Main entry points: [`app/page.tsx`](https://github.com/aidanschreder/aidan-website-2/blob/main/app/page.tsx) (Section Links), [`app/api/track/route.ts`](https://github.com/aidanschreder/aidan-website-2/blob/main/app/api/track/route.ts) (Analytics Tracker), [`app/photography/page.tsx`](https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/page.tsx) (Photography), [`app/3d/page.tsx`](https://github.com/aidanschreder/aidan-website-2/blob/main/app/3d/page.tsx) (3D Portfolio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio Sections"]
  node_root["Section Links<br/>[page.tsx]"]
  node_engineering["Engineering<br/>[page.tsx]"]
  node_design["Design<br/>[page.tsx]"]
  node_designproject["Design Project<br/>[page.tsx]"]
  node_photography["Photography<br/>[page.tsx]"]
  node_collection["Photo Collection<br/>[page.tsx]"]
  node_three["3D Portfolio<br/>[page.tsx]"]
  node_threework["3D Work Viewer<br/>[Work.tsx]"]
  node_content["Portfolio Content<br/>[engineering.ts]"]
  node_photoassets["Photo Assets<br/>[pack.ts]"]
end

subgraph group_engagement["Visitor Actions"]
  node_contact["Contact Form<br/>[MessageForm.tsx]"]
  node_messageapi["Message Endpoint<br/>[route.ts]"]
  node_messagelib["Message Services<br/>[messages.ts]"]
  node_telegram{{"Telegram Bot"}}
end

subgraph group_measurement["Analytics"]
  node_analytics["Analytics Tracker<br/>[route.ts]"]
  node_tracklib["Tracking Client<br/>[track.ts]"]
  node_analyticslib["Event Aggregation<br/>[analytics.ts]"]
  node_store[("Analytics Store<br/>[store.ts]")]
  node_ga["Google Analytics"]
  node_clarity["Microsoft Clarity"]
end

subgraph group_admin["Private Stats"]
  node_stats["Stats Dashboard<br/>[page.tsx]"]
  node_auth["Stats Authentication<br/>[auth.ts]"]
  node_actions["Stats Actions<br/>[actions.ts]"]
  node_reset["Reset Controls<br/>[ResetStats.tsx]"]
end

node_visitor(("Visitor"))
node_upstash[("Upstash Redis")]

node_visitor -->|"opens"| node_root
node_visitor -->|"browses"| node_engineering
node_visitor -->|"browses"| node_design
node_visitor -->|"browses"| node_photography
node_visitor -->|"browses"| node_three
node_root -->|"links to"| node_engineering
node_root -->|"links to"| node_design
node_root -->|"links to"| node_photography
node_root -->|"links to"| node_three
node_engineering -->|"reads"| node_content
node_design -->|"reads"| node_content
node_designproject -->|"reads"| node_content
node_photography -->|"packs"| node_photoassets
node_photography -->|"links to"| node_collection
node_three -->|"reads"| node_content
node_three -->|"renders"| node_threework
node_visitor -->|"opens"| node_designproject
node_visitor -->|"opens"| node_collection
node_visitor -->|"submits"| node_contact
node_contact -->|"posts"| node_messageapi
node_messageapi -->|"calls"| node_messagelib
node_messagelib -.->|"notifies"| node_telegram
node_messagelib -->|"saves"| node_store
node_visitor -->|"sends events"| node_analytics
node_tracklib -->|"posts"| node_analytics
node_analytics -->|"builds commands"| node_analyticslib
node_analytics -->|"executes commands"| node_store
node_analytics -.->|"stores counts"| node_upstash
node_visitor -.->|"visits pages"| node_ga
node_visitor -.->|"visits pages"| node_clarity
node_visitor -->|"opens"| node_stats
node_stats -->|"checks access"| node_auth
node_stats -->|"loads data"| node_actions
node_actions -->|"reads and writes"| node_store
node_reset -->|"invokes reset"| node_actions
node_store -.->|"uses"| node_upstash

click node_root "https://github.com/aidanschreder/aidan-website-2/blob/main/app/page.tsx"
click node_engineering "https://github.com/aidanschreder/aidan-website-2/blob/main/app/engineering/page.tsx"
click node_design "https://github.com/aidanschreder/aidan-website-2/blob/main/app/design/page.tsx"
click node_designproject "https://github.com/aidanschreder/aidan-website-2/blob/main/app/design/%5Bslug%5D/page.tsx"
click node_photography "https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/page.tsx"
click node_collection "https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/%5Bslug%5D/page.tsx"
click node_three "https://github.com/aidanschreder/aidan-website-2/blob/main/app/3d/page.tsx"
click node_threework "https://github.com/aidanschreder/aidan-website-2/blob/main/app/3d/Work.tsx"
click node_content "https://github.com/aidanschreder/aidan-website-2/blob/main/content/engineering.ts"
click node_photoassets "https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/pack.ts"
click node_contact "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/MessageForm.tsx"
click node_messageapi "https://github.com/aidanschreder/aidan-website-2/blob/main/app/api/message/route.ts"
click node_messagelib "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/messages.ts"
click node_analytics "https://github.com/aidanschreder/aidan-website-2/blob/main/app/api/track/route.ts"
click node_tracklib "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/track.ts"
click node_analyticslib "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/analytics.ts"
click node_store "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/store.ts"
click node_ga "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/analytics/GoogleAnalytics.tsx"
click node_clarity "https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/analytics/MicrosoftClarity.tsx"
click node_stats "https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/page.tsx"
click node_auth "https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/auth.ts"
click node_actions "https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/actions.ts"
click node_reset "https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/ResetStats.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_root,node_engineering,node_design,node_designproject,node_photography,node_collection,node_three,node_threework,node_content,node_photoassets toneBlue
class node_contact,node_messageapi,node_messagelib,node_telegram,node_upstash toneAmber
class node_analytics,node_tracklib,node_analyticslib,node_store,node_ga,node_clarity toneMint
class node_stats,node_auth,node_actions,node_reset toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio Sections

- [Section Links](https://github.com/aidanschreder/aidan-website-2/blob/main/app/page.tsx): `app/page.tsx`
- [Engineering](https://github.com/aidanschreder/aidan-website-2/blob/main/app/engineering/page.tsx): `app/engineering/page.tsx`
- [Design](https://github.com/aidanschreder/aidan-website-2/blob/main/app/design/page.tsx): `app/design/page.tsx`
- [Design Project](https://github.com/aidanschreder/aidan-website-2/blob/main/app/design/%5Bslug%5D/page.tsx): `app/design/[slug]/page.tsx`
- [Photography](https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/page.tsx): `app/photography/page.tsx`
- [Photo Collection](https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/%5Bslug%5D/page.tsx): `app/photography/[slug]/page.tsx`
- [3D Portfolio](https://github.com/aidanschreder/aidan-website-2/blob/main/app/3d/page.tsx): `app/3d/page.tsx`
- [3D Work Viewer](https://github.com/aidanschreder/aidan-website-2/blob/main/app/3d/Work.tsx): `app/3d/Work.tsx`
- [Portfolio Content](https://github.com/aidanschreder/aidan-website-2/blob/main/content/engineering.ts): `content/engineering.ts`
- [Photo Assets](https://github.com/aidanschreder/aidan-website-2/blob/main/app/photography/pack.ts): `app/photography/pack.ts`

### Visitor Actions

- [Contact Form](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/MessageForm.tsx): `app/_components/MessageForm.tsx`
- [Message Endpoint](https://github.com/aidanschreder/aidan-website-2/blob/main/app/api/message/route.ts): `app/api/message/route.ts`
- [Message Services](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/messages.ts): `app/_lib/messages.ts`
- **Telegram Bot**

### Analytics

- [Analytics Tracker](https://github.com/aidanschreder/aidan-website-2/blob/main/app/api/track/route.ts): `app/api/track/route.ts`
- [Tracking Client](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/track.ts): `app/_lib/track.ts`
- [Event Aggregation](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/analytics.ts): `app/_lib/analytics.ts`
- [Analytics Store](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_lib/store.ts): `app/_lib/store.ts`
- [Google Analytics](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/analytics/GoogleAnalytics.tsx): `app/_components/analytics/GoogleAnalytics.tsx`
- [Microsoft Clarity](https://github.com/aidanschreder/aidan-website-2/blob/main/app/_components/analytics/MicrosoftClarity.tsx): `app/_components/analytics/MicrosoftClarity.tsx`

### Private Stats

- [Stats Dashboard](https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/page.tsx): `app/stats/page.tsx`
- [Stats Authentication](https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/auth.ts): `app/stats/auth.ts`
- [Stats Actions](https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/actions.ts): `app/stats/actions.ts`
- [Reset Controls](https://github.com/aidanschreder/aidan-website-2/blob/main/app/stats/ResetStats.tsx): `app/stats/ResetStats.tsx`

### Other components

- **Visitor**
- **Upstash Redis**

## Connections

- Visitor → Section Links: opens
- Visitor → Engineering: browses
- Visitor → Design: browses
- Visitor → Photography: browses
- Visitor → 3D Portfolio: browses
- Section Links → Engineering: links to
- Section Links → Design: links to
- Section Links → Photography: links to
- Section Links → 3D Portfolio: links to
- Engineering → Portfolio Content: reads
- Design → Portfolio Content: reads
- Design Project → Portfolio Content: reads
- Photography → Photo Assets: packs
- Photography → Photo Collection: links to
- 3D Portfolio → Portfolio Content: reads
- 3D Portfolio → 3D Work Viewer: renders
- Visitor → Design Project: opens
- Visitor → Photo Collection: opens
- Visitor → Contact Form: submits
- Contact Form → Message Endpoint: posts
- Message Endpoint → Message Services: calls
- Message Services → Telegram Bot: notifies
- Message Services → Analytics Store: saves
- Visitor → Analytics Tracker: sends events
- Tracking Client → Analytics Tracker: posts
- Analytics Tracker → Event Aggregation: builds commands
- Analytics Tracker → Analytics Store: executes commands
- Analytics Tracker → Upstash Redis: stores counts
- Visitor → Google Analytics: visits pages
- Visitor → Microsoft Clarity: visits pages
- Visitor → Stats Dashboard: opens
- Stats Dashboard → Stats Authentication: checks access
- Stats Dashboard → Stats Actions: loads data
- Stats Actions → Analytics Store: reads and writes
- Reset Controls → Stats Actions: invokes reset
- Analytics Store → Upstash Redis: uses
