- CLAUDE.md gets a new section summarising the two feature strands, pitfalls (Timefold name, JSX quotes, LOC budget), the auth/messaging outsourcing, and pointers to the three memory files for next session. - docs-src/services/schulkalender/ — 5 MkDocs pages mirroring the stundenplan structure: index, architecture, holidays, parent-flow, notifications. Each with DB tables, endpoints, and the dispatch payload contract for the colleague's Matrix/Email services. - mkdocs.yml gains the Schulkalender nav entry under Services. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.2 KiB
Ferien + Feiertage
Quelle
openholidaysapi.org — EU-Initiative, MIT-Lizenz
fuer den API-Code, ODbL fuer die Daten. Liefert sowohl PublicHolidays als
auch SchoolHolidays je Bundesland mit ISO-Codes DE-BW, DE-BY, ...
Build-Time-Snapshot
Statt zur Laufzeit zu pollen wird ein JSON-Snapshot committed:
bash scripts/calendar-snapshot.sh 2026 2030
Schreibt nach school-service/internal/seed/calendar_holidays.json. Das
Dockerfile kopiert die Datei ins Image; bei jedem Container-Start importiert
CalendarService.SeedFromSnapshot() die Eintraege idempotent (UNIQUE auf
region, event_type, name_de, start_date).
Stand 2026-05-22: 854 Events fuer alle 16 Bundeslaender × 3 Schuljahre.
Aktualisierungs-Workflow
- Jaehrlich (z.B. im Mai vor neuem Schuljahr):
bash scripts/calendar-snapshot.sh 2027 2031 - Diff im Git pruefen — sollte nur neue Eintraege haben, nicht alte ueberschreiben.
- Commit + push + Container-Rebuild.
- Beim ersten Boot werden neue Eintraege in
cal_public_eventeingefuegt; bestehende bleiben.
API
GET /api/v1/school/calendar/holidays?region=DE-NI&from=2026-08-01&to=2027-07-31
Liefert Array sortiert nach start_date. Beispiel-Antwort:
[
{"id":"…","region":"DE-NI","event_type":"school_holiday","name_de":"Sommerferien","start_date":"2026-07-02","end_date":"2026-08-12"},
{"id":"…","region":"DE-NI","event_type":"public_holiday","name_de":"Tag der Deutschen Einheit","start_date":"2026-10-03","end_date":"2026-10-03"},
...
]
Format-Mapping (Snapshot-Script)
OpenHolidaysAPI gibt:
{"id":"...","startDate":"2026-10-03","endDate":"2026-10-03","type":"Public",
"name":[{"language":"DE","text":"Tag der Deutschen Einheit"}]}
scripts/calendar-snapshot.sh normalisiert via jq:
{"region":"DE-NI","event_type":"public_holiday","name_de":"Tag der Deutschen Einheit",
"name_en":null,"start_date":"2026-10-03","end_date":"2026-10-03"}
Lizenz-Compliance
- API-Code: MIT
- Daten: ODbL (Open Database License)
Beides ist fuer kommerzielle Nutzung erlaubt. Die Quelle muss in einer
Lizenz-Aufstellung (SBOM) genannt werden — bereits in
sbom/stundenplan/README.md dokumentiert.