2.6 KiB
2.6 KiB
Dev-Setup
Voraussetzungen
- Python 3.11 (CI-Standard; Minimum 3.10)
- Node.js (aktuelles LTS empfohlen)
- PostgreSQL mit pgvector-Extension
- Conda oder venv fuer Python-Umgebung
Gateway starten
cd platform-core/
# Python-Umgebung aktivieren (Conda oder venv)
conda activate <env>
# oder: python -m venv .venv && .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# Config vorbereiten:
# 1. config.ini muss im platform-core/ Verzeichnis liegen (statische Settings)
# 2. .env Datei aus env_dev.env kopieren/symlinken:
# copy env_dev.env .env
# 3. APP_KEY_SYSVAR in config.ini zeigt auf Master-Key (OS-Variable oder Dateipfad)
uvicorn app:app --host 0.0.0.0 --port 8000
Konfigurationsdateien
| Datei | Zweck |
|---|---|
platform-core/config.ini |
Statische Settings (Auth-Defaults, Upload-Limits, Operator-Text) |
platform-core/.env |
Runtime-Env (DB, API-Keys, Secrets) -- wird aus env_dev.env kopiert |
platform-core/env_dev.env |
Dev-Umgebung Template (verschluesselte Secrets mit DEV_ENC: Prefix) |
platform-core/env_int.env |
Integration-Umgebung |
platform-core/env_prod.env |
Produktion |
Wichtige Env-Variablen (Auszug)
| Variable | Beschreibung |
|---|---|
DB_HOST, DB_USER, DB_PASSWORD_SECRET |
PostgreSQL-Verbindung |
APP_KEY_SYSVAR |
Master-Key fuer Secrets-Entschluesselung |
APP_API_URL |
API-URL (bestimmt Cookie-Secure-Flag) |
APP_ALLOWED_ORIGINS |
CORS Origins (inkl. http://localhost:5176) |
Service_GOOGLE_AUTH_* |
Google OAuth Auth-App |
Service_GOOGLE_DATA_* |
Google OAuth Data-App |
Frontend Nyla starten
cd ui-nyla/
npm install
npm run dev
# oder: npx vite --port 5176 --mode dev
Frontend laeuft auf http://localhost:5176 und erwartet Gateway auf http://localhost:8000.
Frontend-Konfiguration
| Datei | Zweck |
|---|---|
ui-nyla/config/.env.dev |
Dev-Mode Env (VITE_API_BASE_URL etc.) |
ui-nyla/config/.env.int |
Integration |
ui-nyla/config/.env.prod |
Produktion |
Secrets-Verwaltung
Env-Dateien enthalten verschluesselte Werte (DEV_ENC:, INT_ENC:, PROD_ENC:).
Zur Entschluesselung wird der Master-Key ueber APP_KEY_SYSVAR geladen.
Details: -> d-guides/encrypt-env-secrets.md
Weiterführende Guides
- Secrets verschluesseln:
d-guides/encrypt-env-secrets.md - Google OAuth einrichten:
d-guides/google-oauth-setup.md - Cookie/JWT-Migration:
d-guides/security-migration-guide.md - Coding-Konventionen:
d-guides/coding-conventions.md - Testing:
d-guides/testing-strategy.md