This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
breakpilot-pwa/backend/frontend/studio_modular.py
BreakPilot Dev 19855efacc
Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
feat: BreakPilot PWA - Full codebase (clean push without large binaries)
All services: admin-v2, studio-v2, website, ai-compliance-sdk,
consent-service, klausur-service, voice-service, and infrastructure.
Large PDFs and compiled binaries excluded via .gitignore.
2026-02-11 13:25:58 +01:00

154 lines
4.4 KiB
Python

"""
BreakPilot Studio - Modulare Frontend-Architektur
Diese Datei ist der zentrale Einstiegspunkt fuer das Studio-Frontend.
Sie laedt alle Module und kombiniert sie zu einer vollstaendigen Seite.
Architektur:
- Jedes Modul (base, jitsi, letters, worksheets, correction) liefert CSS, HTML und JS
- Diese werden hier zusammengefuegt
- Das Ergebnis ist eine vollstaendige HTML-Seite
Module:
- BaseLayoutModule: TopBar, Sidebar, Footer, Theme Toggle, Login
- JitsiModule: Videokonferenzen (Elterngespraeche, Schulungen)
- LettersModule: Elternbriefe mit rechtssicherer Sprache
- WorksheetsModule: Lerneinheiten und Arbeitsblaetter
- CorrectionModule: Klausurkorrektur mit OCR und AI
"""
from .modules import (
BaseLayoutModule,
DashboardModule,
JitsiModule,
LettersModule,
WorksheetsModule,
CorrectionModule,
MessengerModule,
SchoolModule,
ContentCreatorModule,
ContentFeedModule,
KlausurKorrekturModule,
AbiturDocsAdminModule,
RbacAdminModule,
MailInboxModule,
# SecurityModule entfernt - jetzt in /dev-admin verfuegbar
)
def get_studio_html() -> str:
"""
Generiert die vollstaendige Studio-HTML-Seite aus allen Modulen.
Returns:
str: Vollstaendige HTML-Seite mit allen Modulen
"""
# CSS von allen Modulen sammeln
all_css = "\n".join([
BaseLayoutModule.get_css(),
DashboardModule.get_css(),
JitsiModule.get_css(),
LettersModule.get_css(),
WorksheetsModule.get_css(),
CorrectionModule.get_css(),
MessengerModule.get_css(),
SchoolModule.get_css(),
ContentCreatorModule.get_css(),
ContentFeedModule.get_css(),
KlausurKorrekturModule.get_css(),
AbiturDocsAdminModule.get_css(),
RbacAdminModule.get_css(),
MailInboxModule.get_css(),
# SecurityModule entfernt - jetzt in /dev-admin
])
# HTML von allen Modulen sammeln (Dashboard zuerst!)
all_module_html = "\n".join([
DashboardModule.get_html(),
JitsiModule.get_html(),
LettersModule.get_html(),
WorksheetsModule.get_html(),
CorrectionModule.get_html(),
MessengerModule.get_html(),
SchoolModule.get_html(),
ContentCreatorModule.get_html(),
ContentFeedModule.get_html(),
KlausurKorrekturModule.get_html(),
AbiturDocsAdminModule.get_html(),
RbacAdminModule.get_html(),
MailInboxModule.get_html(),
# SecurityModule entfernt - jetzt in /dev-admin
])
# JavaScript von allen Modulen sammeln
all_js = "\n".join([
BaseLayoutModule.get_js(),
DashboardModule.get_js(),
JitsiModule.get_js(),
LettersModule.get_js(),
WorksheetsModule.get_js(),
CorrectionModule.get_js(),
MessengerModule.get_js(),
SchoolModule.get_js(),
ContentCreatorModule.get_js(),
ContentFeedModule.get_js(),
KlausurKorrekturModule.get_js(),
AbiturDocsAdminModule.get_js(),
RbacAdminModule.get_js(),
MailInboxModule.get_js(),
# SecurityModule entfernt - jetzt in /dev-admin
])
# Base HTML Struktur mit allen eingefuegten Modulen
base_html = BaseLayoutModule.get_html()
# Module HTML in den main-content Bereich einfuegen
# Suche nach dem Platzhalter <!-- MODULE_PANELS --> und ersetze ihn
if "<!-- MODULE_PANELS -->" in base_html:
base_html = base_html.replace("<!-- MODULE_PANELS -->", all_module_html)
else:
# Fallback: Fuege Module vor dem schliessenden main-content ein
base_html = base_html.replace(
"</div><!-- /main-content -->",
f"{all_module_html}\n </div><!-- /main-content -->"
)
# Vollstaendige HTML-Seite zusammenbauen
html = f"""<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BreakPilot Studio</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<style>
{all_css}
</style>
</head>
<body>
{base_html}
<script>
{all_js}
// Note: Initialization is handled by BaseLayoutModule DOMContentLoaded
console.log('BreakPilot Studio - Modular Architecture ready');
</script>
</body>
</html>"""
return html
def get_studio_page():
"""
Kompatibilitaets-Wrapper fuer bestehende API.
Returns:
str: Vollstaendige HTML-Seite
"""
return get_studio_html()
# Fuer direkten Import
studio_html = get_studio_html