Read all content from PocketBase, per request #30

Merged
Tom merged 7 commits from feature/pocketbase-consume into main 2026-09-23 16:02:46 +02:00
Owner

What this does

The site now reads all its content from PocketBase over HTTP, one read per
request. The old file-based content layer (Markdown + YAML in Content/) is
gone. Closes #8.

Main changes

  • Pages, posts, events and FAQs come from PocketBase. A typed
    PocketBaseClient (registered with AddHttpClient) reads each collection per
    request. No content is cached at startup and no FileSystemWatcher is needed —
    an editorial change is live right away.
  • Generic page rendering. One ContentPage (@page "/{Slug}") renders any
    pages record, so a new page is just a new record — no .razor change. Literal
    routes (/posts, /events, /faqs, /) still win over the catch-all.
  • Navigation is generated from the pages records (header/footer, ordered),
    not hard-coded. Pages can also opt into embedded lists (posts/events/faqs) via
    an embed field.
  • English routes: /beitraege → /posts, /termine → /events,
    /termine.ics → /events.ics.
  • Removed the dead file content layer (Content/, the reader, and the
    YamlDotNet dependency).
  • Docs aligned with the PocketBase reality (architektur.md AE-2/AE-3,
    CLAUDE.md, redaktion.md, entwicklung.md, recht.md). Legal-text slugs are
    now English (imprint, privacy).

Developer experience

  • A fresh dev volume comes up populated. A dev-only PocketBase migration
    creates the collections and inserts example content on the first
    docker compose up. It is idempotent, mounted only by compose.dev.yaml, and
    never runs against production or the tests.
  • The collection schema has one source. The dev seed and the test fixture
    both read the same pb/pb_migrations/collections_schema.json, so the schema
    can't drift between them. The test records stay fixed in the fixture on
    purpose (they assert against known values, e.g. a draft page that must never
    show).

Testing

  • dotnet test — 31 tests green (route smoke tests, nav builder, client tests).
  • Verified end to end on a fresh volume: the app renders real PocketBase content,
    navigation is built from the records, and post detail pages show their body.
## What this does The site now reads all its content from PocketBase over HTTP, one read per request. The old file-based content layer (Markdown + YAML in `Content/`) is gone. Closes #8. ## Main changes - **Pages, posts, events and FAQs come from PocketBase.** A typed `PocketBaseClient` (registered with `AddHttpClient`) reads each collection per request. No content is cached at startup and no `FileSystemWatcher` is needed — an editorial change is live right away. - **Generic page rendering.** One `ContentPage` (`@page "/{Slug}"`) renders any `pages` record, so a new page is just a new record — no `.razor` change. Literal routes (`/posts`, `/events`, `/faqs`, `/`) still win over the catch-all. - **Navigation is generated from the `pages` records** (header/footer, ordered), not hard-coded. Pages can also opt into embedded lists (posts/events/faqs) via an `embed` field. - **English routes:** `/beitraege` → `/posts`, `/termine` → `/events`, `/termine.ics` → `/events.ics`. - **Removed the dead file content layer** (`Content/`, the reader, and the `YamlDotNet` dependency). - **Docs aligned** with the PocketBase reality (`architektur.md` AE-2/AE-3, `CLAUDE.md`, `redaktion.md`, `entwicklung.md`, `recht.md`). Legal-text slugs are now English (`imprint`, `privacy`). ## Developer experience - **A fresh dev volume comes up populated.** A dev-only PocketBase migration creates the collections and inserts example content on the first `docker compose up`. It is idempotent, mounted only by `compose.dev.yaml`, and never runs against production or the tests. - **The collection schema has one source.** The dev seed and the test fixture both read the same `pb/pb_migrations/collections_schema.json`, so the schema can't drift between them. The test *records* stay fixed in the fixture on purpose (they assert against known values, e.g. a draft page that must never show). ## Testing - `dotnet test` — 31 tests green (route smoke tests, nav builder, client tests). - Verified end to end on a fresh volume: the app renders real PocketBase content, navigation is built from the records, and post detail pages show their body.
Tom added 7 commits 2026-09-23 16:02:29 +02:00
Tom merged commit 7337a1cbc0 into main 2026-09-23 16:02:46 +02:00
Tom deleted branch feature/pocketbase-consume 2026-09-23 16:02:47 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tom/Elternbeirat#30