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>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-10-12 22:15:18 +02:00
1 parent 97321e2b49
commit f1a06956f7
18 files changed
+641 -31

No files matched your search

+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
}
}