docs: Branch-Strategie und Build-System in README dokumentiert

This commit is contained in:
TheOnlyMace
2026-01-16 19:52:28 +01:00
parent 2feebb156f
commit 967ffed515

View File

@@ -266,8 +266,79 @@ $debug_config = [
- **E-Mail-Validierung:** Format, Blacklist, optionale Whitelist
- **XSS-Schutz:** `htmlspecialchars()` für alle Ausgaben
## 🌿 Branch-Strategie
```
Branches:
├── main → Produktions-Code (mit obfuscated dist/)
└── develop → Entwicklungs-Code (lesbarer Source)
```
| Branch | Inhalt | Verwendung |
|--------|--------|------------|
| `main` | Lesbare Quellen + `dist/` Ordner | Für Produktion: Dateien aus `dist/` verwenden |
| `develop` | Nur lesbare Quellen + Build-System | Für Entwicklung |
### Workflow
```bash
# Entwicklung
git checkout develop
# ... Code ändern ...
npm run build # dist/ neu generieren
git add .
git commit -m "feat: ..."
# Release
git checkout main
git merge develop
npm run build # dist/ aktualisieren
git add dist/
git commit -m "build: Update production files"
```
## 🔨 Build-System
### Installation
```bash
npm install
```
### Build-Befehle
```bash
npm run build # Alles bauen (JS + CSS + PHP)
npm run build:js # Nur JavaScript obfuscieren
npm run build:css # Nur CSS minifizieren
npm run clean # dist/ Ordner löschen
```
### Ausgabe
Nach dem Build enthält der `dist/` Ordner:
```
dist/
├── assets/
│ ├── css/
│ │ └── style.css # Minifiziert
│ └── js/
│ ├── main.js # Obfusciert
│ ├── contact.js # Obfusciert
│ └── cookie-consent.js # Obfusciert
├── config/
│ ├── config.php # Kopiert
│ └── mail-config.php # Kopiert
└── includes/
├── header.php # Kopiert
├── footer.php # Kopiert
└── functions.php # Kopiert
```
## 📋 Voraussetzungen
- **Node.js 18+** (für Build-System)
- PHP 8.0 oder höher
- PHP Extensions: `session`, `json`, `filter`
- Für E-Mail-Versand: PHPMailer (via Composer im Frontend)