# MYP Reservation Platform Mercedes-Benz Werk 040 Berlin - 3D-Drucker Reservierungsplattform ## πŸš€ Schnellstart ### Voraussetzungen - **Backend (Raspberry Pi)**: Python 3.11, systemd - **Frontend (m040tbaraspi001)**: Docker, Docker Compose ### Installation #### Backend Installation (Raspberry Pi) ```bash # Repository klonen git clone cd Projektarbeit-MYP # Backend installieren ./install.sh backend ``` #### Frontend Installation (m040tbaraspi001) ```bash # Repository klonen git clone cd Projektarbeit-MYP # Frontend installieren ./install.sh frontend ``` ### Services starten #### Backend ```bash sudo systemctl start myp.service sudo systemctl status myp.service ``` #### Frontend ```bash cd frontend docker-compose up -d docker-compose logs -f ``` ## 🌐 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 ### Backend Debug-Modus ```bash cd backend/app python3.11 app.py --debug ``` ### Frontend Development ```bash cd frontend npm run dev ``` ## πŸ“ Projektstruktur ``` Projektarbeit-MYP/ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ app/ β”‚ β”‚ β”œβ”€β”€ certs/ # TLS-Zertifikate β”‚ β”‚ β”œβ”€β”€ database/ # SQLite-Datenbank β”‚ β”‚ β”œβ”€β”€ logs/ # Anwendungslogs β”‚ β”‚ └── app.py # Hauptanwendung β”‚ β”œβ”€β”€ myp.service # systemd Service β”‚ └── requirements.txt # Python-AbhΓ€ngigkeiten β”œβ”€β”€ frontend/ β”‚ β”œβ”€β”€ certs/ # TLS-Zertifikate β”‚ β”œβ”€β”€ docker/ β”‚ β”‚ └── caddy/ β”‚ β”‚ └── Caddyfile # Reverse Proxy Konfiguration β”‚ β”œβ”€β”€ src/ # Next.js Anwendung β”‚ └── docker-compose.yml β”œβ”€β”€ docs/ # Dokumentation β”œβ”€β”€ scripts/ # Hilfsskripte └── install.sh # Zentraler Installer ``` ## πŸ”’ 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 ### 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 - **Build**: Production - **Datum**: $(date) ## πŸ‘₯ Support Bei Problemen wenden Sie sich an das IT-Team des Mercedes-Benz Werk 040 Berlin.