# lukex2010/ffrastenfeld2 architecture

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

- Interactive diagram: https://gitdiagram.com/lukex2010/ffrastenfeld2
- Repository: https://github.com/lukex2010/ffrastenfeld2

## Overview

This repository is the FF Rastenfeld website and its supporting editorial tools: a Blazor frontend for posts, team and vehicle content, an infoscreen, and administration, alongside serverless APIs and a WhatsApp publishing bot. The main authoring workflow is WhatsApp input, optional web research, AI draft generation, review, and publishing; the admin API also supports drafts, AI writing and publishing. The source index establishes several module links, but unsampled implementations and runtime HTTP wiring limit some connections.

Main entry points: [`whatsapp-bot/src/index.js`](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/index.js) (Bot workflow), [`wwwroot/js/app.js`](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/app.js) (Website UI), [`whatsapp-bot/src/ai/postGenerator.js`](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/postGenerator.js) (Draft generation), [`server/infoscreen.mjs`](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/infoscreen.mjs) (Infoscreen API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public Website"]
  node_webapp["Website UI<br/>[app.js]"]
  node_posts["Post content<br/>[DataService.cs]"]
  node_postmodels["Post models<br/>[Models.cs]"]
  node_gallery["Photo gallery<br/>[photo-gallery.js]"]
  node_gestures["Photo gestures<br/>[photo-gestures.js]"]
  node_team["Team viewer<br/>[team-viewer.js]"]
  node_webseo["SEO behavior<br/>[seo.js]"]
end

subgraph group_screen["Infoscreen"]
  node_screenui["Infoscreen UI"]
  node_screenclient["Infoscreen client"]
  node_screenapi["Infoscreen API<br/>[infoscreen.mjs]"]
  node_regional["Regional data<br/>[wastl.mjs]"]
  node_weather["Weather client"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin editor<br/>[editor.js]"]
  node_adminclient["Admin API client<br/>[AdminApiClient.cs]"]
  node_adminserver["Admin API<br/>[admin.mjs]"]
  node_adminhost["Admin host<br/>[Program.cs]"]
  node_gitstore[("Git storage<br/>[github.mjs]")]
  node_budget["Budget data<br/>[budget.mjs]"]
end

subgraph group_bot["WhatsApp Publishing"]
  node_bot["Bot workflow<br/>[index.js]"]
  node_research["Web research<br/>[webSearch.js]"]
  node_generator["Draft generation<br/>[postGenerator.js]"]
  node_gemini["Gemini client<br/>[geminiClient.js]"]
  node_ollama["Ollama client<br/>[ollamaClient.js]"]
  node_review["Review commands<br/>[commands.js]"]
  node_publisher["Post publisher<br/>[publisher.js]"]
  node_poststore[("Draft store<br/>[postStore.js]")]
  node_gitactions["Git actions<br/>[gitActions.js]"]
end

node_visitor(("Website visitor"))
node_adminuser(("Editor"))
node_wauser(("WhatsApp author"))

node_visitor -->|"uses"| node_webapp
node_webapp -.->|"loads posts"| node_posts
node_posts -->|"deserializes"| node_postmodels
node_webapp -.->|"opens photos"| node_gallery
node_gallery -->|"uses gestures"| node_gestures
node_team -->|"uses gestures"| node_gestures
node_screenui -->|"reads data"| node_posts
node_screenui -->|"requests API"| node_screenclient
node_screenapi -->|"reads content"| node_gitstore
node_screenapi -->|"loads regional data"| node_regional
node_adminuser -.->|"edits content"| node_adminui
node_adminui -.->|"uses API client"| node_adminclient
node_adminclient -.->|"calls admin API"| node_adminhost
node_adminserver -->|"stores changes"| node_gitstore
node_adminserver -->|"reads and validates"| node_screenapi
node_wauser -.->|"sends material"| node_bot
node_bot -->|"parses commands"| node_review
node_bot -->|"runs research"| node_research
node_bot -->|"creates drafts"| node_generator
node_generator -->|"uses model"| node_gemini
node_generator -->|"uses model"| node_ollama
node_bot -->|"publishes draft"| node_publisher
node_publisher -->|"uses draft store"| node_poststore
node_bot -->|"runs Git actions"| node_gitactions

click node_webapp "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/app.js"
click node_posts "https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/DataService.cs"
click node_postmodels "https://github.com/lukex2010/ffrastenfeld2/blob/main/Models/Models.cs"
click node_gallery "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/photo-gallery.js"
click node_gestures "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/photo-gestures.js"
click node_team "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/team-viewer.js"
click node_webseo "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/seo.js"
click node_screenui "https://github.com/lukex2010/ffrastenfeld2/blob/main/Pages/InfoscreenV2.razor.cs"
click node_screenclient "https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/InfoscreenClient.cs"
click node_screenapi "https://github.com/lukex2010/ffrastenfeld2/blob/main/server/infoscreen.mjs"
click node_regional "https://github.com/lukex2010/ffrastenfeld2/blob/main/server/wastl.mjs"
click node_weather "https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/InfoscreenWeather.cs"
click node_adminui "https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/admin/editor.js"
click node_adminclient "https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/AdminApiClient.cs"
click node_adminserver "https://github.com/lukex2010/ffrastenfeld2/blob/main/server/admin.mjs"
click node_adminhost "https://github.com/lukex2010/ffrastenfeld2/blob/main/AdminServer/Program.cs"
click node_gitstore "https://github.com/lukex2010/ffrastenfeld2/blob/main/server/github.mjs"
click node_budget "https://github.com/lukex2010/ffrastenfeld2/blob/main/server/budget.mjs"
click node_bot "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/index.js"
click node_research "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/search/webSearch.js"
click node_generator "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/postGenerator.js"
click node_gemini "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/geminiClient.js"
click node_ollama "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/ollamaClient.js"
click node_review "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/review/commands.js"
click node_publisher "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/website/publisher.js"
click node_poststore "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/website/postStore.js"
click node_gitactions "https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/git/gitActions.js"

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_webapp,node_posts,node_postmodels,node_gallery,node_gestures,node_team,node_webseo toneBlue
class node_screenui,node_screenclient,node_screenapi,node_regional,node_weather toneAmber
class node_adminui,node_adminclient,node_adminserver,node_adminhost,node_gitstore,node_budget toneMint
class node_bot,node_research,node_generator,node_gemini,node_ollama,node_review,node_publisher,node_poststore,node_gitactions toneRose
class node_visitor,node_adminuser,node_wauser toneIndigo
```

## Components

### Public Website

- [Website UI](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/app.js): `wwwroot/js/app.js`
- [Post content](https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/DataService.cs): `Services/DataService.cs`
- [Post models](https://github.com/lukex2010/ffrastenfeld2/blob/main/Models/Models.cs): `Models/Models.cs`
- [Photo gallery](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/photo-gallery.js): `wwwroot/js/photo-gallery.js`
- [Photo gestures](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/photo-gestures.js): `wwwroot/js/photo-gestures.js`
- [Team viewer](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/team-viewer.js): `wwwroot/js/team-viewer.js`
- [SEO behavior](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/js/seo.js): `wwwroot/js/seo.js`

### Infoscreen

- [Infoscreen UI](https://github.com/lukex2010/ffrastenfeld2/blob/main/Pages/InfoscreenV2.razor.cs): `Pages/InfoscreenV2.razor.cs`
- [Infoscreen client](https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/InfoscreenClient.cs): `Services/InfoscreenClient.cs`
- [Infoscreen API](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/infoscreen.mjs): `server/infoscreen.mjs`
- [Regional data](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/wastl.mjs): `server/wastl.mjs`
- [Weather client](https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/InfoscreenWeather.cs): `Services/InfoscreenWeather.cs`

### Administration

- [Admin editor](https://github.com/lukex2010/ffrastenfeld2/blob/main/wwwroot/admin/editor.js): `wwwroot/admin/editor.js`
- [Admin API client](https://github.com/lukex2010/ffrastenfeld2/blob/main/Services/AdminApiClient.cs): `Services/AdminApiClient.cs`
- [Admin API](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/admin.mjs): `server/admin.mjs`
- [Admin host](https://github.com/lukex2010/ffrastenfeld2/blob/main/AdminServer/Program.cs): `AdminServer/Program.cs`
- [Git storage](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/github.mjs): `server/github.mjs`
- [Budget data](https://github.com/lukex2010/ffrastenfeld2/blob/main/server/budget.mjs): `server/budget.mjs`

### WhatsApp Publishing

- [Bot workflow](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/index.js): `whatsapp-bot/src/index.js`
- [Web research](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/search/webSearch.js): `whatsapp-bot/src/search/webSearch.js`
- [Draft generation](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/postGenerator.js): `whatsapp-bot/src/ai/postGenerator.js`
- [Gemini client](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/geminiClient.js): `whatsapp-bot/src/ai/geminiClient.js`
- [Ollama client](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/ai/ollamaClient.js): `whatsapp-bot/src/ai/ollamaClient.js`
- [Review commands](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/review/commands.js): `whatsapp-bot/src/review/commands.js`
- [Post publisher](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/website/publisher.js): `whatsapp-bot/src/website/publisher.js`
- [Draft store](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/website/postStore.js): `whatsapp-bot/src/website/postStore.js`
- [Git actions](https://github.com/lukex2010/ffrastenfeld2/blob/main/whatsapp-bot/src/git/gitActions.js): `whatsapp-bot/src/git/gitActions.js`

### Other components

- **Website visitor**
- **Editor**
- **WhatsApp author**

## Connections

- Website visitor → Website UI: uses (evidence: `wwwroot/js/app.js`)
- Website UI → Post content: loads posts
- Post content → Post models: deserializes (evidence: `Services/DataService.cs`)
- Website UI → Photo gallery: opens photos
- Photo gallery → Photo gestures: uses gestures (evidence: `wwwroot/js/photo-gallery.js`)
- Team viewer → Photo gestures: uses gestures (evidence: `wwwroot/js/team-viewer.js`)
- Infoscreen UI → Post content: reads data (evidence: `Pages/InfoscreenV2.razor.cs`)
- Infoscreen UI → Infoscreen client: requests API (evidence: `Pages/InfoscreenV2.razor.cs`)
- Infoscreen API → Git storage: reads content (evidence: `server/infoscreen.mjs`)
- Infoscreen API → Regional data: loads regional data (evidence: `server/infoscreen.mjs`)
- Editor → Admin editor: edits content
- Admin editor → Admin API client: uses API client
- Admin API client → Admin host: calls admin API
- Admin API → Git storage: stores changes (evidence: `server/admin.mjs`)
- Admin API → Infoscreen API: reads and validates (evidence: `server/admin.mjs`)
- WhatsApp author → Bot workflow: sends material
- Bot workflow → Review commands: parses commands (evidence: `whatsapp-bot/src/index.js`)
- Bot workflow → Web research: runs research (evidence: `whatsapp-bot/src/index.js`)
- Bot workflow → Draft generation: creates drafts (evidence: `whatsapp-bot/src/index.js`)
- Draft generation → Gemini client: uses model (evidence: `whatsapp-bot/src/ai/postGenerator.js`)
- Draft generation → Ollama client: uses model (evidence: `whatsapp-bot/src/ai/postGenerator.js`)
- Bot workflow → Post publisher: publishes draft (evidence: `whatsapp-bot/src/index.js`)
- Post publisher → Draft store: uses draft store (evidence: `whatsapp-bot/src/website/publisher.js`)
- Bot workflow → Git actions: runs Git actions (evidence: `whatsapp-bot/src/index.js`)
