# tobsolutions/mbc-webseite architecture

> Architecture diagram of the GitHub repository tobsolutions/mbc-webseite, 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/tobsolutions/mbc-webseite
- Repository: https://github.com/tobsolutions/mbc-webseite

## Overview

This is a German community/club website with public-facing content, a member area and an administrator console. The main visitor workflow is to browse published pages, news, events and photo albums, with a contact form as an inquiry path. Members additionally access restricted pages, documents and events; administrators manage content, memberships, messages and settings. The source index supports the route-to-query and manager-to-action links shown here. Some routes and subsystems were not sampled, so their internal calls are omitted where they cannot be verified.

Main entry points: [`components/admin`](https://github.com/tobsolutions/mbc-webseite/tree/main/components/admin) (Content managers), [`app/(public)`](https://github.com/tobsolutions/mbc-webseite/tree/main/app/(public)) (Public pages), [`lib/session.ts`](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/session.ts) (Session and access), [`app/intern`](https://github.com/tobsolutions/mbc-webseite/tree/main/app/intern) (Member pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_public_routes["Public pages"]
  node_contact["Contact form<br/>[contact-form.tsx]"]
  node_public_views["Content views<br/>[news-grid.tsx]"]
  node_event_calendar["Event calendar<br/>[event-calendar.tsx]"]
  node_contact_action["Contact submission<br/>[contact.ts]"]
end

subgraph group_member["Member area"]
  node_member_routes["Member pages"]
  node_login["Login<br/>[page.tsx]"]
  node_file_route["File delivery<br/>[route.ts]"]
end

subgraph group_admin["Administration"]
  node_admin_routes["Admin pages"]
  node_admin_managers["Content managers"]
  node_delete_button["Delete control<br/>[delete-button.tsx]"]
  node_admin_actions["Admin actions<br/>[admin.ts]"]
  node_upload_routes["File endpoints<br/>[route.ts]"]
end

subgraph group_domain["Domain services"]
  node_queries["Content queries<br/>[queries.ts]"]
  node_database[("Database<br/>[index.ts]")]
  node_schema["Data schema<br/>[schema.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_session["Session and access<br/>[session.ts]"]
  node_roles["Role scopes<br/>[roles.ts]"]
  node_calendar_integration["Outlook calendar"]
  node_settings_keys["Settings keys<br/>[settings-keys.ts]"]
  node_format["Date and file formatting<br/>[format.ts]"]
end

subgraph group_shared["Shared UI"]
  node_hero["Page hero<br/>[page-hero.tsx]"]
  node_badge["Badge<br/>[badge.tsx]"]
  node_button["Button<br/>[button.tsx]"]
  node_card["Card<br/>[card.tsx]"]
  node_dialog["Dialog<br/>[dialog.tsx]"]
  node_input["Input<br/>[input.tsx]"]
  node_label["Label<br/>[label.tsx]"]
  node_textarea["Textarea<br/>[textarea.tsx]"]
end

node_visitor(("Visitor"))
node_member_actor(("Member"))
node_admin_actor(("Administrator"))

node_visitor -->|"browses"| node_public_routes
node_public_routes -->|"loads content"| node_queries
node_public_routes -->|"opens form"| node_contact
node_contact -.->|"submits message"| node_contact_action
node_public_routes -->|"renders content"| node_public_views
node_public_routes -->|"renders events"| node_event_calendar
node_public_routes -->|"renders hero"| node_hero
node_member_actor -->|"signs in"| node_login
node_login -->|"checks session"| node_session
node_member_actor -->|"views restricted content"| node_member_routes
node_member_routes -->|"checks access"| node_session
node_member_routes -->|"loads member content"| node_queries
node_member_routes -->|"renders events"| node_event_calendar
node_member_routes -->|"loads calendar"| node_calendar_integration
node_admin_actor -->|"manages site"| node_admin_routes
node_admin_routes -->|"loads records"| node_queries
node_admin_routes -->|"renders managers"| node_admin_managers
node_admin_routes -->|"configures calendar"| node_calendar_integration
node_admin_managers -->|"submits changes"| node_admin_actions
node_admin_managers -->|"uses delete control"| node_delete_button
node_delete_button -->|"confirms deletion"| node_dialog
node_delete_button -->|"renders controls"| node_button
node_admin_actions -->|"requires admin"| node_session
node_admin_actions -->|"writes records"| node_database
node_queries -->|"reads records"| node_database
node_queries -->|"queries tables"| node_schema
node_queries -->|"filters by role"| node_roles
node_session -->|"gets session"| node_auth
node_session -->|"uses role type"| node_roles
node_admin_actions -->|"uses settings keys"| node_settings_keys
node_public_routes -->|"formats dates"| node_format
node_member_routes -->|"formats dates"| node_format
node_admin_managers -->|"formats event time"| node_format
node_event_calendar -->|"renders controls"| node_button
node_event_calendar -->|"marks events"| node_badge
node_admin_managers -->|"renders panels"| node_card
node_admin_managers -->|"collects fields"| node_input
node_admin_managers -->|"labels fields"| node_label
node_admin_managers -->|"collects text"| node_textarea
node_admin_managers -->|"edits in dialog"| node_dialog
node_login -.->|"authenticates"| node_auth
node_upload_routes -->|"checks access"| node_session
node_file_route -->|"checks access"| node_session

click node_public_routes "https://github.com/tobsolutions/mbc-webseite/tree/main/app/(public)"
click node_contact "https://github.com/tobsolutions/mbc-webseite/blob/main/components/contact-form.tsx"
click node_public_views "https://github.com/tobsolutions/mbc-webseite/blob/main/components/news-grid.tsx"
click node_event_calendar "https://github.com/tobsolutions/mbc-webseite/blob/main/components/event-calendar.tsx"
click node_member_routes "https://github.com/tobsolutions/mbc-webseite/tree/main/app/intern"
click node_login "https://github.com/tobsolutions/mbc-webseite/blob/main/app/login/page.tsx"
click node_admin_routes "https://github.com/tobsolutions/mbc-webseite/tree/main/app/admin"
click node_admin_managers "https://github.com/tobsolutions/mbc-webseite/tree/main/components/admin"
click node_delete_button "https://github.com/tobsolutions/mbc-webseite/blob/main/components/admin/delete-button.tsx"
click node_admin_actions "https://github.com/tobsolutions/mbc-webseite/blob/main/app/actions/admin.ts"
click node_contact_action "https://github.com/tobsolutions/mbc-webseite/blob/main/app/actions/contact.ts"
click node_upload_routes "https://github.com/tobsolutions/mbc-webseite/blob/main/app/api/upload/route.ts"
click node_file_route "https://github.com/tobsolutions/mbc-webseite/blob/main/app/api/file/route.ts"
click node_queries "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/queries.ts"
click node_database "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/db/index.ts"
click node_schema "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/db/schema.ts"
click node_auth "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/auth.ts"
click node_session "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/session.ts"
click node_roles "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/roles.ts"
click node_calendar_integration "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/outlook-calendar.ts"
click node_settings_keys "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/settings-keys.ts"
click node_format "https://github.com/tobsolutions/mbc-webseite/blob/main/lib/format.ts"
click node_hero "https://github.com/tobsolutions/mbc-webseite/blob/main/components/page-hero.tsx"
click node_badge "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/badge.tsx"
click node_button "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/button.tsx"
click node_card "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/card.tsx"
click node_dialog "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/dialog.tsx"
click node_input "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/input.tsx"
click node_label "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/label.tsx"
click node_textarea "https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/textarea.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_public_routes,node_contact,node_public_views,node_event_calendar,node_contact_action toneBlue
class node_member_routes,node_login,node_file_route toneAmber
class node_admin_routes,node_admin_managers,node_delete_button,node_admin_actions,node_upload_routes toneMint
class node_queries,node_database,node_schema,node_auth,node_session,node_roles,node_calendar_integration,node_settings_keys,node_format toneRose
class node_hero,node_badge,node_button,node_card,node_dialog,node_input,node_label,node_textarea,node_visitor,node_member_actor,node_admin_actor toneIndigo
```

## Components

### Public website

- [Public pages](https://github.com/tobsolutions/mbc-webseite/tree/main/app/(public)): `app/(public)`
- [Contact form](https://github.com/tobsolutions/mbc-webseite/blob/main/components/contact-form.tsx): `components/contact-form.tsx`
- [Content views](https://github.com/tobsolutions/mbc-webseite/blob/main/components/news-grid.tsx): `components/news-grid.tsx`
- [Event calendar](https://github.com/tobsolutions/mbc-webseite/blob/main/components/event-calendar.tsx): `components/event-calendar.tsx`
- [Contact submission](https://github.com/tobsolutions/mbc-webseite/blob/main/app/actions/contact.ts): `app/actions/contact.ts`

### Member area

- [Member pages](https://github.com/tobsolutions/mbc-webseite/tree/main/app/intern): `app/intern`
- [Login](https://github.com/tobsolutions/mbc-webseite/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [File delivery](https://github.com/tobsolutions/mbc-webseite/blob/main/app/api/file/route.ts): `app/api/file/route.ts`

### Administration

- [Admin pages](https://github.com/tobsolutions/mbc-webseite/tree/main/app/admin): `app/admin`
- [Content managers](https://github.com/tobsolutions/mbc-webseite/tree/main/components/admin): `components/admin`
- [Delete control](https://github.com/tobsolutions/mbc-webseite/blob/main/components/admin/delete-button.tsx): `components/admin/delete-button.tsx`
- [Admin actions](https://github.com/tobsolutions/mbc-webseite/blob/main/app/actions/admin.ts): `app/actions/admin.ts`
- [File endpoints](https://github.com/tobsolutions/mbc-webseite/blob/main/app/api/upload/route.ts): `app/api/upload/route.ts`

### Domain services

- [Content queries](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/queries.ts): `lib/queries.ts`
- [Database](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/db/index.ts): `lib/db/index.ts`
- [Data schema](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/db/schema.ts): `lib/db/schema.ts`
- [Authentication](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/auth.ts): `lib/auth.ts`
- [Session and access](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/session.ts): `lib/session.ts`
- [Role scopes](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/roles.ts): `lib/roles.ts`
- [Outlook calendar](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/outlook-calendar.ts): `lib/outlook-calendar.ts`
- [Settings keys](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/settings-keys.ts): `lib/settings-keys.ts`
- [Date and file formatting](https://github.com/tobsolutions/mbc-webseite/blob/main/lib/format.ts): `lib/format.ts`

### Shared UI

- [Page hero](https://github.com/tobsolutions/mbc-webseite/blob/main/components/page-hero.tsx): `components/page-hero.tsx`
- [Badge](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/badge.tsx): `components/ui/badge.tsx`
- [Button](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/button.tsx): `components/ui/button.tsx`
- [Card](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/card.tsx): `components/ui/card.tsx`
- [Dialog](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/dialog.tsx): `components/ui/dialog.tsx`
- [Input](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/input.tsx): `components/ui/input.tsx`
- [Label](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/label.tsx): `components/ui/label.tsx`
- [Textarea](https://github.com/tobsolutions/mbc-webseite/blob/main/components/ui/textarea.tsx): `components/ui/textarea.tsx`

### Other components

- **Visitor**
- **Member**
- **Administrator**

## Connections

- Visitor → Public pages: browses
- Public pages → Content queries: loads content (evidence: `app/(public)/page.tsx`)
- Public pages → Contact form: opens form (evidence: `app/(public)/kontakt/page.tsx`)
- Contact form → Contact submission: submits message
- Public pages → Content views: renders content (evidence: `app/(public)/seite/[slug]/page.tsx`)
- Public pages → Event calendar: renders events (evidence: `app/(public)/termine/page.tsx`)
- Public pages → Page hero: renders hero (evidence: `app/(public)/kontakt/page.tsx`)
- Member → Login: signs in
- Login → Session and access: checks session (evidence: `app/login/page.tsx`)
- Member → Member pages: views restricted content
- Member pages → Session and access: checks access (evidence: `app/intern/page.tsx`)
- Member pages → Content queries: loads member content (evidence: `app/intern/page.tsx`)
- Member pages → Event calendar: renders events (evidence: `app/intern/termine/page.tsx`)
- Member pages → Outlook calendar: loads calendar (evidence: `app/intern/termine/page.tsx`)
- Administrator → Admin pages: manages site
- Admin pages → Content queries: loads records (evidence: `app/admin/page.tsx`)
- Admin pages → Content managers: renders managers (evidence: `app/admin/galerie/page.tsx`)
- Admin pages → Outlook calendar: configures calendar (evidence: `app/admin/einstellungen/page.tsx`)
- Content managers → Admin actions: submits changes (evidence: `components/admin/events-manager.tsx`)
- Content managers → Delete control: uses delete control (evidence: `components/admin/events-manager.tsx`)
- Delete control → Dialog: confirms deletion (evidence: `components/admin/delete-button.tsx`)
- Delete control → Button: renders controls (evidence: `components/admin/delete-button.tsx`)
- Admin actions → Session and access: requires admin (evidence: `app/actions/admin.ts`)
- Admin actions → Database: writes records (evidence: `app/actions/admin.ts`)
- Content queries → Database: reads records (evidence: `lib/queries.ts`)
- Content queries → Data schema: queries tables (evidence: `lib/queries.ts`)
- Content queries → Role scopes: filters by role (evidence: `lib/queries.ts`)
- Session and access → Authentication: gets session (evidence: `lib/session.ts`)
- Session and access → Role scopes: uses role type (evidence: `lib/session.ts`)
- Admin actions → Settings keys: uses settings keys (evidence: `app/actions/admin.ts`)
- Public pages → Date and file formatting: formats dates (evidence: `app/(public)/page.tsx`)
- Member pages → Date and file formatting: formats dates (evidence: `app/intern/page.tsx`)
- Content managers → Date and file formatting: formats event time (evidence: `components/admin/events-manager.tsx`)
- Event calendar → Button: renders controls (evidence: `components/event-calendar.tsx`)
- Event calendar → Badge: marks events (evidence: `components/event-calendar.tsx`)
- Content managers → Card: renders panels (evidence: `components/admin/events-manager.tsx`)
- Content managers → Input: collects fields (evidence: `components/admin/events-manager.tsx`)
- Content managers → Label: labels fields (evidence: `components/admin/events-manager.tsx`)
- Content managers → Textarea: collects text (evidence: `components/admin/events-manager.tsx`)
- Content managers → Dialog: edits in dialog (evidence: `components/admin/events-manager.tsx`)
- Login → Authentication: authenticates
- File endpoints → Session and access: checks access (evidence: `app/api/upload/route.ts`)
- File delivery → Session and access: checks access (evidence: `app/api/file/route.ts`)
