# 🚀 Quick Start - Lokaler Reverse Proxy ## Sofort loslegen ### Terminal 1: Proxy Server starten ```bash ./start-proxy.sh ``` Oder manuell: ```bash cd proxy-server node server.js ``` ### Terminal 2: Flutter App starten ```bash flutter run -d chrome ``` ## ✅ Das wars! Die App verwendet jetzt automatisch den lokalen Proxy auf `http://localhost:3000` fĂŒr Geocoding. ## 🔧 Konfiguration In [lib/config/environment.dart](lib/config/environment.dart): ```dart static const bool useLocalProxy = true; // true = Proxy, false = Appwrite Function ``` ## 📋 Checkliste - ✅ Node.js installiert (`node --version`) - ✅ Proxy lĂ€uft (`http://localhost:3000` im Browser) - ✅ `useLocalProxy = true` in environment.dart - ✅ Flutter App lĂ€uft ## 🎯 Vorteile Lokaler Proxy ✅ **Kein CORS-Problem** - Server umgeht Browser-BeschrĂ€nkungen ✅ **Schnelles Testen** - Kein Cloud-Deployment nötig ✅ **Einfaches Debugging** - Logs direkt im Terminal ✅ **Kostenlos** - LĂ€uft lokal, keine Cloud-Kosten ## 🌐 FĂŒr Produktion FĂŒr den Live-Betrieb: 1. Setzen Sie `useLocalProxy = false` 2. Deployen Sie die Appwrite Function (siehe [DEPLOYMENT.md](DEPLOYMENT.md)) 3. Tragen Sie die Function ID ein ## 📊 Vergleich | Feature | Lokaler Proxy | Appwrite Function | |---------|--------------|-------------------| | Setup Zeit | < 1 Minute | ~10 Minuten | | CORS | ✅ Gelöst | ✅ Gelöst | | Kosten | Kostenlos | Serverless (minimal) | | Verwendung | Nur Entwicklung | Entwicklung + Produktion | | Debugging | Sehr einfach | Logs in Console | | Offline | ❌ | ❌ | ## 🐛 Problemlösung **Proxy startet nicht:** ```bash # Port 3000 belegt? lsof -i :3000 # Prozess beenden kill -9 ``` **App findet Proxy nicht:** - Proxy lĂ€uft? PrĂŒfen Sie `http://localhost:3000` im Browser - `useLocalProxy = true`? PrĂŒfen Sie environment.dart - Hot Restart in Flutter machen **Immer noch CORS-Fehler:** - Browser-Cache leeren - DevTools → Network → "Disable cache" - App neu builden: `flutter run -d chrome`