From 7b0be73de94579415df2b202b5b8f1f246b30f2d Mon Sep 17 00:00:00 2001 From: "simonaltschaffl@gmail.com" Date: Tue, 11 Nov 2025 17:40:02 +0100 Subject: [PATCH] update --- src/components/projects/krimiDinner.jsx | 86 ++++++++++++++----------- src/index.js | 8 +++ src/styles/styles.css | 43 ++++++++----- 3 files changed, 85 insertions(+), 52 deletions(-) diff --git a/src/components/projects/krimiDinner.jsx b/src/components/projects/krimiDinner.jsx index 820aeeb..a465446 100644 --- a/src/components/projects/krimiDinner.jsx +++ b/src/components/projects/krimiDinner.jsx @@ -3,11 +3,11 @@ import { Container, Row, Col, Card, Badge, Table, Button, Form, Nav } from "reac import mermaid from "mermaid"; const Wireframe = ({ title, children }) => ( - - + + {title} - -
+ +
{children}
@@ -18,17 +18,33 @@ const Wireframe = ({ title, children }) => ( function KrimiDinner() { useEffect(() => { - mermaid.initialize({ startOnLoad: false, theme: 'neutral' }); + // Initialize mermaid and only run if there are mermaid diagrams on the page try { - mermaid.run(); - } catch (e) { - console.error("Mermaid run error:", e); + mermaid.initialize({ startOnLoad: false, theme: 'neutral' }); + const mermaidEls = typeof document !== 'undefined' ? document.querySelectorAll('.mermaid') : []; + if (mermaid && typeof mermaid.run === 'function' && mermaidEls.length > 0) { + try { + mermaid.run(); + } catch (e) { + if (e && e.message) { + console.error("Mermaid run error:", e.message, e); + } else { + try { + console.error("Mermaid run error (stringified):", JSON.stringify(e)); + } catch (stringifyErr) { + console.error("Mermaid run error (object):", e); + } + } + } + } + } catch (initErr) { + console.error('Mermaid init error:', initErr); } }, []); return (
- +

Projekt-Blaupause: KI-Krimi-Dinner "Projekt Chimera"

@@ -114,40 +130,36 @@ function KrimiDinner() {

Die Architektur ist auf maximale Kontrolle und Skalierbarkeit ausgelegt. Die React Native-Clients kommunizieren ausschließlich mit dem FastAPI-Backend. Echtzeit-Updates werden über eine WebSocket-Verbindung gepusht.

-
-
-              {`
-                graph TD
-                    subgraph "Spieler-Geräte"
-                        P1["React Native Apps"]
-                    end
+          
+{`graph TD + subgraph "Spieler-Geräte" + P1["React Native Apps"] + end - subgraph "Authentifizierung" - Auth["Supabase Auth"] - end + subgraph "Authentifizierung" + Auth["Supabase Auth"] + end - subgraph "Sicheres Backend" - FastAPI["FastAPI Server
REST & WebSockets"] - end + subgraph "Sicheres Backend" + FastAPI["FastAPI Server
REST & WebSockets"] + end - subgraph "Spieldaten-Bank" - PG_DB["PostgreSQL DB"] - end + subgraph "Spieldaten-Bank" + PG_DB["PostgreSQL DB"] + end - subgraph "Externe Dienste" - OAI["OpenAI API"] - end + subgraph "Externe Dienste" + OAI["OpenAI API"] + end - %% Verbindungen - P1 -- "1. Login" --> Auth - P1 -- "2. API Calls (mit Token)" --> FastAPI + %% Verbindungen + P1 -- "1. Login" --> Auth + P1 -- "2. API Calls (mit Token)" --> FastAPI - FastAPI -- "3. KI Call" --> OAI - FastAPI -- "4. DB-Zugriff" --> PG_DB + FastAPI -- "3. KI Call" --> OAI + FastAPI -- "4. DB-Zugriff" --> PG_DB - FastAPI -- "5. WebSocket Updates" --> P1 - `} -
+ FastAPI -- "5. WebSocket Updates" --> P1`}

Datenfluss-Beschreibung:

    @@ -162,6 +174,7 @@ function KrimiDinner() {

    4. User Interface (UI) Konzept

    Die UI-Konzepte werden als klare, moderne Wireframes visualisiert, um den gesamten App-Flow darzustellen.

    +
    @@ -439,6 +452,7 @@ function KrimiDinner() {
    +
    diff --git a/src/index.js b/src/index.js index 889c351..70e13d5 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,14 @@ import './styles/styles.css'; import App from "./components/app"; const root = ReactDOM.createRoot(document.getElementById("root")); +// Global error handlers to surface full error objects for debugging in the browser console +window.addEventListener('error', (event) => { + // event.error may be an Error instance or any thrown value + console.error('Global error event:', event.error ?? event.message ?? event); +}); +window.addEventListener('unhandledrejection', (event) => { + console.error('Unhandled promise rejection:', event.reason); +}); root.render(
    diff --git a/src/styles/styles.css b/src/styles/styles.css index 0a97d26..daaa5db 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -6,6 +6,9 @@ body { margin: 0; padding: 0; overflow-x: hidden; + width: 100%; + max-width: 100vw; + box-sizing: border-box; } .app-container { @@ -57,9 +60,17 @@ a { text-decoration: none; } -a:hover { - color: #0056b3; - text-decoration: underline; +code { + overflow-x: auto; + word-break: break-all; + max-width: 100%; +} + +pre { + overflow-x: auto; + max-width: 100%; + word-wrap: break-word; + white-space: pre-wrap; } .navigation { @@ -78,7 +89,7 @@ a:hover { padding-top: 0.8rem; padding-bottom: 0.8rem; width: 100%; - max-width: 1100px; + max-width: 1000px; } .my-name { @@ -194,9 +205,9 @@ section { .project-page { - overflow-x: hidden; - + width: 100%; + box-sizing: border-box; } @@ -206,15 +217,15 @@ section { .mermaid { - - - - overflow-x: auto; - - - + overflow: hidden !important; text-align: center; - - - + max-width: 100%; + width: 100%; + box-sizing: border-box; + display: block; +} + +.mermaid svg { + max-width: 100% !important; + height: auto !important; }