Files
tibi-svelte-starter/api/config.yml
T
LeanAgent 45a021fb53
deploy to production / deploy (push) Successful in 43s
chore: YAML-Schemas in Dateiköpfe, tibi-types auf 4c55f82
- yaml-language-server-Schema direkt in jeder api-YAML statt
  .vscode/yaml.schemas-Mapping (exakter pro Datei, kein Glob-Rätsel)
- erweiterte meta.agent-Doku in den Collections
- tibi-types-Submodul auf 4c55f82 (meta.agent- + meta.query-Schemas)
2026-10-12 16:15:16 +00:00

102 lines
4.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# yaml-language-server: $schema=../tibi-types/schemas/config/project.schema.json
namespace: __TIBI_NAMESPACE__
meta:
agent:
description: "Tibi Svelte starter: Svelte 5 SPA with pagebuilder blocks, goja SSR, per-language navigation."
frontend:
routes: "/:lang/* (e.g. /de/, /de/ueber-uns); / redirects to browser language; content.path stored without language prefix"
lookup: "content: blocks.heroImage.image:medialib, blocks.image:medialib; navigation: elements.page:content; comments via aggregate on comment.contentId"
rendering: "App.svelte loads getCachedEntries(content, {lang, path, active:true} + lookup); BlockRenderer maps Hero/Features/Richtext/Accordion/ContactForm; images only via widgets/MedialibImage.svelte"
designGuide: "Future free code/HTML blocks: add block type in content.blocks (type + fields with dependsOn $parent.type), Svelte component in frontend/src/blocks/ + case in BlockRenderer.svelte, keep admin preview contract; Svelte 5 runes ($props/$state/$derived, never destructure block), SSR-safe (window guards), MedialibImage is the only image boundary (file.src or data URI, no ?filter on data URIs), Tailwind v4 canonical (bg-linear-to-*, aspect-video/square else arbitrary, trailing ! e.g. bg-brand-600!), i18n via svelte-i18n ($_), always pass foreignMedia lookup explicitly"
workflows: ["Create page (name, path, lang, translationKey, active:true) -> fill blocks -> link navigation -> set active:true on touched navigation/medialib docs -> verify /de plus anonymous SSR (navigation count>0, _lookup resolved) -> respect SSR cache (POST creates, PUT/DELETE invalidate via clear_cache hooks)", "Upload image (medialib file {src:data URI, path} + active:true) -> put ID into heroImage.image or blocks.image -> verify with anonymous lookup (file.src must be <field>/<name>), PAT-only success is not sufficient"]
hints: ["Public reads need active:true plus publication window (filter_public) – applies to content AND navigation AND medialib. Navigation/medialib schemas declare no active field, yet anonymous/SSR queries return empty without it: always store active:true on those docs too (accepted as extra field). Symptom of missing flag: header/footer nav count 0 and medialib lookups unresolved (plain IDs, no _lookup) although PAT reads succeed", "path pattern ^/[a-z0-9-/]*$ (lowercase, no umlauts)", "translationKey+lang and path+lang are unique: always set translationKey, else second doc collides on null/de", "File upload: {src:'data:<mime>;base64,...', path:'n.jpg'} (path optional); stored {src:'<field>/n.jpg', type}; never {filename,data}, never file as plain string", "Reads with select/projection excluding file.data (else context bloat); file.src is enough", "SSR cache lives in ssr collection with dependencies content:<id>/content:*/medialib:*/navigation:*/comment:*; after manual MCP writes use ssr?clear=1 if needed", "Verify public rendering via anonymous SSR HTML (window.__SSR_CACHE__: navigation count>0, heroImage/image with _lookup), never trust PAT-only lookups"]
imageUrl:
eval: "$projectBase + '_/assets/img/admin-pic.svg'"
i18n:
defaultLanguage: de
languages:
- code: de
label: Deutsch
- code: en
label: English
collectionGroups:
- name: content
label: { de: "Inhalte", en: "Content" }
icon: description
- name: community
label: { de: "Community", en: "Community" }
icon: forum
- name: system
label: { de: "System", en: "System" }
icon: settings
collections:
- !include collections/content.yml
- !include collections/medialib.yml
- !include collections/navigation.yml
- !include collections/tag.yml
- !include collections/comment.yml
- !include collections/ssr.yml
assets:
- name: dist
path: ../frontend/dist
- name: fonts
path: ../frontend/assets/fonts
- name: img
path: ../frontend/assets/img
admin:
tokens:
- token: ${ADMIN_TOKEN}
allowReload: true
allowSnapshots: true
allowRegenerateSearch: true
audit:
enabled: true
snapshotPath: ../snapshots
snapshots:
- name: daily
description: Content, Navigation, Tags, Medialib – alle redaktionellen Daten inkl. Medien
enabled: true
schedule: "0 12 * * *"
collections:
- content
- navigation
- tags
- medialib
- ssr
includeMedia: true
retention:
maxCount: 14
- name: full-daily
description: Vollständiger täglicher Snapshot inkl. Medien
enabled: true
schedule: "0 3 * * *"
includeMedia: true
retention:
maxCount: 14
- name: full-weekly
description: Komplett-Snapshot inkl. Media – für Disaster Recovery
enabled: true
schedule: "0 5 * * 0"
collections: []
includeMedia: true
retention:
maxCount: 12
- name: full-monthly
description: Monatliches Langzeitarchiv
enabled: true
schedule: "0 6 1 * *"
collections: []
includeMedia: true
retention:
maxCount: 12