Compare commits

..
12 Commits
Author SHA1 Message Date
Tom d0f7660407 Merge pull request 'Keep line breaks in event notes' (#70) from fix/event-note-line-breaks into main
Build and deploy / build (push) Successful in 3m50s
Build and deploy / deploy (push) Successful in 27s
Reviewed-on: #70
2026-10-23 20:51:49 +02:00
TomandClaude Opus 5.5 79c23e42e1 Keep line breaks in event notes
The note was rendered as plain text, so the browser collapsed the editor's
line breaks into spaces. white-space: pre-line keeps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 20:50:03 +02:00
Tom 76eec0e0f3 Merge pull request 'Show the same brand mark in header and footer, lettered "der IGMH"' (#69) from ui/brand-lettering into main
Build and deploy / build (push) Successful in 1m27s
Build and deploy / deploy (push) Successful in 17s
Reviewed-on: #69
2026-10-12 23:57:13 +02:00
TomandClaude Opus 5.5 39ed1fde4d Show the same brand mark in header and footer, lettered "der IGMH"
- New Brand component: signet plus two-line lettering, used by header and
  footer, so both show one mark instead of two differently built ones
- Lettering sized in em; header and footer set the scale with one font-size,
  the footer a little smaller than the header
- Second line reads "der IGMH" instead of "IGMH Mannheim" (the M already
  stands for Mannheim), also on the maintenance page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 23:54:51 +02:00
Tom 060bb6e0ef Merge pull request 'Serve downloadable PDFs from a PocketBase documents collection' (#67) from content/documents-downloads into main
Build and deploy / build (push) Successful in 1m28s
Build and deploy / deploy (push) Successful in 18s
Reviewed-on: #67
2026-10-12 22:17:54 +02:00
TomandClaude Opus 5.5 f1a06956f7 Serve downloadable PDFs from a PocketBase documents collection
- New collection "documents" (title, slug, file, category, order, public);
  editors upload PDFs in the admin, no developer or redeploy needed
- The app serves each file at /dokumente/<slug>.pdf, a URL that survives a
  new upload (PocketBase's own file name gets a random suffix)
- New "documents" embed lists them as file cards, grouped by category;
  /downloads uses it
- List/view rules are "public = true", so a draft PDF is not reachable through
  the PocketBase API either
- Dev seed adds example documents with generated PDFs and fixes the
  const reassignment that broke seeding a fresh volume
- Docs: editor guide, architecture, and the manual production setup steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:15:18 +02:00
Tom 97321e2b49 Merge pull request 'Use the IGMH mark in the header, a bubble favicon and a right-aligned menu' (#66) from ui/logo-favicon-menu into main
Build and deploy / build (push) Successful in 3m5s
Build and deploy / deploy (push) Successful in 19s
Reviewed-on: #66
2026-10-12 21:10:38 +02:00
tleiningerandClaude Opus 5.5 dbfc5c7a75 Use the IGMH mark in the header, a bubble favicon and a right-aligned menu
- Header and footer show the school's IGMH mark in white instead of the
  speech-bubble signet
- Favicon (SVG plus PNG fallback) and apple-touch-icon use the speech bubble,
  filling the whole tab space
- Main menu sits on the right; the hamburger takes over below 1024 px so the
  links never wrap to a second row
- Slimmer header on phones, brand vertically centred (no row gap above the
  folded menu)
- Home tab title shortened to "Elternbeirat IGMH"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:09:45 +02:00
Tom b05f766133 Merge pull request 'Move server-wide docs to the Infrastructure repo' (#65) from docs/infrastructure-split into main
Build and deploy / build (push) Successful in 1m36s
Build and deploy / deploy (push) Successful in 21s
Reviewed-on: #65
2026-10-11 14:49:23 +02:00
TomandClaude Opus 5.5 24c787fb58 Move server-wide docs to the Infrastructure repo
- docs/unraid-infrastructure.md goes; host, network pattern, NPM, monitoring
  and the other containers now live in Tom/Infrastructure, referenced by its
  Gitea URL instead of a local path
- deployment.md stays self-contained: new prerequisite for proxynet and NPM,
  dig by IP (AdGuard blocks rzone.de), no docker login needed on Unraid,
  drops the finished Compose Manager switch and the generic NPM/runner pitfalls
- architektur.md AE-5 reflects the deploy from the repo and the Gitea secret
- entwicklung.md lists all three services of compose.yaml
- CLAUDE.md drops the obsolete YamlDotNet note (#50)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:46:16 +02:00
Tom 4672227cf3 Merge pull request 'Document the editor login with MFA and the PocketBase admin settings' (#64) from docs/redaktion-admin into main
Reviewed-on: #64
2026-10-10 23:45:13 +02:00
TomandClaude Opus 5.5 e003d53b49 Document the editor login with MFA and the PocketBase admin settings
- Login guide for editors (code by mail, leave the Id field alone) and the
  terminal fallback via `pocketbase superuser otp|upsert`
- Settings that live only in pb_data: app name/URL, X-Real-IP proxy header,
  rate limiting, SMTP via kontakt@, OTP+MFA, locked users collection
- German mail templates as one shared frame plus per-template parts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:42:32 +02:00
35 changed files with 944 additions and 231 deletions

No files matched your search

+8 -8
View File
@@ -15,7 +15,7 @@ nachlesen, bevor eine davon in Frage gestellt wird.
| Warum SSR statt WASM, warum PocketBase als Datenschicht, DynDNS und Proxy (AE-1 bis AE-6) | `docs/architektur.md` |
| Stack lokal starten, Tests, compose-Overlays | `docs/entwicklung.md` |
| Unraid, compose, NPM-Proxy-Host, Registry, Rollback | `docs/deployment.md` |
| Ist-Zustand auf Unraid: Container, Netzwerke, Ports | `docs/unraid-infrastructure.md` |
| Server allgemein: andere Container, Netzwerk-Muster, `proxynet`, NPM, Monitoring | Repo `Infrastructure`: <https://gitea.anticarnist.de/Tom/Infrastructure> — zum Entwickeln, Testen und Deployen **nicht** nötig |
| Inhalte anlegen und ändern (PocketBase-Admin) | `docs/redaktion.md` |
| Impressum, Datenschutz, Fotos | `docs/recht.md` |
| Offene Arbeit, Meilensteine, offene Punkte | Gitea-Issues (Milestone „Elternbeirat-Website") |
@@ -43,17 +43,18 @@ Inhalt liegt in PocketBase (`pb_data`), das separat gesichert wird (siehe
- **Inhalte liegen in PocketBase** (`pb_data`-Volume), nicht im Image. Eine
Textänderung ist ein Eintrag im PocketBase-Admin und sofort live — kein Commit,
kein Rebuild (`docs/architektur.md`, AE-2/AE-3). Nur die statischen Assets unter
`wwwroot/` (CSS, Fonts, PDFs) sind ins Image gebacken.
kein Rebuild (`docs/architektur.md`, AE-2/AE-3). Das gilt auch für PDFs: Upload
in der Collection `documents`, ausgeliefert unter `/dokumente/<slug>.pdf`. Nur die
statischen Assets unter `wwwroot/` (CSS, Fonts, Bilder) sind ins Image gebacken.
- **Kein `UseHttpsRedirection()`, kein `UseHsts()`.** NPM terminiert TLS; beides
erzeugt hinter dem Proxy eine Redirect-Schleife. `UseForwardedHeaders` mit
geleerten `KnownNetworks`/`KnownProxies` ist korrekt so, weil der Container kein
Port-Mapping hat und nur über NPM erreichbar ist.
- **Das chiseled-Runtime-Image hat keine Shell.** `HEALTHCHECK` mit `curl` oder
`sh` schlägt dort fehl.
- Neue Seite / neuer Beitrag / neuer Termin / neue Frage = **Record in der
passenden PocketBase-Collection** (`pages` / `posts` / `events` / `faqs`), nicht
eine Datei und **kein** `.razor`. `pages` mit `slug` ist sofort unter `/<slug>`
- Neue Seite / neuer Beitrag / neuer Termin / neue Frage / neues PDF = **Record
in der passenden PocketBase-Collection** (`pages` / `posts` / `events` / `faqs` /
`documents`), nicht eine Datei und **kein** `.razor`. `pages` mit `slug` ist sofort unter `/<slug>`
erreichbar; `location`+`order` steuern das Menü, `embed` bettet Listen ein
(`docs/redaktion.md`). Eine **neue Art von Liste** (eigene Route/Logik) ist
dagegen Code: neue Collection + `PocketBaseClient`-Methode + Komponente
@@ -75,8 +76,7 @@ Inhalt liegt in PocketBase (`pb_data`), das separat gesichert wird (siehe
gepflegt wird ausschließlich im PocketBase-Admin (Redakteure sind Superuser).
- UI-Texte auf Deutsch, ohne Anglizismen. `Termine`, nicht `Events`.
- Neue NuGet-Abhängigkeiten vorher begründen. Genutzt wird nur `Markdig`
(Markdown → HTML). `YamlDotNet` stammt aus der abgelösten Datei-Schicht, wird
nicht mehr verwendet und soll aus dem `csproj` entfernt werden.
(Markdown → HTML).
## Stil
+107
View File
@@ -0,0 +1,107 @@
using System.Text.Json.Serialization;
namespace Elternbeirat.Contracts;
/// <summary>
/// A downloadable PDF (a form, a flyer, a letter to parents), as stored in PocketBase.
/// </summary>
/// <remarks>
/// <para>
/// The PDF itself is an upload in the record's <see cref="File"/> field, so an
/// editor adds or replaces a document in the PocketBase admin without a developer
/// or a redeploy. Visitors never see PocketBase's own file URL: the site serves the
/// file at <c>/dokumente/&lt;slug&gt;.pdf</c> (see <see cref="Path"/>).
/// </para>
/// <para>
/// That indirection exists because PocketBase appends a random suffix to every
/// stored file name, so its URL changes whenever an editor uploads a new version.
/// The slug stays, so a link in a page body, a letter or a printed QR code keeps
/// working across updates.
/// </para>
/// </remarks>
public record Document
{
/// <summary>
/// The URL path the site serves documents under.
/// </summary>
private const string PathPrefix = "/dokumente/";
/// <summary>
/// Gets the PocketBase record id.
/// </summary>
/// <remarks>
/// <see langword="required"/>: every stored record has an id, and PocketBase's file
/// URL is built from it (<c>/api/files/documents/&lt;id&gt;/&lt;file&gt;</c>).
/// </remarks>
[JsonPropertyName("id")]
public required string Id { get; init; }
/// <summary>
/// Gets the name shown on the file card, e.g. <c>"Aufnahmeantrag Förderverein"</c>.
/// </summary>
/// <remarks>
/// <see langword="required"/>: a card without a name tells a visitor nothing, and
/// the field is required in PocketBase.
/// </remarks>
[JsonPropertyName("title")]
public required string Title { get; init; }
/// <summary>
/// Gets the slug the document is served under, e.g. <c>"einzugsermaechtigung"</c>
/// for <c>/dokumente/einzugsermaechtigung.pdf</c>.
/// </summary>
/// <value>
/// Lowercase letters, digits and single hyphens, no umlauts. PocketBase enforces the
/// same pattern as for <see cref="Page.Slug"/> and a unique index, so every slug
/// names exactly one document.
/// </value>
/// <remarks>
/// <see langword="required"/>: the slug is how the document is addressed.
/// </remarks>
[JsonPropertyName("slug")]
public required string Slug { get; init; }
/// <summary>
/// Gets the name PocketBase stored the uploaded PDF under.
/// </summary>
/// <value>
/// The stored file name including PocketBase's random suffix, e.g.
/// <c>"einzugsermaechtigung_k2j4h5g6f7.pdf"</c>. Only used to fetch the file from
/// PocketBase; never shown or linked.
/// </value>
/// <remarks>
/// <see langword="required"/>: a document without a file has nothing to download,
/// and the field is required in PocketBase.
/// </remarks>
[JsonPropertyName("file")]
public required string File { get; init; }
/// <summary>
/// Gets the optional group the document is listed under, e.g. <c>"Förderverein"</c>.
/// </summary>
/// <value>
/// The group heading, or <see cref="string.Empty"/> for a document listed without one.
/// </value>
[JsonPropertyName("category")]
public string Category { get; init; } = string.Empty;
/// <summary>
/// Gets the sort order in the download list.
/// </summary>
/// <value>
/// The sort key; documents with smaller values appear first. Groups appear in the
/// order of their first document.
/// </value>
[JsonPropertyName("order")]
public double Order { get; init; }
/// <summary>
/// Gets the site-relative URL the document is served at.
/// </summary>
/// <value>
/// <c>/dokumente/&lt;slug&gt;.pdf</c>. The <c>.pdf</c> ending is what the stylesheet
/// keys the file icon and the file card off.
/// </value>
[JsonIgnore]
public string Path => $"{PathPrefix}{Slug}.pdf";
}
+2 -2
View File
@@ -90,8 +90,8 @@ public record Page
/// Gets the dynamic blocks rendered below the <see cref="Body"/>.
/// </summary>
/// <value>
/// Any of <c>"posts"</c> and <c>"events"</c>, or an empty list for a plain
/// text page.
/// Any of <c>"posts"</c>, <c>"events"</c> and <c>"documents"</c>, or an empty
/// list for a plain text page.
/// </value>
[JsonPropertyName("embed")]
public IReadOnlyList<string> Embed { get; init; } = [];
+66 -1
View File
@@ -9,7 +9,7 @@ namespace Elternbeirat.PocketBase;
/// </summary>
/// <remarks>
/// <para>
/// There is one method per collection (pages, posts, events, faqs). Each returns
/// There is one method per collection (pages, posts, events, faqs, documents). Each returns
/// only records with <c>public = true</c> and leaves filtering and sorting to
/// PocketBase via query parameters.
/// </para>
@@ -108,6 +108,71 @@ public sealed class PocketBaseClient(HttpClient httpClient)
public Task<IReadOnlyList<FaqTopic>> GetFaqTopicsAsync(CancellationToken token = default)
=> GetRecordsAsync<FaqTopic>("faq_topics", "order", token, expand: "faqs_via_topic");
/// <summary>
/// Gets all public documents, ordered by <see cref="Document.Order"/>, then by
/// <see cref="Document.Title"/>.
/// </summary>
/// <remarks>
/// The title as second key makes the order total, so documents an editor left at
/// the same (or no) order still list the same way between requests.
/// </remarks>
/// <inheritdoc cref="GetPagesAsync" path="/param"/>
/// <returns>
/// The public documents, or an empty list if there are none.
/// </returns>
/// <inheritdoc cref="GetPagesAsync" path="/exception"/>
public Task<IReadOnlyList<Document>> GetDocumentsAsync(CancellationToken token = default)
=> GetRecordsAsync<Document>("documents", "order,title", token);
/// <summary>
/// Opens the uploaded PDF of a document for reading.
/// </summary>
/// <remarks>
/// <para>
/// Reads PocketBase's file endpoint
/// (<c>/api/files/documents/&lt;id&gt;/&lt;file&gt;</c>). The file is streamed,
/// not buffered: the returned stream reads straight from the response, so a
/// large PDF never sits in the app's memory as a whole.
/// </para>
/// <para>
/// The client timeout only covers the wait for PocketBase's response headers;
/// reading the body afterwards is not cut off, so a slow visitor connection
/// does not abort the download midway.
/// </para>
/// </remarks>
/// <param name="document">
/// The document whose file to open, as returned by <see cref="GetDocumentsAsync"/>.
/// </param>
/// <param name="token">
/// A token to cancel the request.
/// </param>
/// <returns>
/// The file content. The caller owns the stream and must dispose it.
/// </returns>
/// <exception cref="PocketBaseUnavailableException">
/// PocketBase could not be reached, timed out, or does not have the file (any
/// error status).
/// </exception>
/// <exception cref="OperationCanceledException">
/// <paramref name="token"/> was canceled by the caller.
/// </exception>
public async Task<Stream> OpenDocumentFileAsync(Document document, CancellationToken token = default)
{
var url = $"/api/files/documents/{Uri.EscapeDataString(document.Id)}/{Uri.EscapeDataString(document.File)}";
try
{
return await httpClient.GetStreamAsync(new Uri(url, UriKind.Relative), token);
}
// Same failure shapes as a record read (see GetRecordsAsync); an error status
// surfaces as HttpRequestException too.
catch (Exception exception) when (
exception is HttpRequestException
or TaskCanceledException { InnerException: TimeoutException })
{
throw new PocketBaseUnavailableException($"Could not read the file of document '{document.Slug}'.", exception);
}
}
/// <summary>
/// Checks whether PocketBase answers its health endpoint.
/// </summary>
@@ -117,4 +117,30 @@ public sealed class PocketBaseClientTests(PocketBaseFixture pocketBase)
faqs.Select(faq => faq.Topic?.Title).ShouldBe(["Mensa und Mittagessen", "Schließfächer"]);
faqs.ShouldAllBe(faq => !string.IsNullOrWhiteSpace(faq.Question));
}
[Fact]
public async Task Documents_load_sorted_by_order_without_drafts()
{
var client = pocketBase.CreateClient();
var documents = await client.GetDocumentsAsync();
// Seeded out of order; the draft "Internes Protokoll" must be missing.
documents.Select(document => document.Title)
.ShouldBe(["Aufnahmeantrag Förderverein", "Einzugsermächtigung", "Elternbrief"]);
documents.ShouldAllBe(document => document.File.EndsWith(".pdf", StringComparison.Ordinal));
}
[Fact]
public async Task Document_file_opens_with_the_uploaded_content()
{
var client = pocketBase.CreateClient();
var document = (await client.GetDocumentsAsync())[0];
await using var stream = await client.OpenDocumentFileAsync(document);
using var buffer = new MemoryStream();
await stream.CopyToAsync(buffer);
buffer.ToArray().ShouldBe(PocketBaseFixture.DocumentContent);
}
}
+44 -3
View File
@@ -9,7 +9,7 @@ using Elternbeirat.PocketBase;
namespace Elternbeirat.Web.Tests;
/// <summary>
/// Starts a throwaway PocketBase container once per test run, creates the four
/// Starts a throwaway PocketBase container once per test run, creates the
/// content collections and seeds them with a small, known data set. The tests run
/// against this instance instead of the live one, so they are hermetic (no network
/// to Unraid), reproducible (fixed data) and safe (isolated from production).
@@ -194,7 +194,7 @@ public sealed class PocketBaseFixture : IAsyncLifetime
}
/// <summary>
/// Imports the four content collections from the shared schema file, the same
/// Imports the content collections from the shared schema file, the same
/// one the dev seed migration reads (<c>pb/pb_migrations/collections_schema.json</c>).
/// Uses PocketBase's <c>/api/collections/import</c> so the whole schema is
/// defined in one place instead of being typed out here.
@@ -270,7 +270,7 @@ public sealed class PocketBaseFixture : IAsyncLifetime
await CreateRecordAsync(http, "pages", new
{
title = "Downloads", body = "# Downloads", location = "header",
order = 5, slug = "downloads", embed = Array.Empty<string>(), @public = true,
order = 5, slug = "downloads", embed = new[] { "documents" }, @public = true,
});
// Page records for the posts and events lists. Routes /posts and /events are
// served by PostList and EventList, which read these records for their heading
@@ -388,6 +388,47 @@ public sealed class PocketBaseFixture : IAsyncLifetime
question = "Wie viel kostet ein Schließfach?", answer = "20 Euro.",
topic = lockerTopicId, order = 1, @public = true,
});
// Documents: created out of order on purpose, so the tests prove the list is
// sorted by "order". Two share a category, one has none, and one is a draft
// whose file must never be served.
await CreateDocumentAsync(http, "Einzugsermächtigung", "einzugsermaechtigung", "Förderverein", 2, true);
await CreateDocumentAsync(http, "Aufnahmeantrag Förderverein", "aufnahmeantrag-foerderverein", "Förderverein", 1, true);
await CreateDocumentAsync(http, "Elternbrief", "elternbrief", "", 3, true);
await CreateDocumentAsync(http, "Internes Protokoll", "internal-minutes", "", 4, false);
}
/// <summary>
/// The content of every seeded document's file: the smallest input PocketBase's
/// MIME sniffing accepts as <c>application/pdf</c>, so the tests can compare the
/// served bytes exactly.
/// </summary>
public static IReadOnlyList<byte> DocumentContent { get; } = "%PDF-1.4\n%%EOF\n"u8.ToArray();
private static async Task CreateDocumentAsync(
HttpClient http, string title, string slug, string category, int order, bool isPublic)
{
// A file field takes a multipart upload, not JSON. The multipart content owns
// and disposes the parts added to it, which CA2000 cannot see.
using var content = new MultipartFormDataContent();
#pragma warning disable CA2000
foreach (var (name, value) in new[]
{
("title", title),
("slug", slug),
("category", category),
("order", order.ToString(CultureInfo.InvariantCulture)),
("public", isPublic ? "true" : "false"),
})
content.Add(new StringContent(value), name);
content.Add(new ByteArrayContent([.. DocumentContent])
{
Headers = { ContentType = new MediaTypeHeaderValue("application/pdf") },
}, "file", $"{slug}.pdf");
#pragma warning restore CA2000
var response = await http.PostAsync(new Uri("/api/collections/documents/records", UriKind.Relative), content);
response.EnsureSuccessStatusCode();
}
private static async Task<string> CreateRecordAsync(HttpClient http, string collection, object record)
+46
View File
@@ -102,6 +102,8 @@ public sealed partial class RouteSmokeTests : IDisposable
[InlineData("/gibt-es-nicht")]
[InlineData("/posts/gibt-es-nicht")]
[InlineData("/events/gibt-es-nicht.ics")]
[InlineData("/dokumente/gibt-es-nicht.pdf")]
[InlineData("/dokumente/internal-minutes.pdf")] // a draft: exists, but not public
public async Task Unknown_route_returns_404(string route)
{
var client = _factory.CreateClient();
@@ -180,6 +182,37 @@ public sealed partial class RouteSmokeTests : IDisposable
html.ShouldContain("Kommende Termine"); // events embed heading
}
[Fact]
public async Task Downloads_page_lists_the_documents_as_file_cards_by_category()
{
// /downloads opts into the documents embed. Each public document becomes a
// lone PDF link (the file card), grouped under its category; the draft is left out.
var client = _factory.CreateClient();
// Decoded, because Blazor HTML-encodes the umlauts of text from PocketBase.
var html = WebUtility.HtmlDecode(await client.GetStringAsync(new Uri("/downloads", UriKind.Relative)));
// [^>]* allows for the scoped-CSS attribute Blazor adds to each element.
html.ShouldMatch("<h2[^>]*>Förderverein</h2>");
html.ShouldMatch("""<li class="lone-link"[^>]*><a href="/dokumente/aufnahmeantrag-foerderverein.pdf"[^>]*>Aufnahmeantrag Förderverein</a></li>""");
html.ShouldContain("href=\"/dokumente/elternbrief.pdf\"");
html.ShouldNotContain("internal-minutes");
html.IndexOf("aufnahmeantrag-foerderverein", StringComparison.Ordinal)
.ShouldBeLessThan(html.IndexOf("einzugsermaechtigung", StringComparison.Ordinal));
}
[Fact]
public async Task Document_is_served_as_pdf_under_its_slug()
{
var client = _factory.CreateClient();
var response = await client.GetAsync(new Uri("/dokumente/einzugsermaechtigung.pdf", UriKind.Relative));
response.StatusCode.ShouldBe(HttpStatusCode.OK);
response.Content.Headers.ContentType?.MediaType.ShouldBe("application/pdf");
(await response.Content.ReadAsByteArrayAsync()).ShouldBe(PocketBaseFixture.DocumentContent);
}
[Fact]
public async Task Content_page_renders_its_body()
{
@@ -329,6 +362,19 @@ public sealed partial class RouteSmokeTests : IDisposable
(await response.Content.ReadAsStringAsync()).ShouldContain("Die Seite ist gerade nicht erreichbar");
}
[Fact]
public async Task Document_returns_503_when_PocketBase_is_unreachable()
{
// Not a page, so the gate lets it through; without PocketBase there is no file
// to hand out, and a 503 says "try again" where a 404 would say "gone".
await using var factory = UnreachablePocketBase();
var client = factory.CreateClient();
var response = await client.GetAsync(new Uri("/dokumente/elternbrief.pdf", UriKind.Relative));
response.StatusCode.ShouldBe(HttpStatusCode.ServiceUnavailable);
}
[Fact]
public async Task Calendar_feed_stays_an_empty_calendar_when_PocketBase_is_unreachable()
{
+8
View File
@@ -5,6 +5,14 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<base href="/"/>
@* Tab icon: the speech bubble with a grown-up and a child, filled with the header
gradient. The IGMH mark is unreadable at tab size, the bubble is not. SVG stays
sharp at every size; the PNG is for browsers without SVG icons. SVG comes last
because some browsers take the last icon they can use. The apple-touch-icon is
what phones use for a home-screen bookmark. *@
<link rel="icon" type="image/png" sizes="32x32" href="@Assets["favicon.png"]"/>
<link rel="icon" type="image/svg+xml" href="@Assets["favicon.svg"]"/>
<link rel="apple-touch-icon" href="@Assets["apple-touch-icon.png"]"/>
<ResourcePreloader/>
<link rel="stylesheet" href="@Assets["app.css"]"/>
<link rel="stylesheet" href="@Assets["Elternbeirat.Web.styles.css"]"/>
@@ -17,14 +17,9 @@
<header class="site-header">
<div class="header-inner">
@* Two-line lettering next to the signet: the body's name large, the
school small below it. One link, so the whole mark leads home. *@
@* The mark (signet and lettering) as one link, so all of it leads home. *@
<a class="brand" href="/">
<Signet />
<span class="brand-text">
<span class="brand-name">Elternbeirat</span>
<span class="brand-school">IGMH Mannheim</span>
</span>
<Brand />
</a>
@* CSS-only mobile menu: the checkbox holds the open/closed state, the
@@ -72,8 +67,7 @@
<div class="footer-inner">
<div class="footer-brand">
<Signet />
<span>Elternbeirat der IGMH</span>
<Brand />
</div>
@* Both link columns come from PocketBase like the header. An empty list
@@ -47,8 +47,8 @@
gap: var(--space-2) var(--space-4);
}
/* Signet and two-line lettering side by side. The lettering is a column of its
own, so the name and the school line up on the left edge. */
/* Signet and two-line lettering (Brand.razor) side by side. The lettering is sized
in em, so this font-size is its scale. */
.brand {
display: flex;
align-items: center;
@@ -68,34 +68,19 @@
outline-color: var(--color-focus-inverse);
}
/* The signet lives in its own component (Signet.razor), so its <svg> carries that
/* The signet lives in its own component (Signet.razor), so its <img> carries that
component's scope attribute, not this one's; ::deep reaches it from here. */
.brand ::deep .signet {
flex-shrink: 0;
width: 2.5rem;
height: 2.5rem;
}
.brand-text {
display: flex;
flex-direction: column;
line-height: 1.15;
}
.brand-name {
font-size: 1.35rem;
font-weight: var(--font-weight-heading);
letter-spacing: var(--letter-spacing-heading);
}
.brand-school {
font-size: 0.85rem;
font-weight: 600;
width: 3rem;
height: 3rem;
}
/* The links are pills with their own padding (see app.css), so the gap between
them can stay small. */
them can stay small. margin-left:auto pushes the menu to the right edge, away
from the brand -- the usual split, brand left, menu right. */
.main-nav {
margin-left: auto;
display: flex;
flex-wrap: wrap;
align-items: center;
@@ -167,19 +152,21 @@
gap: var(--space-4);
}
/* The same mark as in the header, a little smaller: the footer closes the page, it
does not introduce it. */
.footer-brand {
display: flex;
align-items: center;
align-self: start;
gap: var(--space-2);
color: var(--color-on-footer);
font-weight: 700;
font-size: 0.9rem;
}
.footer-brand ::deep .signet {
flex-shrink: 0;
width: 3rem;
height: 3rem;
width: 2.75rem;
height: 2.75rem;
}
/* Column headings label the lists; they are not a second page heading, so they
@@ -229,16 +216,24 @@
font-size: 0.85rem;
}
/* Mobile: on narrow screens the nav collapses behind a hamburger button. This is
pure CSS -- the #nav-toggle checkbox holds the open/closed state and its
:checked state reveals the nav. No JavaScript, so it works under static SSR. */
@media (max-width: 40rem) {
/* Narrow screens: the nav collapses behind a hamburger button. This is pure CSS --
the #nav-toggle checkbox holds the open/closed state and its :checked state
reveals the nav. No JavaScript, so it works under static SSR. Without JavaScript
the header cannot measure whether the links still fit, so the switch happens at a
fixed width instead: brand plus the current menu need about 1000 px. When the
menu in PocketBase gets longer and the links start to wrap, raise this value
(and the matching one in app.css). */
@media (max-width: 64rem) {
/* The brand stays on the left, the hamburger goes to the right, and the nav
occupies its own full-width row below both. */
.header-inner {
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
/* No row gap: the folded nav is a zero-height second row, and a gap above
it would leave empty space under the brand, pushing it off centre. The
open nav brings its own distance instead (margin-top below). */
row-gap: 0;
}
/* The checkbox comes back as a real, focusable control -- only visually hidden
@@ -322,11 +317,30 @@
transition: max-height 0.2s ease;
max-height: 70vh;
overflow-y: auto;
margin-top: 0.5rem;
margin-top: var(--space-3);
}
/* Mobile per-link spacing for .main-nav a is in the global app.css too, for
the same scoped-attribute reason as above. */
}
/* Phones. */
@media (max-width: 40rem) {
/* The header stays pinned while scrolling, so on a small screen every pixel of
its height is lost for content. Less padding, a smaller signet and lettering
bring it down to about 56 px, the usual height of a phone's top bar. */
.header-inner {
padding-block: var(--space-2);
}
.brand ::deep .signet {
width: 2.5rem;
height: 2.5rem;
}
.brand {
font-size: 0.86rem;
}
/* The footer columns stack: one column, brand on top. */
.footer-inner {
@@ -0,0 +1,20 @@
@if (_groups.Count > 0)
{
@* markdown-body and the lone-link class give the entries the same file cards a
lone PDF link gets in a page body, so both look alike on /downloads. *@
<section class="embed embed-documents markdown-body">
@foreach (var group in _groups)
{
@if (group.Key.Length > 0)
{
<h2>@group.Key</h2>
}
<ul>
@foreach (var document in group)
{
<li class="@Markdown.LoneLinkClass"><a href="@document.Path">@document.Title</a></li>
}
</ul>
}
</section>
}
@@ -0,0 +1,43 @@
using Elternbeirat.Contracts;
using Elternbeirat.PocketBase;
using Microsoft.AspNetCore.Components;
namespace Elternbeirat.Web.Features.Embeds;
public partial class DocumentsEmbed
{
[LoggerMessage(
Level = LogLevel.Warning,
Message = "Could not load documents for an embed from PocketBase; the list is omitted.")]
private static partial void LogSourceUnavailable(
ILogger logger,
Exception exception);
[Inject]
private PocketBaseClient PocketBase { get; set; } = null!;
[Inject]
private ILogger<DocumentsEmbed> Logger { get; set; } = null!;
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
private IReadOnlyList<IGrouping<string, Document>> _groups = [];
protected override async Task OnInitializedAsync()
{
try
{
// GroupBy keeps the groups in the order of their first document, so an
// editor orders the groups through the documents' own order field.
var documents = await PocketBase.GetDocumentsAsync(HttpContext?.RequestAborted ?? CancellationToken.None);
_groups = [.. documents.GroupBy(document => document.Category)];
}
catch (PocketBaseUnavailableException exception)
{
// Only part of the page fails: omit the list, keep the page (and its
// 200) intact.
LogSourceUnavailable(Logger, exception);
}
}
}
@@ -0,0 +1,8 @@
/* The cards come from the global app.css (the lone PDF link). Unlike the post and
event teasers, the list belongs to the page's reading column, so it takes the same
centred 42rem as ContentPage's text, whose scoped rule does not reach in here. */
.embed-documents {
max-width: 42rem;
margin-inline: auto;
margin-top: var(--space-5);
}
@@ -12,11 +12,14 @@
case "events":
<EventsEmbed />
break;
case "documents":
<DocumentsEmbed />
break;
}
}
@code {
/// <summary>The page's embed keys ("posts", "events"), in order.</summary>
/// <summary>The page's embed keys ("posts", "events", "documents"), in order.</summary>
[Parameter]
public IReadOnlyList<string> Embed { get; set; } = [];
}
@@ -55,9 +55,11 @@
color: var(--color-accent-dark);
}
/* pre-line keeps the editor's line breaks from the plain-text note field. */
.event-note {
margin-top: var(--space-1);
font-size: 0.95rem;
white-space: pre-line;
}
/* In the linked card (home embed) the note is only a teaser: cut after two lines,
+1 -1
View File
@@ -1,7 +1,7 @@
@page "/"
@using Elternbeirat.Web.Features.Events
<PageTitle>Elternbeirat der IGMH</PageTitle>
<PageTitle>Elternbeirat IGMH</PageTitle>
@* The hero spans the full window width (see Home.razor.css). Its text is the "home"
page's body, taken apart by HomeIntro; the card beside it shows the next event. *@
@@ -0,0 +1,14 @@
@*
The site's mark: the IGMH signet with the two-line lettering beside it, the body's
name large and "der IGMH" small below it. One component for the header and the
footer, so both show the same mark. It renders no wrapper of its own: the parent
supplies the element (the home link in the header, a plain box in the footer), lays
the two parts out side by side and scales them through its font-size, since the
lettering is sized in em (Brand.razor.css). "der IGMH" rather than "IGMH Mannheim":
the M in IGMH already stands for Mannheim.
*@
<Signet />
<span class="brand-text">
<span class="brand-name">Elternbeirat</span>
<span class="brand-school">der IGMH</span>
</span>
@@ -0,0 +1,19 @@
/* The name and the school line up on the left edge as a column of their own. Sizes in
em, so the parent sets the scale with one font-size: full size in the header,
smaller on phones and in the footer. */
.brand-text {
display: flex;
flex-direction: column;
line-height: 1.15;
}
.brand-name {
font-size: 1.35em;
font-weight: var(--font-weight-heading);
letter-spacing: var(--letter-spacing-heading);
}
.brand-school {
font-size: 0.85em;
font-weight: 600;
}
+8 -15
View File
@@ -1,17 +1,10 @@
@*
The site's own small mark: a speech bubble (the board speaks for the parents)
holding a grown-up and a child. Inline SVG, so there is no extra request and
nothing from a third-party host. Decorative only -- the name next to it carries
the meaning, so it is hidden from screen readers. Colours come from tokens in
Signet.razor.css; the size is set by whoever places it (MainLayout.razor.css).
The IGMH mark: the four squares with "IGMH", in white on a transparent
background, so it sits straight on the header gradient and the dark footer. Made
from the school's black-and-white logo with its subtitle cut off, which would be
unreadable at this size. Served from wwwroot (logo.png, 192 px so it stays sharp
on dense screens), so nothing comes from a third-party host. Decorative only --
the name next to it carries the meaning, so the alt text is empty. The size is
set by whoever places it (MainLayout.razor.css).
*@
<svg class="signet" viewBox="0 0 40 40" width="40" height="40" aria-hidden="true" focusable="false">
<path class="signet-bubble"
d="M8 4h24a6 6 0 0 1 6 6v15a6 6 0 0 1-6 6H18l-8 6v-6H8a6 6 0 0 1-6-6V10a6 6 0 0 1 6-6z" />
<g class="signet-figures">
<circle cx="15" cy="12" r="3.5" />
<path d="M9 26c0-5 2.7-8 6-8s6 3 6 8z" />
<circle cx="26" cy="16" r="2.6" />
<path d="M21.5 26c0-3.8 2-6 4.5-6s4.5 2.2 4.5 6z" />
</g>
</svg>
<img class="signet" src="@Assets["logo.png"]" alt="" width="192" height="192" />
@@ -1,11 +1,5 @@
/* A white bubble with green figures. It sits on the header gradient and on the dark
footer, both of which always carry white text, so --color-on-header is right in
both places. The figures use the darker green so they stay distinct on the white
bubble (the lighter --color-accent would wash out). */
.signet-bubble {
fill: var(--color-on-header);
}
.signet-figures {
fill: var(--color-accent-dark);
/* The image is already white on transparent; it only needs to behave as a block so
no inline gap appears below it. */
.signet {
display: block;
}
+19
View File
@@ -128,6 +128,25 @@ app.MapGet("/events/{id}.ics", async (string id, PocketBaseClient pocketBase, Ca
: Results.NotFound();
});
// A document's PDF, uploaded by an editor in PocketBase. The app passes the file
// through instead of linking PocketBase's own file URL: that URL changes with every new
// upload, this one stays /dokumente/<slug>.pdf (see Document). An unknown or non-public
// slug is a 404; PocketBase being down is a 503, like the single-event calendar file.
app.MapGet("/dokumente/{slug}.pdf", async (string slug, PocketBaseClient pocketBase, CancellationToken token) =>
{
try
{
var documents = await pocketBase.GetDocumentsAsync(token);
return documents.FirstOrDefault(document => document.Slug == slug) is { } match
? Results.Stream(await pocketBase.OpenDocumentFileAsync(match, token), "application/pdf")
: Results.NotFound();
}
catch (PocketBaseUnavailableException)
{
return Results.StatusCode(StatusCodes.Status503ServiceUnavailable);
}
});
// Status page for an outside monitor (Uptime Kuma) to check. One check tells all
// three states apart: no reply = the app is down, 503 = the app runs but PocketBase
// is down, 200 = both are fine. It talks to PocketBase directly, not through the
+3 -2
View File
@@ -525,8 +525,9 @@ main:focus {
they stay the same pills as on the desktop, with the stroke under the whole word.
Only taller, for a comfortable tap target; the stroke moves up with the extra
padding so it still sits right under the text, not at the pill's edge. Same
global placement, same NavLink reason as above. */
@media (max-width: 40rem) {
global placement, same NavLink reason as above. The width matches the hamburger
breakpoint in MainLayout.razor.css. */
@media (max-width: 64rem) {
.main-nav a {
padding: 0.6rem var(--space-3);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

+21
View File
@@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2 2.5 36 36">
<!-- Tab icon: the speech bubble with a grown-up and a child, filled with the
header gradient so it stands out on light and dark tab bars alike. The
bubble is the signet's, stretched to fill the square viewBox completely
(the original is wider than tall), and the figures are scaled up inside it,
so the icon uses all of the tiny tab space. -->
<defs>
<linearGradient id="brand" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#2a77a6"/>
<stop offset="1" stop-color="#3a7a3e"/>
</linearGradient>
</defs>
<path fill="url(#brand)"
d="M8 2.5h24a6 6 0 0 1 6 6v18a6 6 0 0 1-6 6H18l-8 6v-6H8a6 6 0 0 1-6-6v-18a6 6 0 0 1 6-6z"/>
<g fill="#fff" transform="translate(20 17.5) scale(1.3) translate(-20 -17.25)">
<circle cx="15" cy="12" r="3.5"/>
<path d="M9 26c0-5 2.7-8 6-8s6 3 6 8z"/>
<circle cx="26" cy="16" r="2.6"/>
<path d="M21.5 26c0-3.8 2-6 4.5-6s4.5 2.2 4.5 6z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

+1 -1
View File
@@ -204,7 +204,7 @@
</svg>
<span class="brand-text">
<span class="brand-name">Elternbeirat</span>
<span class="brand-school">IGMH Mannheim</span>
<span class="brand-school">der IGMH</span>
</span>
</div>
</header>
+2 -2
View File
@@ -5,8 +5,8 @@
# NPM runs outside this stack (the `nginx` container on Unraid) and reaches both the
# web app (eb-blazor:8080) and the PocketBase admin (eb-pocketbase:8090, for
# redaktion.elternbeirat-igmh.info) by name over the external Docker network
# `proxynet`. No service publishes a host port: NPM is the only way in. Unraid
# setup: docs/unraid-infrastructure.md.
# `proxynet`. No service publishes a host port: NPM is the only way in. proxynet
# and the network pattern: Infrastructure repo, docs/networks.md.
#
# On Unraid this file is deployed as is by .gitea/workflows/deploy.yml (project
# eb-stack), not pasted into the Compose Manager.
+11 -9
View File
@@ -28,8 +28,10 @@ architecture. Never global.
## AE-2: Content in PocketBase, read per request (revised)
**Decision:** All visible content lives in **PocketBase** (collections `pages`,
`posts`, `events`, `faq_topics`, `faqs`); the app reads it over the REST API per
request via a typed `PocketBaseClient`. Documents remain PDFs under `wwwroot`.
`posts`, `events`, `faq_topics`, `faqs`, `documents`); the app reads it over the
REST API per request via a typed `PocketBaseClient`. Downloadable PDFs are uploads in
`documents`; the app passes them through at `/dokumente/<slug>.pdf`, a URL that stays
stable when an editor uploads a new version (PocketBase's own file URL does not).
**Original decision (stage 1):** Content as files in the repo — Markdown with YAML
frontmatter, events as `Content/events.yml`. The rationale then was: no DB backup,
@@ -51,8 +53,8 @@ the content — the backup is now `pb_data` (see AE-3 and `deployment.md`).
## AE-3: Content lives in PocketBase's `pb_data`, not baked into the image (revised)
**Decision:** The editable content lives in PocketBase's `pb_data`, a persistent
volume separate from the app image. Only the static assets under `wwwroot/` (CSS,
fonts, PDFs) are baked into the image.
volume separate from the app image, uploaded PDFs included. Only the static assets
under `wwwroot/` (CSS, fonts, images) are baked into the image.
**Original decision (stage 1):** `Content/` and `wwwroot/` were both baked into the
image, deliberately **not** a mounted volume, so the live state could never drift
@@ -87,16 +89,16 @@ the container has no port mapping and is reachable only through NPM.
**Decision:** The A record of `elternbeirat-igmh.info` at Strato is kept current by
`eb-ddns` ([ddns-updater](https://github.com/qdm12/ddns-updater)), a third service
in `compose.yaml`. Its whole configuration is the `CONFIG` environment variable in
that file; only the DynDNS password comes from the stack's env
(`STRATO_DYNDNS_PASSWORD`).
that file; only the DynDNS password comes from outside, as the Gitea secret
`STRATO_DYNDNS_PASSWORD` that the deploy workflow passes in.
**Rationale:** The site runs on the private connection, whose public IP changes.
The FritzBox has a single DynDNS slot and it already serves `anticarnist.de`, so
the update has to run elsewhere. Putting it in the stack means it moves with the
site. ddns-updater was chosen over ddclient because of where the config lives:
ddclient needs a config file, which would have to sit next to the stack on the
server (the Unraid stack is maintained by hand, not from a checkout) and be set up
again whenever the container or its folder is deleted. ddns-updater takes the whole
ddclient needs a config file, which would have to sit on the server next to the
stack and be set up again whenever the container or its folder is deleted — the
deploy only brings `compose.yaml`, not further files. ddns-updater takes the whole
config from one environment variable, so `compose.yaml` alone describes it and the
container can be deleted and recreated without any setup — only the one secret
stays outside the repo.
+72 -30
View File
@@ -19,6 +19,27 @@ overlays layered on top.
## Prerequisites (one-time)
> Everything needed to deploy is in this repo. Background on the server as a
> whole (other containers, the network pattern, NPM) is in the Infrastructure
> repo, <https://gitea.anticarnist.de/Tom/Infrastructure> — helpful, not required.
### Server: `proxynet` and NPM
The deploy expects two things on Unraid that the stack does not create itself:
1. The external Docker network `proxynet`, created once in the Unraid terminal:
```bash
docker network create proxynet
```
It survives Docker restarts only with **Settings → Docker → Advanced View →
Preserve user defined networks: Yes**; otherwise `compose up` fails with
"network proxynet not found".
2. Nginx Proxy Manager attached to it (its container: **Network Type → Custom:
proxynet**), so it reaches `eb-blazor` and `eb-pocketbase` by name. The proxy
hosts themselves are below ("NPM proxy host", "Editor subdomain").
### Gitea registry token
The push to the registry needs a Gitea access token with **package write
@@ -34,7 +55,10 @@ permission** (`package: Read and Write`) — **not** the account password.
> generate a new one. A `package` token allows uploading arbitrary images to the
> registry.
The Docker login then stores the token locally, so it only has to be entered once.
The token goes into the repo secret `REGISTRY_TOKEN` (see "Automation"); the deploy
logs in with it on every run, so Unraid needs no `docker login` of its own. Only
the fallback `scripts/release.sh` needs a one-time `docker login
gitea.anticarnist.de` on the machine it runs on.
### DynDNS for elternbeirat-igmh.info (Strato)
@@ -64,9 +88,12 @@ DynDNS password.
right away; public resolvers follow once their cache expires.
```bash
dig +short @docks05.rzone.de elternbeirat-igmh.info
dig +short @217.160.80.132 elternbeirat-igmh.info
```
`217.160.80.132` is `docks05.rzone.de`; the name itself does not resolve in the
LAN because AdGuard blocks `rzone.de` (Infrastructure repo, `docs/lan.md`).
**Testing the credentials without the container** — passing the IP the record
already has, so a successful login changes nothing (`nochg`); `badauth` means
domain or password are wrong:
@@ -98,7 +125,8 @@ The NPM that already runs on Unraid fronts the site (why not one in the stack:
| | HSTS Subdomains, DNS Challenge | off |
NPM and `eb-blazor` share the Docker network `proxynet`, so NPM reaches the app by
container name; the app publishes no host port (`unraid-infrastructure.md`).
container name; the app publishes no host port (Infrastructure repo,
`docs/networks.md`).
Let's Encrypt asks the Strato nameservers directly,
so the certificate works as soon as DynDNS has updated, even while public
resolvers still cache the old IP.
@@ -134,9 +162,9 @@ The editors reach the PocketBase admin at
The full URL is needed: with a bare path (`return 302 /_/;`) nginx adds its
container port and the redirect lands on `:4443`.
Pitfalls: no `www.redaktion…` in Domain Names — it has no DNS record, and one
unknown name makes Let's Encrypt refuse the whole certificate. And no Custom
Location for `/`: an empty one without a forward target breaks the subdomain.
General NPM pitfalls hit while setting this up (an extra `www.redaktion…` in
Domain Names, an empty custom location, the `:4443` redirect) are in the
Infrastructure repo, `docs/proxy.md`.
> **The whole PocketBase API is public on this subdomain, not just the admin.**
> That is fine as long as the collection API rules only allow reading; writing is
@@ -183,33 +211,50 @@ Pushes that only touch `docs/` or Markdown files trigger nothing. A manual run
`scripts/release.sh` still builds and pushes by hand from `main`, as a fallback
when the runner is down. It does not deploy.
### One-time switch from the Compose Manager
---
Before the workflow took over, the stack was a Compose Manager stack
(`elternbeirat`) with a pasted copy of `compose.yaml`. The workflow runs the stack
as project `eb-stack`; the fixed `container_name`s would clash with the old
containers, so the old stack goes first:
## Schema changes in production
1. Add the secrets in Gitea (see "Automation" below).
2. Compose Manager → stack `elternbeirat` → **Compose Down**, then delete the
stack. `pb_data` is a bind mount and stays.
3. Run the workflow by hand. The site is down from step 2 until it finishes.
Production is never seeded from the repo, so a new collection or field that a
release depends on is set up by hand in the production admin
(`redaktion.elternbeirat-igmh.info/_/`) — **before** merging the release, because
the app reads the new collection as soon as it is live. A missing collection only
degrades (the embed stays empty, the route answers 503), it does not break pages.
From then on, a click on **Compose Up** in the Compose Manager is never needed —
and there is no stale copy left there that could be started by accident.
The repo's `pb/pb_migrations/collections_schema.json` is the reference for what
production should look like. Current one-time steps:
**`documents` (downloads):**
1. *Settings → Import collections*, paste a JSON array holding **only** the
`documents` object from `collections_schema.json`, keep the merge option on so
the review lists **no** collection to delete, then confirm.
2. *Collections → pages → Edit collection* → field `embed`: add the value
`documents`, set *Max select* to 3, save the field **and** the collection.
3. On the `downloads` page record: set `embed` to `documents` and cut the
hard-coded PDF list out of its body (the links pointed to files that never
existed in the image).
4. Upload the PDFs as `documents` records (see `redaktion.md`, *Dokumente*).
Uploaded files live in `pb_data/storage`, so the `pb_data` backup (#9) covers them.
---
## The compose files
`compose.yaml` is the **production** base; the workflow deploys it to Unraid as
is. It defines
all services. `eb-blazor` publishes no host port and joins the external network
`proxynet`, so NPM is the only path to the web app. `eb-pocketbase` joins
`proxynet` too, for the editor subdomain, and publishes no host port either.
`eb-pocketbase` keeps its data on the bind mount
is. It defines all services. `eb-blazor` publishes no host port and joins the
external network `proxynet`, so NPM is the only path to the web app.
`eb-pocketbase` joins `proxynet` too, for the editor subdomain, and publishes no
host port either. `eb-pocketbase` keeps its data on the bind mount
`/mnt/user/appdata/pocketbase/pb_data`, which only exists on the server.
The stack's own network has the fixed name `eb-internal`. Changing a network name
needs `docker compose down` and then `up`; a plain `up` fails because the existing
containers still point at the old network. `proxynet`, the network pattern and NPM
itself are server-wide and documented in the Infrastructure repo
(<https://gitea.anticarnist.de/Tom/Infrastructure>, `docs/networks.md`, `docs/proxy.md`).
The two overlays (`compose.dev.yaml`, `compose.test.yaml`) are for local
development and the tests and are **not** used on Unraid — see `entwicklung.md`.
@@ -227,7 +272,8 @@ answers every **page** request with the static `wwwroot/maintenance.html`:
| `/health` | **503** `PocketBase unreachable` (for Uptime Kuma) |
| `/events.ics` | 200 with an empty calendar, so subscriptions keep working |
| `/events/{id}.ics` | 503 |
| Static files (CSS, fonts, PDFs, `/maintenance.html`) | served as usual |
| `/dokumente/{slug}.pdf` | 503 (the file lives in PocketBase) |
| Static files (CSS, fonts, `/maintenance.html`) | served as usual |
The gate caches the health check for **10 seconds** (`PocketBaseHealthCache`). So
after PocketBase stops, pages can render for up to 10 s more (the components
@@ -272,10 +318,6 @@ Requires three repository secrets (Gitea → repo → **Settings** → **Actions
login password.
- `STRATO_DYNDNS_PASSWORD` — the DynDNS password for `eb-ddns` (see above).
Still open: the workflow does not run the tests yet, and a failed health gate
does not roll back on its own.
Two known pitfalls: the `act_runner` needs Docker socket access to build, and it
must offer the `ubuntu-latest` label the workflow asks for. To check the runner:
Gitea → repo (or site admin) → **Settings** → **Actions** → **Runners** — it
should be listed as **online** with a label set that includes `ubuntu-latest`.
A failed health gate does not roll back on its own; that stays a deliberate step
(see "Rollback"). The runner itself (Docker socket, `ubuntu-latest` label) is
server-wide: Infrastructure repo, `docs/apps/gitea.md`.
+4 -4
View File
@@ -16,7 +16,7 @@ the base for a local run — you layer an overlay on top of it.
| File | Role |
|---|---|
| `compose.yaml` | Base, production-shaped: both services, **no** host ports, PocketBase data on the Unraid bind mount. Also holds the fixed project name `eb-stack`. |
| `compose.yaml` | Base, production-shaped: all three services (`eb-pocketbase`, `eb-blazor`, `eb-ddns`), **no** host ports, PocketBase data on the Unraid bind mount, the external network `proxynet`. Also holds the fixed project name `eb-stack`. |
| `compose.dev.yaml` | Dev overlay: adds host ports (5000, 8090), builds the web image from local source instead of pulling it, swaps the Unraid bind mount for a throwaway volume, seeds a local PocketBase superuser, and mounts `pb/pb_migrations` so a fresh volume is auto-seeded (see below). |
| `compose.test.yaml` | Test overlay: used **only** by the integration tests. Drops the fixed host port and container names so a test run does not collide with a running dev stack, and removes the seed mount so the dev seed does not run during tests. |
@@ -108,8 +108,8 @@ and the dev overlay mounts that folder into PocketBase (`./pb/pb_migrations:/pb_
| File | Role |
|---|---|
| `collections_schema.json` | The five content collections (`pages`, `posts`, `events`, `faq_topics`, `faqs`) as PocketBase exports them. **The single source of truth for the schema** — the test fixture imports this same file. |
| `<timestamp>_dev_seed.js` | The PocketBase migration. Reads the schema file, creates any missing collection, then inserts the example records. |
| `collections_schema.json` | The content collections (`pages`, `posts`, `events`, `faq_topics`, `faqs`, `documents`) as PocketBase exports them. **The single source of truth for the schema** — the test fixture imports this same file. |
| `<timestamp>_dev_seed.js` | The PocketBase migration. Reads the schema file, creates any missing collection, then inserts the example records. The example `documents` get a one-page PDF generated at seed time, so the repo holds no binary files. |
Both steps are **idempotent**: a collection is created only if it is missing, and
filled only while it is empty. So a populated volume — or the production DB, should
@@ -131,7 +131,7 @@ The seed is generated from a running dev instance, not hand-edited. When you
change a collection's schema in the admin UI, or want to capture the current
example content as the new seed, re-export from the running dev PocketBase
(authenticated as the dev superuser) and regenerate the two files. The schema file
is the plain export of the four collections; the migration embeds the records the
is the plain export of the collections; the migration embeds the records the
same way. After regenerating, prove it end to end:
```bash
+177 -8
View File
@@ -29,6 +29,125 @@ einen eigenen Superuser-Zugang (unter *Collections → System → `_superusers`*
Es gibt bewusst keinen eigenen Login und keinen Editor in der Website selbst —
gepflegt wird nur im Admin.
### Anmeldung mit Code (MFA)
Nach dem Passwort fragt das Admin nach einem **Code**, der per E-Mail an die
Login-Adresse des Superusers geht (Absender `kontakt@elternbeirat-igmh.info`). Der
Code gilt nur wenige Minuten. Meldet sich jemand von einem neuen Gerät an, kommt
zusätzlich eine Warn-Mail.
Die Login-Seite ist fest in PocketBase eingebaut und nur auf Englisch; sie lässt
sich nicht übersetzen oder umgestalten. Diese Anleitung zum Weitergeben:
> **So meldest du dich an**
>
> 1. Öffne <https://redaktion.elternbeirat-igmh.info>.
> 2. **Email:** deine E-Mail-Adresse. **Password:** dein Passwort. Dann *Login*.
> 3. Es kommt eine E-Mail mit dem Betreff „Ihr Anmeldecode für Redaktion
> Elternbeirat". Darin steht ein Code.
> 4. Auf der Seite stehen jetzt zwei Felder:
> - **Id** ist schon ausgefüllt — **bitte nicht ändern**, auch nicht deinen
> Namen eintragen.
> - **One-time password:** hier den Code aus der E-Mail eintragen. Dann *Login*.
>
> **Kein Code gekommen?** Im Spam-Ordner nachsehen. Der Code gilt nur wenige
> Minuten; mit *Request another OTP* kommt ein neuer.
>
> **Etwas falsch eingetragen?** Kaputt geht nichts — die Seite neu laden und von
> vorn beginnen.
>
> **Eine Mail „Neue Anmeldung bei Redaktion Elternbeirat", obwohl du dich nicht
> angemeldet hast?** Sofort das Passwort ändern und dem Vorstand Bescheid geben.
**Kein Code angekommen / Mailversand kaputt?** Im Unraid-Terminal lässt sich ein
Code direkt erzeugen, ein Passwort setzen oder ein Superuser anlegen:
```bash
docker exec eb-pocketbase pocketbase superuser otp <email> --dir=/pb_data
docker exec eb-pocketbase pocketbase superuser upsert <email> <passwort> --dir=/pb_data
```
---
## Einstellungen des Admins
Diese Einstellungen liegen in `pb_data` (nicht im Repo) und sind einmalig von Hand
gesetzt. Nach einem Neuaufbau ohne Backup müssen sie wieder so eingestellt werden.
**Settings → Application**
| Einstellung | Wert | Warum |
|---|---|---|
| Application name | `Redaktion Elternbeirat` | Browser-Tab und Absendername in Mails |
| Application URL | `https://redaktion.elternbeirat-igmh.info` | Links in Mails (Passwort zurücksetzen …) |
| IP proxy headers | `X-Real-IP` | Hinter NPM sähe PocketBase sonst für alle Besucher dieselbe IP |
| Rate limiting | an, Standardregeln | Bremst Passwort-Rateversuche; braucht die echte IP von oben |
**Settings → Mail settings:** SMTP über das Strato-Postfach
`kontakt@elternbeirat-igmh.info` (`smtp.strato.de`, Port `465`, TLS immer,
`PLAIN`, Benutzer = die Adresse). Absichtlich `kontakt@` statt `noreply@`: Antwortet
ein Redakteur auf eine Systemmail, wird das gelesen. Ohne funktionierenden
Mailversand sperrt MFA alle aus — vor jeder Änderung hier mit *Send test email*
prüfen.
**`_superusers` → Options:** **OTP** und **MFA** an.
**`users` → API Rules:** alle fünf Regeln auf *Superusers only*. Die Collection
ist der Standard von PocketBase und wird von der Website nicht genutzt; ab Werk
durfte sich darüber jeder selbst registrieren. Gesperrt statt gelöscht, damit keine
Schemaänderung nötig ist.
### Mailvorlagen (`_superusers` → Options → Mail templates)
Alle fünf Vorlagen sind deutsch und teilen denselben Rahmen (Markenblau
`#2b6f9c`, nur Inline-Styles, damit jedes Mailprogramm sie gleich zeigt). Wichtig:
jede Vorlage hat ihre eigenen Platzhalter (unter dem Feld aufgelistet) — `{OTP}`
gibt es nur in der OTP-Vorlage, `{TOKEN}` nur in den Vorlagen mit Link.
| Vorlage | Betreff |
|---|---|
| Verification | `E-Mail-Adresse für {APP_NAME} bestätigen` |
| Password reset | `Passwort für {APP_NAME} zurücksetzen` |
| Confirm email change | `Neue E-Mail-Adresse für {APP_NAME} bestätigen` |
| OTP | `Ihr Anmeldecode für {APP_NAME}` |
| Login alert | `Neue Anmeldung bei {APP_NAME}` |
Der Rahmen; `INHALT` ersetzt je Vorlage der Teil darunter:
```html
<div style="font-family:Arial,Helvetica,sans-serif;background:#f4f6f8;padding:24px;">
<div style="max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;">
<div style="background:#2b6f9c;color:#ffffff;padding:16px 24px;font-size:18px;font-weight:bold;">{APP_NAME}</div>
<div style="padding:24px;color:#1f2933;font-size:15px;line-height:1.5;">
<p style="margin:0 0 16px;">Hallo,</p>
INHALT
</div>
</div>
</div>
```
Ein Knopf mit Link (Verification, Password reset, Confirm email change) sieht so
aus; nur Pfad und Beschriftung wechseln:
```html
<p style="margin:0 0 16px;text-align:center;">
<a href="{APP_URL}/_/#/auth/confirm-password-reset/{TOKEN}" target="_blank" rel="noopener" style="display:inline-block;background:#2b6f9c;color:#ffffff;text-decoration:none;padding:12px 24px;border-radius:6px;font-weight:bold;">Neues Passwort festlegen</a>
</p>
```
| Vorlage | Text vor dem Knopf | Pfad | Knopf |
|---|---|---|---|
| Verification | bitte bestätigen Sie Ihre E-Mail-Adresse: | `confirm-verification` | E-Mail-Adresse bestätigen |
| Password reset | Sie möchten Ihr Passwort zurücksetzen. Klicken Sie dazu auf den Knopf: | `confirm-password-reset` | Neues Passwort festlegen |
| Confirm email change | bitte bestätigen Sie Ihre neue E-Mail-Adresse: | `confirm-email-change` | Neue Adresse bestätigen |
Statt eines Knopfs zeigen OTP und Login alert einen hervorgehobenen Kasten
(`background:#eaf3f9;border-radius:6px;padding:12px;color:#1f5477;`) mit `{OTP}`
(groß, gesperrt, zentriert) bzw. `{ALERT_INFO}`. Jede Vorlage endet mit einem
grauen Hinweis (`color:#6b7680;font-size:13px;`), was zu tun ist, wenn die Mail
unerwartet kommt — bei OTP und Login alert: Passwort ändern und dem Vorstand
Bescheid geben.
---
## Die Inhaltsarten (Collections)
@@ -43,6 +162,7 @@ der passenden Collection (Button *New record*).
| `events` | Termine (Kalender) | `/events` und der `.ics`-Feed |
| `faq_topics` | Themen der häufigen Fragen (z. B. „Mensa und Mittagessen") | Als aufklappbare Gruppen auf `/faqs` |
| `faqs` | Häufige Fragen | Auf `/faqs`, in der Gruppe ihres Themas |
| `documents` | PDF-Dokumente zum Herunterladen (Formulare, Elternbriefe …) | `/dokumente/<slug>.pdf`, als Liste auf jeder Seite mit `embed = documents` (z. B. `/downloads`) |
Jede Collection hat als **letztes Feld `public`** (ja/nein). Nur Records mit
`public = true` erscheinen auf der Website — so lässt sich ein Entwurf anlegen,
@@ -57,7 +177,8 @@ Redaktion arbeitet mit **Daten**, nicht mit Struktur. Konkret:
| Beitrag / Termin / Frage hinzufügen | **Ja** | Neuer Record in `posts` / `events` / `faqs` — erscheint sofort in der jeweiligen Liste |
| Neues FAQ-Thema (neue Gruppe auf `/faqs`) | **Ja** | Neuer Record in `faq_topics` (siehe *Häufige Fragen*) |
| Neue Textseite | **Ja** | Neuer Record in `pages` (siehe unten) |
| Eine Seite mit einer Liste anteasern | **Ja** | Feld `embed` der Seite (`posts`/`events`) |
| PDF zum Herunterladen bereitstellen oder ersetzen | **Ja** | Record in `documents` (siehe *Dokumente*) |
| Eine Seite mit einer Liste anteasern | **Ja** | Feld `embed` der Seite (`posts`/`events`/`documents`) |
| **Neue Art von Liste** (eigene Seite mit eigener Sortierung/Gruppierung und eigener Adresse, z. B. „Protokolle") | **Nein** | Braucht Entwicklung: neue Collection **plus** Code |
Das heißt: **Bestehende Listen lassen sich beliebig erweitern**, aber eine *neue*
@@ -100,8 +221,9 @@ sofort live, ohne Code und ohne Rebuild:
`location` (`header` oder `footer`) und `order` (Reihenfolge, ab 1). Die App
baut Kopf- und Fußnavigation daraus; nichts wird im Markup angefasst.
- **Eingebettete Blöcke:** Das Feld `embed` (Mehrfachauswahl aus
`posts`/`events`) hängt unter den Text der Seite dynamische Blöcke. So ist die
Startseite (`home`) eine normale Seite mit `embed = [posts, events]`. Leeres
`posts`/`events`/`documents`) hängt unter den Text der Seite dynamische Blöcke.
So ist die Startseite (`home`) eine normale Seite mit `embed = [posts, events]`,
und die Seite `downloads` hat `embed = [documents]`. Leeres
`embed` = reine Textseite. Die FAQ-Liste ist kein `embed`: `/faqs` ist eine
feste Ansicht (siehe *Häufige Fragen*).
@@ -206,7 +328,8 @@ So erscheint ein Termin auf seiner Karte:
(`19:30–21:00 Uhr`), bei mehrtägigen Terminen „bis …“ mit dem letzten Tag. Ein
ganztägiger Termin (Uhrzeit `00:00`) ohne `end` zeigt keine Uhrzeit.
- Darunter `location` und `note`. Auf der Startseite wird `note` nach zwei
Zeilen abgeschnitten, auf `/events` steht sie ganz.
Zeilen abgeschnitten, auf `/events` steht sie ganz. `note` ist reiner Text
(kein Markdown); Zeilenumbrüche, die du mit Enter eingibst, bleiben erhalten.
Einen Einleitungstext über der Liste schreibst du in den `body` der Seite mit
dem Slug `events` (unter `pages`); die Website fügt keinen eigenen hinzu.
@@ -256,6 +379,49 @@ Eine Frage hat `question`, `answer` (Markdown), `topic`, `order` und `public`.
---
## Dokumente (`documents`)
Ein Dokument ist ein PDF, das du im Admin **hochlädst** — kein Entwickler, kein
Rebuild. Es ist sofort unter einer festen Adresse erreichbar und erscheint in der
Download-Liste.
Ein Dokument hat `title`, `slug`, `file`, `category` (optional), `order` und
`public`.
- `title` ist der Name auf der Datei-Karte (z. B. `Aufnahmeantrag Förderverein`).
- `slug` bestimmt die Adresse: `slug = einzugsermaechtigung` ergibt
`/dokumente/einzugsermaechtigung.pdf`. Englisch oder deutsch, aber klein und
**ohne Umlaute** — dieselbe Regel wie bei Seiten. Jeder Slug darf nur einmal
vorkommen.
- `file` ist das PDF selbst (Button *Upload new file*). Nur PDF, höchstens 20 MB.
- `category` gruppiert die Liste: Dokumente mit derselben Kategorie (z. B.
`Förderverein`) stehen unter einer gemeinsamen Zwischenüberschrift. Leer = ohne
Überschrift.
- `order` legt die Reihenfolge fest (kleinere Zahl zuerst). Die Gruppen stehen in
der Reihenfolge ihres ersten Dokuments.
**Wo die Liste erscheint:** auf jeder Seite, deren `embed` den Wert `documents`
enthält — also auf `/downloads`. Ein einzelnes Dokument kannst du außerdem in
jedem Text verlinken; es wird dort zur Datei-Karte, wenn der Link allein in einer
Zeile steht (siehe *Links, die sich automatisch verändern*):
```markdown
[Einzugsermächtigung](/dokumente/einzugsermaechtigung.pdf)
```
**Neue Fassung hochladen:** im bestehenden Record die Datei ersetzen und
speichern. Der `slug` bleibt, also bleibt auch die Adresse — Links in Seiten,
Briefen oder auf einem QR-Code funktionieren weiter. Deshalb einen Slug nicht
nachträglich ändern, wenn er schon verteilt wurde.
> **Wichtig:** Ein hochgeladenes PDF ist **öffentlich**, sobald `public` gesetzt
> ist. Ohne `public` ist es auch über die PocketBase-Schnittstelle nicht abrufbar
> (die API-Regeln von `documents` lauten `public = true`, anders als bei den
> übrigen Collections). PocketBase ist trotzdem kein Ablageort für Vorstandsinterna,
> und PDFs mit Namen, Adressen oder Unterschriften vorher prüfen (`docs/recht.md`).
---
## Gestaltungsbausteine
Alle Texte (`body` von Seiten und Beiträgen, `intro` und `answer` bei den FAQs)
@@ -371,8 +537,8 @@ Bei dringenden Angelegenheiten wenden Sie sich bitte direkt an das Sekretariat.
- [Einzugsermächtigung](/dokumente/einzugsermaechtigung.pdf)
```
Die PDF-Dateien selbst liegen nicht in PocketBase, sondern im Code unter
`wwwroot/dokumente/` (ein neues PDF braucht also einen Entwickler).
Die PDF-Dateien selbst lädst du in der Collection `documents` hoch (siehe
*Dokumente*); deren Adresse ist `/dokumente/<slug>.pdf`.
- **E-Mail-Link allein in einem Absatz** wird zum Button:
```markdown
@@ -399,8 +565,11 @@ ab. Auf dem Handy lässt sich eine breite Tabelle seitlich schieben.
- **Nach dem Ändern einer Zugriffsregel** immer den Haupt-*Save* der Collection
drücken, sonst greift die Änderung nicht.
- Die fünf Collections sind öffentlich **lesbar** (List/View offen), aber nur
- Die Inhalts-Collections sind öffentlich **lesbar** (List/View offen), aber nur
eingeloggt **schreibbar** — ein Schreibversuch ohne Login wird abgewiesen. Das
ist Absicht; nicht „vereinfachen".
- **Backup:** Der gesamte Inhalt liegt in `pb_data`. Ein Backup dieses
- Ausnahme `documents`: List/View lauten `public = true`, damit ein PDF-Entwurf
auch über die Schnittstelle unsichtbar bleibt. Ebenfalls Absicht.
- **Backup:** Der gesamte Inhalt liegt in `pb_data` — auch die hochgeladenen
PDFs (unter `pb_data/storage`). Ein Backup dieses
Verzeichnisses (plus Restore-Test) ist der Sicherungsweg — eingerichtet in #9.
-90
View File
@@ -1,90 +0,0 @@
# Unraid infrastructure
What runs on the Unraid host and how the website stack fits in. This is the
**actual state** on the server. How to deploy a new version: `deployment.md`.
## Host
| | |
|---|---|
| LAN IP | `192.168.1.14` |
| Web UI | `https://unraid.server:44302` |
| Version | Unraid OS 7.0.1 |
| Stack management | Gitea Actions (`.gitea/workflows/deploy.yml`), no Compose Manager |
| Docker network for NPM | `proxynet` (created with `docker network create proxynet`) |
**Settings → Docker → Advanced View → Preserve user defined networks: Yes.**
Without it Unraid deletes `proxynet` on every Docker restart, and every container
attached to it fails to start.
## Website stack
The stack is deployed by `.gitea/workflows/deploy.yml` as project `eb-stack`,
straight from the repo's `compose.yaml` (`deployment.md`). It is **not** a Compose
Manager stack: there is no copy of the compose file on the server. It shows up
on the Docker tab like any other container.
The `Gitea-Runner` container runs the deploy. It has `/var/run/docker.sock` mounted,
so the workflow's `docker compose` talks to the Unraid daemon directly.
> **Network names.** The stack's own network has the fixed name `eb-internal`.
> Changing a network name needs `docker compose down` and then `up`; a plain `up`
> fails because the existing containers still point at the old network.
| Container | Network | Container port | Host port |
|---|---|---|---|
| `eb-blazor` | `eb-internal`, `proxynet` | `8080` | – |
| `eb-pocketbase` | `eb-internal`, `proxynet` | `8090` | – |
| `eb-ddns` | `eb-internal` | – | – |
Persistent data: `/mnt/user/appdata/pocketbase/pb_data` → `/pb_data`.
## Nginx Proxy Manager
The container is called **`nginx`** and runs on the network `proxynet`.
| Container port | Host port |
|---|---|
| `8080` (HTTP) | `80` |
| `4443` (HTTPS) | `443` |
| admin UI | `7818` (`http://192.168.1.14:7818`) |
| config | `/mnt/cache/appdata/nginx` → `/config` |
> **Why `proxynet` and not `bridge`:** Docker's default `bridge` has no name
> resolution. On `proxynet` NPM reaches `eb-blazor:8080` by name, so the site needs
> no host port.
### Active proxy hosts
Except for the website stack, destinations use LAN host names (`unraid.server`),
resolved by the LAN DNS, never container IPs. That is why they kept working when
NPM moved from `bridge` to `proxynet`.
| Source | Destination | SSL |
|---|---|---|
| `elternbeirat-igmh.info`, `www.elternbeirat-igmh.info` | `http://eb-blazor:8080` | Let's Encrypt |
| `redaktion.elternbeirat-igmh.info` | `http://eb-pocketbase:8090` (`/` → `/_/`) | Let's Encrypt |
| `gitea.anticarnist.de` | `http://unraid.server:3005` | Let's Encrypt |
| `cloud.anticarnist.de` | `https://unraid.server:44304` | Let's Encrypt |
| `home.anticarnist.de` | `http://unraid.server:44303` | Let's Encrypt |
| `assistant.anticarnist.de` | `http://192.168.1.15:8123` | Let's Encrypt |
Further hosts (`*.katzenfunk.de`, `anticarnist.de` → `arch.server` / SearXNG)
exist but are offline and unused.
## Other containers on the host
Except for AdGuard, all of these run on `bridge` and have nothing to do with the
website. They are listed so it is clear which ports are taken.
| Container | Host ports |
|---|---|
| AdGuard-Home | own IP `192.168.1.7` (`br0`) |
| flame | `44303` |
| Gitea | `2205` (SSH), `3005` (HTTP) |
| Gitea-Runner | – |
| nextcloud | `44304` |
| piper | `10200` |
| postgresql15 | `5432` |
| SearXNG | `1234` (stopped) |
| UptimeKuma | `3001` |
+35 -2
View File
@@ -21,7 +21,7 @@ migrate((app) => {
const schema = JSON.parse(toString($os.readFile("/pb_migrations/collections_schema.json")))
const records = {
pages: [{"body":"Der Elternbeirat der IGMH vertritt die Interessen aller Eltern gegenüber der Schulleitung und dem Kollegium. Wir treffen uns regelmäßig, bringen Anliegen aus der Elternschaft ein und begleiten das Schulleben aktiv.\n\nDer Vorstand wurde am 13. November 2025 gewählt.\n\n## Vorsitz\n\n::: team gross\n- **Maik Palm** (Vorsitzender) \n *Schulkonferenz, Mensarat, Homepage* \n Mitglied im Gesamtelternbeirat und im Schulbeirat der Stadt Mannheim.\n- **Gentiana Erol** (1. Stellvertreterin) \n *Schulkonferenz, Kommunikation Hausmeister, Mensarat*\n- **Raul Chira** (2. Stellvertreter) \n *Mensarat*\n:::\n\n## Schriftführung\n\n::: team\n- **Marion Leininger** \n *Kasse, Schriftführung, Kontakt Förderverein*\n:::\n\n## Beisitz\n\n::: team\n- **Jenny Reger-Stilgenbauer** \n *Schulkonferenz, Schaukasten*\n- **Mariella Ianello** \n *Mensarat, Kontakt Förderverein*\n- **Isabell Vesper**\n- **Susanne Naumburg** \n *Stellvertretende Schulkonferenz*\n- **Rebecca Goldmann**\n- **Michael Weber** \n *Stellvertretende Schulkonferenz*\n:::\n\n## So erreichen Sie uns\n\nAm schnellsten per Mail über unsere [Kontaktseite](/contact). Zu unseren öffentlichen Sitzungen sind alle Eltern herzlich eingeladen. Die Termine finden Sie unter [Termine](/events).","embed":[],"location":"header","order":2,"public":true,"slug":"board","title":"Vorstandsteam"},{"body":"Der Förderverein **„Freunde der IGMH e.V.\"** unterstützt die Schule seit 1975 bei Anschaffungen und Projekten, die aus dem regulären Schulbudget nicht finanziert werden können.\n\n::: kennzahlen\n- **seit 1975** im Einsatz für die IGMH\n- **über 500** Mitglieder\n- **ab 10 €** Jahresbeitrag\n:::\n\n::: hinweis\nDer Förderverein ist ein eigenständiger, gemeinnützig anerkannter Verein und nicht Teil des Elternbeirats.\n:::\n\n## Was der Verein fördert\n\n::: kacheln\n- **Pädagogik** Bessere Rahmenbedingungen für die Arbeit an der Schule\n- **Projekte** Musische, sportliche und kulturelle Vorhaben\n- **Ausstattung** Anschaffungen, die allen Schülerinnen und Schülern zugutekommen\n- **Chancengerechtigkeit** Damit kein Kind aus finanziellen Gründen zurückbleibt\n:::\n\n## Was bereits gefördert wurde\n\n- Rennräder, Bälle, Trikots sowie Sport- und Spielgeräte für AGs\n- Zuschüsse für Chorwochenenden und Kanutage\n- Unterstützung der Theater-AG\n- Veranstaltungstechnik und Musikinstrumente, zum Beispiel DJ-Mischpult und Klavier\n- Vor- und Mitfinanzierung der Schülerhandbücher\n- Kletterwand, Außenmöbel in den Innenhöfen, Sitzbänke im Schulhaus und Wasserspender im Mensabereich\n- Laptops und Tablets für den Unterricht\n\n## Mitglied werden\n\nMitglied werden kann, wer die Arbeit der Schule unterstützen möchte. Eine Mitgliedschaft ist bereits ab einem Jahresbeitrag von **10 €** möglich.\n\n::: aufruf\nDie Beitrittserklärung füllen Sie online beim Förderverein aus.\n\n[Zur Beitrittserklärung](https://easyverein.com/public/FDI/applicationform/21612)\n:::\n\n## Spenden\n\nSpenden sind jederzeit willkommen und werden auf Wunsch mit einer Zuwendungsbestätigung quittiert. Der Verein ist als gemeinnützig anerkannt. Wie Sie spenden können, erfahren Sie beim Förderverein.\n\n## Kontakt zum Förderverein\n\n**Freunde der IGMH e.V.** \nHerzogenriedstraße 50 \n68169 Mannheim \n(Fach 165)\n\nE-Mail: [foerderverein@igmh.de](mailto:foerderverein@igmh.de) \nWebsite: [foerderverein.igmh.de](https://foerderverein.igmh.de)","embed":[],"location":"header","order":3,"public":true,"slug":"patrons","title":"Förderverein"},{"body":"Auf dieser Seite haben wir die Fragen zusammengetragen, die uns am häufigsten erreichen.\n\nIhre Frage ist nicht dabei? Schreiben Sie uns über die [Kontaktseite](/contact) – wir helfen gern weiter.","embed":[],"location":"header","order":6,"public":true,"slug":"faqs","title":"FAQs"},{"body":"Formulare und Dokumente zum Herunterladen:\n\n- [Aufnahmeantrag Förderverein](/dokumente/aufnahmeantrag-foerderverein.pdf)\n- [Einzugsermächtigung](/dokumente/einzugsermaechtigung.pdf)\n- [Erstattungsformular Klassenkasse](/dokumente/erstattungsformular-klassenkasse.pdf)\n\n::: hinweis\nFehlt ein Dokument? Melden Sie sich über die [Kontaktseite](/contact).\n:::","embed":[],"location":"header","order":7,"public":true,"slug":"downloads","title":"Downloads"},{"body":"Haben Sie eine Frage, eine Anregung oder möchten Sie sich einbringen? Der Elternbeirat der IGMH freut sich über jede Nachricht.\n\n[kontakt@elternbeirat-igmh.info](mailto:kontakt@elternbeirat-igmh.info)\n\nIn der Regel melden wir uns innerhalb weniger Tage zurück.\n\n::: hinweis\nBei dringenden schulischen Angelegenheiten wenden Sie sich bitte direkt an das Sekretariat der IGMH.\n:::","embed":[],"location":"footer","order":1,"public":true,"slug":"contact","title":"Kontakt"},{"body":"# Impressum\n\nAngaben gemäß § 5 DDG\n\n**Elternbeirat der IGMH**\nVertreten durch den Vorstand\n\nKontakt: siehe [Kontaktseite](/contact)\n\nLine truncated
pages: [{"body":"Der Elternbeirat der IGMH vertritt die Interessen aller Eltern gegenüber der Schulleitung und dem Kollegium. Wir treffen uns regelmäßig, bringen Anliegen aus der Elternschaft ein und begleiten das Schulleben aktiv.\n\nDer Vorstand wurde am 13. November 2025 gewählt.\n\n## Vorsitz\n\n::: team gross\n- **Maik Palm** (Vorsitzender) \n *Schulkonferenz, Mensarat, Homepage* \n Mitglied im Gesamtelternbeirat und im Schulbeirat der Stadt Mannheim.\n- **Gentiana Erol** (1. Stellvertreterin) \n *Schulkonferenz, Kommunikation Hausmeister, Mensarat*\n- **Raul Chira** (2. Stellvertreter) \n *Mensarat*\n:::\n\n## Schriftführung\n\n::: team\n- **Marion Leininger** \n *Kasse, Schriftführung, Kontakt Förderverein*\n:::\n\n## Beisitz\n\n::: team\n- **Jenny Reger-Stilgenbauer** \n *Schulkonferenz, Schaukasten*\n- **Mariella Ianello** \n *Mensarat, Kontakt Förderverein*\n- **Isabell Vesper**\n- **Susanne Naumburg** \n *Stellvertretende Schulkonferenz*\n- **Rebecca Goldmann**\n- **Michael Weber** \n *Stellvertretende Schulkonferenz*\n:::\n\n## So erreichen Sie uns\n\nAm schnellsten per Mail über unsere [Kontaktseite](/contact). Zu unseren öffentlichen Sitzungen sind alle Eltern herzlich eingeladen. Die Termine finden Sie unter [Termine](/events).","embed":[],"location":"header","order":2,"public":true,"slug":"board","title":"Vorstandsteam"},{"body":"Der Förderverein **„Freunde der IGMH e.V.\"** unterstützt die Schule seit 1975 bei Anschaffungen und Projekten, die aus dem regulären Schulbudget nicht finanziert werden können.\n\n::: kennzahlen\n- **seit 1975** im Einsatz für die IGMH\n- **über 500** Mitglieder\n- **ab 10 €** Jahresbeitrag\n:::\n\n::: hinweis\nDer Förderverein ist ein eigenständiger, gemeinnützig anerkannter Verein und nicht Teil des Elternbeirats.\n:::\n\n## Was der Verein fördert\n\n::: kacheln\n- **Pädagogik** Bessere Rahmenbedingungen für die Arbeit an der Schule\n- **Projekte** Musische, sportliche und kulturelle Vorhaben\n- **Ausstattung** Anschaffungen, die allen Schülerinnen und Schülern zugutekommen\n- **Chancengerechtigkeit** Damit kein Kind aus finanziellen Gründen zurückbleibt\n:::\n\n## Was bereits gefördert wurde\n\n- Rennräder, Bälle, Trikots sowie Sport- und Spielgeräte für AGs\n- Zuschüsse für Chorwochenenden und Kanutage\n- Unterstützung der Theater-AG\n- Veranstaltungstechnik und Musikinstrumente, zum Beispiel DJ-Mischpult und Klavier\n- Vor- und Mitfinanzierung der Schülerhandbücher\n- Kletterwand, Außenmöbel in den Innenhöfen, Sitzbänke im Schulhaus und Wasserspender im Mensabereich\n- Laptops und Tablets für den Unterricht\n\n## Mitglied werden\n\nMitglied werden kann, wer die Arbeit der Schule unterstützen möchte. Eine Mitgliedschaft ist bereits ab einem Jahresbeitrag von **10 €** möglich.\n\n::: aufruf\nDie Beitrittserklärung füllen Sie online beim Förderverein aus.\n\n[Zur Beitrittserklärung](https://easyverein.com/public/FDI/applicationform/21612)\n:::\n\n## Spenden\n\nSpenden sind jederzeit willkommen und werden auf Wunsch mit einer Zuwendungsbestätigung quittiert. Der Verein ist als gemeinnützig anerkannt. Wie Sie spenden können, erfahren Sie beim Förderverein.\n\n## Kontakt zum Förderverein\n\n**Freunde der IGMH e.V.** \nHerzogenriedstraße 50 \n68169 Mannheim \n(Fach 165)\n\nE-Mail: [foerderverein@igmh.de](mailto:foerderverein@igmh.de) \nWebsite: [foerderverein.igmh.de](https://foerderverein.igmh.de)","embed":[],"location":"header","order":3,"public":true,"slug":"patrons","title":"Förderverein"},{"body":"Auf dieser Seite haben wir die Fragen zusammengetragen, die uns am häufigsten erreichen.\n\nIhre Frage ist nicht dabei? Schreiben Sie uns über die [Kontaktseite](/contact) – wir helfen gern weiter.","embed":[],"location":"header","order":6,"public":true,"slug":"faqs","title":"FAQs"},{"body":"Formulare und Dokumente zum Herunterladen.\n\n::: hinweis\nFehlt ein Dokument? Melden Sie sich über die [Kontaktseite](/contact).\n:::","embed":["documents"],"location":"header","order":7,"public":true,"slug":"downloads","title":"Downloads"},{"body":"Haben Sie eine Frage, eine Anregung oder möchten Sie sich einbringen? Der Elternbeirat der IGMH freut sich über jede Nachricht.\n\n[kontakt@elternbeirat-igmh.info](mailto:kontakt@elternbeirat-igmh.info)\n\nIn der Regel melden wir uns innerhalb weniger Tage zurück.\n\n::: hinweis\nBei dringenden schulischen Angelegenheiten wenden Sie sich bitte direkt an das Sekretariat der IGMH.\n:::","embed":[],"location":"footer","order":1,"public":true,"slug":"contact","title":"Kontakt"},{"body":"# Impressum\n\nAngaben gemäß § 5 DDG\n\n**Elternbeirat der IGMH**\nVertreten durch den Vorstand\n\nKontakt: siehe [Kontaktseite](/contact)\n\nVerantwortlich für den Inhalt nach § 18 Abs. 2 MStV: der Vorstand des Elternbeirats.","embed":[],"location":"footer","order":2,"public":true,"slug":"imprint","title":"Impressum"},{"body":"# Datenschutz\n\nDer Schutz IhLine truncated
,
posts: [{"body":"In fast allen Familien wird über die Handy-Nutzung diskutiert. Auch im schulischen Alltag ist das immer wieder ein Thema.\n\nSinnvolles und weniger Sinnvolles ist mit dem Handy möglich. Viele Jugendliche haben das Handy bis in die späten Abendstunden und über Nacht bei sich, was natürlich zur Nutzung verführt. Innerhalb der Familie dazu Regelungen zu finden, ist nicht einfach. Auch wir in der Schule kennen diese Gespräche.\n\nWir möchten Ihnen ein Angebot digitaler Elternmodule zu diesem Themenfeld vorstellen und kurz aus schulischer, sozialpädagogischer und strafrechtlicher Sicht zur Handynutzung informieren.\n\n**Dienstag, 18. Februar 2025 um 18 Uhr im Hörsaal 2.**\n\nBitte geben Sie kurz über die Klassenleitung Rückmeldung, dass Sie teilnehmen werden.","date":"2025-02-07 12:00:00.000Z","public":true,"slug":"elternabend-handy-nutzung","title":"Elternabend zur Handy-Nutzung"},{"body":"Am 8. Februar öffnete die IGMH ihre Türen für interessierte Eltern und Kinder, die sich einen Eindruck von unserer Schule verschaffen wollten. Besonders Eltern, die planen, ihre Kinder im kommenden Schuljahr anzumelden, konnten sich umfassend informieren und direkt einen Anmeldetermin vereinbaren.\n\n## Vielfältige Einblicke in das Schulleben\n\nAn verschiedenen Stationen lernten die Besucherinnen und Besucher das breite Angebot der IGMH kennen. Die Eliteschule des Sports präsentierte ihre Fördermöglichkeiten, und Schulhund Tonka ließ viele Kinderherzen höherschlagen. Auch der Elternbeirat und der Förderverein der IGMH informierten in der Aula über ihre Arbeit.\n\nFür die jungen Gäste gab es zahlreiche Mitmach-Aktionen:\n\n- Im römischen Zimmer konnten sie sich spielerisch mit der lateinischen Sprache beschäftigen.\n- Im Chemielabor wurden spannende Experimente durchgeführt.\n- Die Kletterwand war ein echter Publikumsmagnet, hier ging es unter professioneller Sicherung hoch hinaus.\n\n## Unterhaltung und kulinarische Highlights\n\n- Die Schülerband begeisterte das Publikum mit ihren Auftritten in der Aula.\n- Im Hörsaal 2 führten die 6. und 7. Klassen eine unterhaltsame Theateraufführung auf.\n- Für das leibliche Wohl war bestens gesorgt, ob im gemütlichen Schülercafé oder im Bistro Français.\n\nDer Tag der offenen Tür war ein voller Erfolg und lockte zahlreiche Besucherinnen und Besucher an. Die positive Resonanz zeigt, wie groß das Interesse an unserer Schule ist.","date":"2025-02-09 12:00:00.000Z","public":true,"slug":"tag-der-offenen-tuer-2025","title":"Rückblick: Tag der offenen Tür an der IGMH"},{"body":"Digitale Medien spielen eine zentrale Rolle im Alltag von Kindern und Jugendlichen, sei es das Smartphone, ein Tablet oder die Spielkonsole. Doch was machen junge Menschen eigentlich damit? Welcher Erwachsene weiß genau, was sich auf WhatsApp, Instagram oder Snapchat abspielt? Und was passiert auf TikTok? Wann wird ein Videospiel zur Sucht? Und welches Vorbild geben wir als Erwachsene ab, wenn auch unser eigener Alltag vom Smartphone bestimmt wird?\n\n## Digitaler Medienelternabend an der IGMH\n\nVor Kurzem fand an der IGMH ein digitaler Medienelternabend statt, der auf großes Interesse stieß. Frau Ruthig, stellvertretende Mittelstufenleiterin, führte in das Thema ein und beleuchtete die Herausforderungen der Mediennutzung.\n\nAnschließend erklärte Schulpolizist Herr Ebert die juristischen Aspekte. Dabei zeigte er auf, welche Möglichkeiten Eltern haben, wenn ihr Kind von Cybermobbing betroffen ist:\n\n- Gespräch mit Schule und Polizeibeamten\n- Gespräch mit dem Präventionsbeamten der Polizei\n- Durchführung eines Präventionstermins in der Klasse\n- Mit Einverständnis der Eltern des Täters: Gespräch mit dem Täter\n- Mit Einverständnis der Eltern des Täters: Gespräch mit Täter, Opfer, Eltern und Schule\n- Strafanzeige durch die Polizei\n\nWeiterführende Informationen zu Computerspielen finden Sie unter [usk.de](http://www.usk.de) (USK Unterhaltungssoftware) und [zavatar.de](http://www.zavatar.de).\n\n## Herausforderungen der Handynutzung aus sozialpädagogischer Sicht\n\nFrau Graske (Sozialpädagogin) stellte die Herausforderungen aus Sicht der Schulsozialarbeit dar und gab Eltern konkrete Tipps:\n\n**1. Bildschirmzeit im Blick behalten**\n\n**2. Handy am Abend außer Reichweite bringen.** Vereinbaren Sie einen festen Schlafplatz für das Handy und aktivieren Sie einen Ruhemodus.\n\n**3. Online-Kontakte des Kindes sensibel begleiten.** Lassen Sie sich Chat-Gruppen zeigen, schauen Sie gemeinsam das TikTok-Profil an und nutzen Sie Ratschläge von [Clemens hilft](https://www.clemenshilft.de/).\n\n**4. Bleiben Sie die wichtigste Ansprechperson für Ihr Kind.** Zeigen Sie, dass Ihr Kind Ihnen vertrauen kann, begründen Sie Ihre Maßnahmen und bleiben Sie offen für Fragen. Der [Mediennutzungsvertrag](https://www.mediennutzungsvertrag.de/) hilft bei klaren Absprachen.\n\n**5. Denken Sie auch an sich selbst.** Anerkennen Sie Ihren Einsatz, seien Line truncated
,
@@ -34,6 +34,10 @@ migrate((app) => {
// "topic" is a slug here, not a relation id: the record loader below resolves it
// to the faq_topics id, since the ids are only known once the topics are saved.
faqs: [{"answer":"Die Anmeldung läuft über das Bestellsystem der Schule. Die Zugangsdaten erhalten Sie zu Schuljahresbeginn über die Klassenleitung.","public":true,"question":"Wie melde ich mein Kind zum Mittagessen an?","topic":"cafeteria","order":1},{"answer":"Ein Mittagessen kostet aktuell **4,20 €**. Für Familien mit Anspruch auf Leistungen nach dem Bildungs- und Teilhabepaket ist das Essen kostenfrei – sprechen Sie das Sekretariat an.","public":true,"question":"Was kostet ein Mittagessen?","topic":"cafeteria","order":2},{"answer":"Ja, täglich steht mindestens ein vegetarisches Gericht zur Wahl.","public":true,"question":"Gibt es vegetarische Gerichte?","topic":"cafeteria","order":3},{"answer":"Schließfächer werden über einen externen Anbieter gemietet. Das Anmeldeformular liegt bei den [Downloads](/downloads).","public":true,"question":"Wie bekommt mein Kind ein Schließfach?","topic":"lockers","order":1},{"answer":"Die Miete beträgt rund 15 € pro Schuljahr zuzüglich einer Kaution, die bei Rückgabe erstattet wird.","public":true,"question":"Was kostet die Miete?","topic":"lockers","order":2},{"answer":"Wenden Sie sich an den Anbieter; die Kontaktdaten stehen auf dem Mietvertrag. Bei Fragen hilft auch der [Elternbeirat](/contact).","public":true,"question":"Der Schlüssel ist verloren – was nun?","topic":"lockers","order":3},{"answer":"Der Eltern-Euro ist ein **freiwilliger** Beitrag, mit dem kleinere Anschaffungen für die Klassen unkompliziert finanziert werden – etwa Bastelmaterial oder Ausflüge.","public":true,"question":"Was ist der Eltern-Euro?","topic":"parent-euro","order":1},{"answer":"Nein. Der Beitrag ist ausdrücklich freiwillig, und niemand wird bei Nichtzahlung benachteiligt.","public":true,"question":"Ist der Beitrag verpflichtend?","topic":"parent-euro","order":2},{"answer":"Ob Schulfest, Basar oder eine helfende Hand bei Ausflügen – über jede Unterstützung freuen wir uns. Melden Sie sich einfach über die [Kontaktseite](/contact).","public":true,"question":"Wie kann ich mich engagieren?","topic":"parent-involvement","order":1},{"answer":"Nein. Viele Aufgaben erledigen Eltern, die einfach mithelfen möchten, ganz ohne Amt.","public":true,"question":"Muss ich in den Elternbeirat gewählt sein, um zu helfen?","topic":"parent-involvement","order":2}]
,
// The PDFs are generated at seed time (samplePdf below), so the repo carries no
// binary files. The slugs match the links editors may already use in page bodies.
documents: [{"title":"Aufnahmeantrag Förderverein","slug":"aufnahmeantrag-foerderverein","category":"Förderverein","order":1,"public":true},{"title":"Einzugsermächtigung","slug":"einzugsermaechtigung","category":"Förderverein","order":2,"public":true},{"title":"Erstattungsformular Klassenkasse","slug":"erstattungsformular-klassenkasse","category":"Klassenkasse","order":3,"public":true}]
,
}
@@ -56,9 +60,11 @@ migrate((app) => {
for (const [name, rows] of Object.entries(records)) {
if (app.countRecords(name) > 0) continue
const collection = app.findCollectionByNameOrId(name)
for (const data of rows) {
for (let data of rows) {
// A faq's "topic" is a topic slug in this seed; swap it for the real id.
if (name === "faqs") data = { ...data, topic: faqTopicIdBySlug[data.topic] }
// A document needs a file upload; attach a generated one-page PDF.
if (name === "documents") data = { ...data, file: $filesystem.fileFromBytes(samplePdf(data.title), data.slug + ".pdf") }
const record = new Record(collection)
record.load(data)
app.save(record)
@@ -66,6 +72,33 @@ migrate((app) => {
if (name === "faq_topics") faqTopicIdBySlug[data.slug] = record.id
}
}
// A minimal one-page PDF showing the title, as a byte array (what fileFromBytes
// takes). The xref offsets are computed, so viewers open it without a repair warning.
// WinAnsiEncoding maps the Latin-1 char codes (umlauts, ß) to the right glyphs, so
// one char is one byte; anything beyond Latin-1 is written as "?".
function samplePdf(title) {
const text = title.replace(/[^\x20-\xff]/g, "?").replace(/[()\\]/g, "")
const stream = `BT /F1 24 Tf 72 720 Td (${text}) Tj ET`
const objects = [
"<< /Type /Catalog /Pages 2 0 R >>",
"<< /Type /Pages /Kids [3 0 R] /Count 1 >>",
"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Contents 4 0 R /Resources << /Font << /F1 5 0 R >> >> >>",
`<< /Length ${stream.length} >>\nstream\n${stream}\nendstream`,
"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>",
]
let pdf = "%PDF-1.4\n"
const offsets = []
objects.forEach((body, index) => {
offsets.push(pdf.length)
pdf += `${index + 1} 0 obj\n${body}\nendobj\n`
})
const xref = pdf.length
pdf += `xref\n0 ${objects.length + 1}\n0000000000 65535 f \n`
pdf += offsets.map((offset) => `${String(offset).padStart(10, "0")} 00000 n \n`).join("")
pdf += `trailer\n<< /Size ${objects.length + 1} /Root 1 0 R >>\nstartxref\n${xref}\n%%EOF\n`
return Array.from(pdf, (char) => char.charCodeAt(0))
}
}, (app) => {
// Down: intentionally a no-op. This seed is a dev convenience; to start over,
// drop the whole dev volume: `docker volume rm eb-stack_pb_data_dev`.
+121 -2
View File
@@ -309,7 +309,7 @@
"help": "",
"hidden": false,
"id": "select1203373331",
"maxSelect": 2,
"maxSelect": 3,
"name": "embed",
"presentable": false,
"required": false,
@@ -317,7 +317,8 @@
"type": "select",
"values": [
"posts",
"events"
"events",
"documents"
]
},
{
@@ -534,5 +535,123 @@
"created": "2026-09-23 11:59:13.899Z",
"updated": "2026-09-23 11:59:13.899Z",
"system": false
},
"documents": {
"id": "pbc_2729472648",
"listRule": "public = true",
"viewRule": "public = true",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "documents",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 0,
"name": "slug",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 20971520,
"mimeTypes": [
"application/pdf"
],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text105650625",
"max": 0,
"min": 0,
"name": "category",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "number4113142680",
"max": null,
"min": null,
"name": "order",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [
"CREATE UNIQUE INDEX `idx_documents_slug` ON `documents` (`slug`)"
],
"created": "2026-10-12 10:00:00.000Z",
"updated": "2026-10-12 10:00:00.000Z",
"system": false
}
}