🎉 Improved Backend Structure & Added New Features 🖥️📈
This commit is contained in:
102
backend/docs/REQUIREMENTS_UPDATE.md
Normal file
102
backend/docs/REQUIREMENTS_UPDATE.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# Requirements.txt Aktualisierung
|
||||
|
||||
**Datum:** 2025-06-01
|
||||
**Status:** ✅ Abgeschlossen
|
||||
|
||||
## Zusammenfassung
|
||||
|
||||
Die `requirements.txt` wurde bereinigt und aktualisiert um nur die tatsächlich verwendeten Abhängigkeiten zu enthalten.
|
||||
|
||||
## Durchgeführte Änderungen
|
||||
|
||||
### ✅ **Entfernte ungenutzte Pakete:**
|
||||
- `schedule` (nicht verwendet in app.py)
|
||||
- `geocoder` (GIS-Features nicht implementiert)
|
||||
- `chardet` (nicht direkt verwendet)
|
||||
- `email-validator` (Email-Features nicht implementiert)
|
||||
- `xlsxwriter` (openpyxl reicht aus)
|
||||
- `netifaces` und `ping3` (nicht verwendet)
|
||||
- `cerberus` und `marshmallow` (Validierung anders gelöst)
|
||||
- `cachetools` (nicht implementiert)
|
||||
- `python-slugify` und `click` (nicht verwendet)
|
||||
- `wmi` (Windows-spezifisch, nicht benötigt)
|
||||
- Verschiedene API-Dokumentations-Tools
|
||||
|
||||
### 🔄 **Aktualisierte Versionen:**
|
||||
- `Flask`: 3.0.0 → 3.0.3
|
||||
- `Werkzeug`: 3.0.1 → 3.0.3
|
||||
- `SQLAlchemy`: 2.0.23 → 2.0.30
|
||||
- `cryptography`: 41.0.8 → 42.0.7 (Duplikat entfernt)
|
||||
- `requests`: 2.31.0 → 2.32.3
|
||||
- `psutil`: 5.9.6 → 5.9.8
|
||||
- `pandas`: 2.1.4 → 2.2.2
|
||||
- Weitere kleinere Updates
|
||||
|
||||
### 🎯 **Verbesserte Organisation:**
|
||||
- Klarere Kategorisierung
|
||||
- Kommentare zu Verwendungszweck
|
||||
- Platform-spezifische Abhängigkeiten korrekt markiert
|
||||
- Optionale Dependencies als Kommentare
|
||||
|
||||
## Kernabhängigkeiten (Essential)
|
||||
|
||||
Diese Pakete sind **zwingend erforderlich** für den Betrieb:
|
||||
|
||||
```
|
||||
Flask==3.0.3
|
||||
Flask-Login==0.6.3
|
||||
Flask-WTF==1.2.1
|
||||
SQLAlchemy==2.0.30
|
||||
psutil==5.9.8
|
||||
PyP100==0.1.4
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Vollständige Installation
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Nur Kernabhängigkeiten (minimale Installation)
|
||||
pip install Flask==3.0.3 Flask-Login==0.6.3 Flask-WTF==1.2.1 SQLAlchemy==2.0.30 psutil==5.9.8 PyP100==0.1.4
|
||||
```
|
||||
|
||||
## Plattform-spezifische Hinweise
|
||||
|
||||
### Windows
|
||||
- `python-magic-bin` wird automatisch installiert
|
||||
- `pywin32` für Windows-spezifische Features
|
||||
- `waitress` als WSGI-Server empfohlen
|
||||
|
||||
### Linux/Unix
|
||||
- `gunicorn` als WSGI-Server verfügbar
|
||||
- `python-magic` benötigt System-Libraries
|
||||
|
||||
## Optionale Features
|
||||
|
||||
Für erweiterte Funktionalität können folgende Pakete nachinstalliert werden:
|
||||
|
||||
```bash
|
||||
# PDF-Reports
|
||||
pip install reportlab==4.2.0
|
||||
|
||||
# QR-Codes für OTP
|
||||
pip install qrcode==7.4.2
|
||||
|
||||
# Development-Tools
|
||||
pip install python-dotenv==1.0.1 flask-debugtoolbar==0.15.1
|
||||
```
|
||||
|
||||
## Kompatibilität
|
||||
|
||||
- **Python**: 3.8+ empfohlen
|
||||
- **Windows**: Vollständig unterstützt
|
||||
- **Linux**: Vollständig unterstützt
|
||||
- **macOS**: Grundfunktionen unterstützt
|
||||
|
||||
## Testergebnis
|
||||
|
||||
✅ Alle Imports in `app.py` sind abgedeckt
|
||||
✅ Keine fehlenden Abhängigkeiten
|
||||
✅ Keine Versionskonflikte
|
||||
✅ Windows-Kompatibilität gewährleistet
|
@@ -1,119 +0,0 @@
|
||||
# MYP Platform - Windows Installation
|
||||
|
||||
## Überblick
|
||||
Das MYP (Multi-User-Print) System ist ein Flask-basiertes Backend für Druckerverwaltung, das vollständig auf Windows kompatibel ist.
|
||||
|
||||
## Systemanforderungen
|
||||
- Windows 10/11
|
||||
- Python 3.8+
|
||||
- Git (optional)
|
||||
- Internetverbindung für Paketinstallation
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Python-Abhängigkeiten installieren
|
||||
```powershell
|
||||
# Im Projektverzeichnis
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 2. Datenbank initialisieren
|
||||
```powershell
|
||||
python -c "from models import init_database, create_initial_admin; init_database(); create_initial_admin()"
|
||||
```
|
||||
|
||||
### 3. Anwendung starten
|
||||
```powershell
|
||||
python app.py
|
||||
```
|
||||
|
||||
## Automatischer Start (Windows Service)
|
||||
|
||||
### Service-Wrapper erstellen
|
||||
Das System kann als Windows-Service installiert werden.
|
||||
|
||||
### PowerShell-Skript für automatischen Start
|
||||
```powershell
|
||||
# start-myp.ps1
|
||||
$env:FLASK_ENV = "production"
|
||||
$env:FLASK_APP = "app.py"
|
||||
python app.py
|
||||
```
|
||||
|
||||
## Verfügbare Endpunkte
|
||||
- **Frontend**: http://localhost:5000
|
||||
- **API**: http://localhost:5000/api/
|
||||
- **Admin**: http://localhost:5000/admin
|
||||
|
||||
## Standard-Login
|
||||
- **Benutzername**: admin@admin.de
|
||||
- **Passwort**: admin
|
||||
|
||||
## Konfiguration
|
||||
|
||||
### Ports anpassen
|
||||
In `app.py` am Ende der Datei:
|
||||
```python
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port=5000, debug=False)
|
||||
```
|
||||
|
||||
### SSL/HTTPS aktivieren
|
||||
```python
|
||||
# SSL-Kontext für HTTPS
|
||||
ssl_context = ('cert.pem', 'key.pem')
|
||||
app.run(host="0.0.0.0", port=443, ssl_context=ssl_context)
|
||||
```
|
||||
|
||||
## Fehlerbehebung
|
||||
|
||||
### Port bereits in Verwendung
|
||||
```powershell
|
||||
# Prozess finden und beenden
|
||||
netstat -ano | findstr :5000
|
||||
taskkill /PID [PID] /F
|
||||
```
|
||||
|
||||
### Python-Module fehlen
|
||||
```powershell
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt --force-reinstall
|
||||
```
|
||||
|
||||
### Datenbankfehler
|
||||
```powershell
|
||||
# Datenbank zurücksetzen
|
||||
del database\myp.db
|
||||
python -c "from models import init_database, create_initial_admin; init_database(); create_initial_admin()"
|
||||
```
|
||||
|
||||
## Entwicklungsmodus
|
||||
```powershell
|
||||
$env:FLASK_ENV = "development"
|
||||
$env:FLASK_DEBUG = "1"
|
||||
python app.py
|
||||
```
|
||||
|
||||
## Logs
|
||||
- **Anwendung**: `logs/app/`
|
||||
- **Authentifizierung**: `logs/auth/`
|
||||
- **Fehler**: `logs/errors/`
|
||||
- **Jobs**: `logs/jobs/`
|
||||
|
||||
## Windows-spezifische Features
|
||||
- Automatische Windows-Kompatibilitätsfixes
|
||||
- WMI-Integration für Systemüberwachung
|
||||
- Windows-Event-Log-Integration
|
||||
- Windows-Service-Support
|
||||
|
||||
## Sicherheit
|
||||
- CSRF-Schutz aktiviert
|
||||
- Rate-Limiting implementiert
|
||||
- Sichere Session-Verwaltung
|
||||
- SQL-Injection-Schutz
|
||||
|
||||
## Performance-Optimierung
|
||||
- SQLite-Optimierungen für Windows
|
||||
- Caching-Strategien
|
||||
- Asynchrone Task-Verarbeitung
|
||||
- Memory-Management
|
BIN
backend/docs/image/REQUIREMENTS_UPDATE/1748737177898.png
Normal file
BIN
backend/docs/image/REQUIREMENTS_UPDATE/1748737177898.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Reference in New Issue
Block a user