# API Reference Endpunkte, die `web/serve.py` bereitstellt. ## GET `/` und `/index.html` Liefert das Frontend aus `web/index.html`. ## GET `/templates.json` Liefert den Template-Katalog aus `web/templates.json` (JSON). ## GET `/templates/` Liefert die Datei unter `/templates/`. - `.md` → Content-Type `text/plain` - sonst → Content-Type `application/json` Fehler: `404` wenn die Datei nicht existiert. ## PUT `/templates/` Speichert den Request-Body in `/templates/` (bzw. `web/templates.json` für `/templates.json`). - Content-Type muss `text/*` sein. - Das Ziel-Verzeichnis muss existieren (sonst `404`). - Content-Length > 0 (sonst `400`). > Stub — noch auszuarbeiten.