commit fd04d3dace1a0d5433e05bf028f8f2cdf142cf6b Author: Erik Thiele Date: Tue Jun 30 20:45:07 2026 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..875b8d0 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# 3D-Druck Kostenkalkulation + +Web-App zur Kalkulation von 3D-Druck-Kosten mit PDF-Rechnung und TXT-Export. + +## Setup + +```bash +source .venv/bin/activate +pip install flask fpdf2 pyyaml +``` + +## Start + +```bash +python app.py +``` + +-> http://127.0.0.1:5000 + +## Funktionen + +- **Live-Berechnung** bei jeder Eingabe (Material, Strom, Abschreibung, Arbeit, Gewinn) +- **Dark Mode** (persistiert in YAML-Konfiguration) +- **PDF-Rechnung** mit Kundendaten (via fpdf2) +- **TXT-Export** der Kalkulation +- **Auto-Save** aller Werte via AJAX (debounced 500ms) + +## Technik + +| Komponente | Technologie | +|-----------|-------------| +| Backend | Flask (Python) | +| Frontend | Tabler CSS, Bootstrap 5 | +| Icons | Tabler Icons | +| PDF | fpdf2 (importiert als `fpdf`) | +| Config | YAML (Auto-Save) | + +## Projektstruktur + +``` +app.py # Flask-Server mit allen Routen +templates/index.html # Hauptseite (Formular + Ergebnisse) +templates/invoice.html # Rechnungsseite +static/style.css # Minimales Custom-CSS +static/script.js # Live-Berechnung + Auto-Save +druckkalkulation_config.yaml # Automatisch erstellte Konfiguration +3dDruckKalkulator.py # Alte Tkinter-Version (unused) +``` + +## Hinweise + +- `fpdf2` wird als `fpdf` importiert (alte API, `from fpdf import FPDF`) +- Alle UI-Texte sind Deutsch +- Die YAML-Config wird automatisch erstellt und bei jedem Tastendruck gespeichert +- Die alte `3dDruckKalkulator.py` (Tkinter) wird nicht mehr verwendet