# MYP Reservation Platform Mercedes-Benz Werk 040 Berlin - 3D-Drucker Reservierungsplattform ## πŸš€ Schnellstart ### MYP Control Center (Empfohlen) Das zentrale Installationssystem fΓΌr alle Komponenten: ```bash # Repository klonen git clone cd Projektarbeit-MYP # MYP Control Center starten ./myp_installer.sh ``` Das MYP Control Center bietet: - **Schnellstart-Installationen** (VollstΓ€ndig, Backend-Only, Entwicklung) - **Produktions-Installer** (Integration der v3.2 install.sh FunktionalitΓ€t) - **Granulare Installation** (Einzelne Komponenten) - **System & Wartung** (Tests, Status, Informationen) ### Direkter Produktions-Installer FΓΌr schnelle Produktions-Deployments direkt im MYP Control Center β†’ Option 4: ```bash ./myp_installer.sh # β†’ WΓ€hle Option 4: Produktions-Installer # β†’ Backend installieren (Raspberry Pi) # β†’ Frontend installieren (Docker) ``` ### Voraussetzungen - **Backend (Raspberry Pi)**: Python 3.11, systemd - **Frontend (m040tbaraspi001)**: Docker, Docker Compose ## 🌐 Zugriff - **Frontend**: https://m040tbaraspi001.de040.corpintra.net - **Backend API**: https://raspberrypi/api ## πŸ”§ Konfiguration ### Netzwerk | Komponente | Hostname | IP | Port | |------------|----------|----|----- | | Frontend | m040tbaraspi001.de040.corpintra.net | 192.168.0.109 | 443 | | Backend | raspberrypi | 192.168.0.105 | 443 | ### TLS-Zertifikate Selbstsignierte Zertifikate werden automatisch generiert: - Backend: `backend/app/certs/` - Frontend: `frontend/certs/` ## πŸ“Š Health Checks ```bash # Backend curl -k https://raspberrypi/api/test # Frontend curl -k https://m040tbaraspi001.de040.corpintra.net/health ``` ## πŸ› οΈ Entwicklung ### MYP Control Center (Entwicklungs-Setup) ```bash ./myp_installer.sh # β†’ Option 3: Entwicklungs-Setup ``` ### Manuelle Installation #### Backend Debug-Modus ```bash cd backend/app python3.11 app.py --debug ``` #### Frontend Development ```bash cd frontend npm run dev ``` ## πŸ“ Projektstruktur ``` Projektarbeit-MYP/ β”œβ”€β”€ myp_installer.sh # 🎯 HAUPT-INSTALLER (Control Center) β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ app/ β”‚ β”‚ β”œβ”€β”€ certs/ # TLS-Zertifikate β”‚ β”‚ β”œβ”€β”€ database/ # SQLite-Datenbank β”‚ β”‚ β”œβ”€β”€ logs/ # Anwendungslogs β”‚ β”‚ └── app.py # Hauptanwendung β”‚ β”œβ”€β”€ myp.service # systemd Service β”‚ β”œβ”€β”€ requirements.txt # Python-AbhΓ€ngigkeiten β”‚ └── legacy_setup_raspberry_pi.sh # Legacy Skript β”œβ”€β”€ frontend/ β”‚ β”œβ”€β”€ certs/ # TLS-Zertifikate β”‚ β”œβ”€β”€ docker/ β”‚ β”‚ β”œβ”€β”€ caddy/ β”‚ β”‚ β”‚ └── Caddyfile # Reverse Proxy Konfiguration β”‚ β”‚ └── legacy_deploy.sh # Legacy Skript β”‚ β”œβ”€β”€ src/ # Next.js Anwendung β”‚ └── docker-compose.yml β”œβ”€β”€ scripts/ β”‚ └── legacy_generate_certs.sh # Legacy Skript β”œβ”€β”€ archiv/ β”‚ └── myp_installer_legacy.sh # Archivierte Version └── docs/ # Dokumentation ``` ### Script-Status | Skript | Status | Verwendung | |--------|--------|------------| | `myp_installer.sh` | βœ… **AKTIV** | Haupt-Control-Center | | `*legacy_*.sh` | πŸ“¦ Legacy | Historische Versionen | | `archiv/myp_installer_legacy.sh` | πŸ“¦ Archiv | Alte Version 4.0 | ## πŸ”’ Sicherheit - HTTPS-only (Port 443) - Selbstsignierte TLS-Zertifikate - HTTP β†’ HTTPS Redirect - Security Headers (HSTS, CSP, etc.) ## πŸ“ Logs ### Backend ```bash # systemd Journal sudo journalctl -u myp.service -f # Anwendungslogs tail -f backend/app/logs/app/app.log ``` ### Frontend ```bash # Docker Logs docker-compose logs -f # Caddy Logs docker-compose logs caddy ``` ## πŸ†˜ Troubleshooting ### MYP Control Center verwenden ```bash ./myp_installer.sh # β†’ Option 6: Systemvoraussetzungen prΓΌfen # β†’ Option 7: Anwendung starten ``` ### Backend startet nicht ```bash # Service Status prΓΌfen sudo systemctl status myp.service # Logs prΓΌfen sudo journalctl -u myp.service --no-pager # Zertifikate prΓΌfen ls -la backend/app/certs/ ``` ### Frontend nicht erreichbar ```bash # Container Status prΓΌfen docker-compose ps # Netzwerk prΓΌfen docker network ls # Zertifikate prΓΌfen ls -la frontend/certs/ ``` ### Verbindungsprobleme ```bash # DNS auflΓΆsen nslookup raspberrypi nslookup m040tbaraspi001.de040.corpintra.net # Ports prΓΌfen netstat -tlnp | grep :443 ``` ## πŸ“‹ Version - **Version**: 3.2-final - **Control Center**: v4.0 mit v3.2 Integration - **Build**: Production - **Installer**: MYP Control Center ## πŸ‘₯ Support Bei Problemen verwenden Sie das MYP Control Center oder wenden Sie sich an das IT-Team des Mercedes-Benz Werk 040 Berlin.