ppt-tool/backend/api/v1/admin
Vadym Samoilenko ae41562103 Phase 8: Data-driven slide architecture + template management overhaul
Replaces TSX/Babel compilation pipeline with a JSON element model:
- New _do_parse_v2(): 1 LLM call/layout (vs 2) classifies OXML geometry
  elements into placeholder types → JSON stored in layout_code
- SlideRenderer.tsx: renders JSON element model as %-positioned divs,
  no Babel compilation or runtime errors
- parseLayoutSchema.ts: isJsonLayoutCode() / parseLayoutSchema() /
  mergeElementsWithContent() — full JSON schema parsing layer
- useCustomTemplates.ts: transparent dual-format support (JSON + TSX)
  via parsedLayoutToCompiled() adapter

Template management improvements:
- PresentationLayoutCodeModel: +is_enabled (bool) +thumbnail_path (str)
- Migration 005: adds both columns to presentation_layout_codes
- DELETE /master-decks/{id}: hard delete (files + TemplateModel +
  PresentationLayoutCodeModel rows + MasterDeckModel)
- PATCH /template-management/layouts/{db_id}/toggle-enabled: new endpoint
- LayoutData response: +db_id, +is_enabled, +thumbnail_path
- _register_as_template(): stores thumbnail_path + is_enabled per layout

Admin UI:
- /admin/templates/ — list all custom templates with delete
- /admin/templates/[id]/ — layout grid with screenshots + enable/disable
- AdminSidebar: Templates nav item

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 20:05:25 +00:00
..
__init__.py Phase 1-2: Foundation + Admin Panel & Client Management 2026-02-26 15:37:17 +00:00
analytics_router.py Phase 2: Admin panel, analytics, storage, template pipeline, multi-provider LLM 2026-02-26 23:39:34 +00:00
audit_router.py Phase 1-2: Foundation + Admin Panel & Client Management 2026-02-26 15:37:17 +00:00
brand_config_router.py Phase 2: Admin panel, analytics, storage, template pipeline, multi-provider LLM 2026-02-26 23:39:34 +00:00
clients_router.py Phase 1-2: Foundation + Admin Panel & Client Management 2026-02-26 15:37:17 +00:00
master_decks_router.py Phase 8: Data-driven slide architecture + template management overhaul 2026-03-01 20:05:25 +00:00
settings_router.py Phase 3: Bug fixes, feature enhancements, and polish 2026-02-27 12:58:52 +00:00
storage_router.py Improve storage purge and fix outline parsing 2026-02-27 17:33:27 +00:00
teams_router.py Phase 1-2: Foundation + Admin Panel & Client Management 2026-02-26 15:37:17 +00:00
users_router.py Phase 4: Fix critical bugs, improve document parsing, add vision OCR 2026-02-27 14:07:00 +00:00