diff --git a/app.py b/app.py index 49db032..576ec63 100644 --- a/app.py +++ b/app.py @@ -2815,4 +2815,175 @@ def get_fallback_mindmap_data(node_id): return { "nodes": nodes, "edges": edges - } \ No newline at end of file + } + +@app.route('/api/mindmap/root') +def get_root_mindmap(): + """ + Gibt die Root-Mindmap zurück, um Kompatibilität mit dem Frontend sicherzustellen. + """ + app.logger.info("Root-Mindmap-Daten werden angefordert.") + + try: + # Fallback-Daten + nodes = [ + { + "id": "center", + "name": "Wissenskarte", + "description": "Zentrale Wissenskarte mit allen Hauptthemen", + "is_center": True, + "color_code": "#f5f5f5", + "has_children": True + }, + { + "id": "philosophy", + "name": "Philosophie", + "description": "Die Lehre vom Denken und der Erkenntnis", + "category": "Philosophie", + "has_children": True, + "color_code": "#9F7AEA" + }, + { + "id": "science", + "name": "Wissenschaft", + "description": "Systematische Erforschung der Natur und Gesellschaft", + "category": "Wissenschaft", + "has_children": True, + "color_code": "#f4b400" + }, + { + "id": "technology", + "name": "Technologie", + "description": "Anwendung wissenschaftlicher Erkenntnisse", + "category": "Technologie", + "has_children": True, + "color_code": "#0d47a1" + }, + { + "id": "arts", + "name": "Künste", + "description": "Kreativer Ausdruck und künstlerische Gestaltung", + "category": "Künste", + "has_children": True, + "color_code": "#c2185b" + } + ] + + edges = [ + {"source_id": "center", "target_id": "philosophy", "strength": 0.9}, + {"source_id": "center", "target_id": "science", "strength": 0.9}, + {"source_id": "center", "target_id": "technology", "strength": 0.9}, + {"source_id": "center", "target_id": "arts", "strength": 0.9} + ] + + response = { + "nodes": nodes, + "edges": edges + } + + return jsonify(response) + + except Exception as e: + app.logger.error(f"Fehler beim Abrufen der Root-Mindmap-Daten: {str(e)}") + app.logger.error(f"Stack Trace: {traceback.format_exc()}") + return jsonify({"error": "Fehler beim Abrufen der Mindmap-Daten"}), 500 + +@app.route('/api/mindmap/technology') +def get_technology_mindmap(): + """ + Gibt die Technologie-Mindmap zurück für Frontend-Kompatibilität. + """ + app.logger.info("Technologie-Mindmap-Daten werden angefordert.") + + try: + nodes = [ + { + "id": "ai", + "name": "Künstliche Intelligenz", + "description": "Maschinelles Lernen und intelligente Systeme", + "category": "Technologie", + "has_children": True, + "color_code": "#0d47a1" + }, + { + "id": "robotics", + "name": "Robotik", + "description": "Entwicklung und Steuerung von Robotern", + "category": "Technologie", + "has_children": True, + "color_code": "#0d47a1" + }, + { + "id": "quantum_computing", + "name": "Quantencomputing", + "description": "Computer basierend auf Quantenmechanik", + "category": "Technologie", + "has_children": True, + "color_code": "#0d47a1" + } + ] + + edges = [ + {"source_id": "technology", "target_id": "ai", "strength": 0.8}, + {"source_id": "technology", "target_id": "robotics", "strength": 0.8}, + {"source_id": "technology", "target_id": "quantum_computing", "strength": 0.8} + ] + + return jsonify({ + "nodes": nodes, + "edges": edges + }) + + except Exception as e: + app.logger.error(f"Fehler beim Abrufen der Technologie-Mindmap-Daten: {str(e)}") + return jsonify({"error": "Fehler beim Abrufen der Mindmap-Daten"}), 500 + +@app.route('/api/mindmap/arts') +def get_arts_mindmap(): + """ + Gibt die Künste-Mindmap zurück für Frontend-Kompatibilität. + """ + app.logger.info("Künste-Mindmap-Daten werden angefordert.") + + try: + nodes = [ + { + "id": "visual_arts", + "name": "Bildende Kunst", + "description": "Malerei, Bildhauerei und andere visuelle Kunstformen", + "category": "Künste", + "has_children": True, + "color_code": "#c2185b" + }, + { + "id": "music", + "name": "Musik", + "description": "Tonkunst und musikalische Komposition", + "category": "Künste", + "has_children": True, + "color_code": "#c2185b" + }, + { + "id": "literature", + "name": "Literatur", + "description": "Schriftliche Kunstwerke und Poesie", + "category": "Künste", + "has_children": True, + "color_code": "#c2185b" + } + ] + + edges = [ + {"source_id": "arts", "target_id": "visual_arts", "strength": 0.8}, + {"source_id": "arts", "target_id": "music", "strength": 0.8}, + {"source_id": "arts", "target_id": "literature", "strength": 0.8} + ] + + return jsonify({ + "nodes": nodes, + "edges": edges + }) + + except Exception as e: + app.logger.error(f"Fehler beim Abrufen der Künste-Mindmap-Daten: {str(e)}") + return jsonify({"error": "Fehler beim Abrufen der Mindmap-Daten"}), 500 \ No newline at end of file diff --git a/logs/app.log b/logs/app.log index c61a515..465a03c 100644 --- a/logs/app.log +++ b/logs/app.log @@ -1303,3 +1303,147 @@ Traceback (most recent call last): raise NotFound() from None werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:08,542 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:08,542 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:11,772 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/technology, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:11,772 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/technology, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:13,074 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/arts, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:13:13,074 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/arts, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:14:25,285 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /.well-known/appspecific/com.chrome.devtools.json, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:14:25,285 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /.well-known/appspecific/com.chrome.devtools.json, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92]