60 lines
2.5 KiB
Markdown
60 lines
2.5 KiB
Markdown
# ProxUI
|
|
|
|
Multi-Tenant-Konsole fuer Proxmox auf Basis von Go, Supabase Postgres/Auth, Redis/asynq und React.
|
|
|
|
## Architektur
|
|
|
|
- `backend/`: HTTP-API, Auth/JWT-Validierung, RBAC, DB-Zugriff und Proxmox-Orchestrierung
|
|
- `worker/`: asynchrone Jobs fuer Proxmox-Tasks, Reconciliation und Cleanup
|
|
- `console-proxy/`: Websocket-Proxy fuer noVNC/xterm.js ohne direkte Proxmox-Verbindung im Browser
|
|
- `frontend/`: React/TypeScript/Vite-App fuer Kunden- und Admin-Workflows
|
|
- `migrations/`: versionierte SQL-Migrationen
|
|
- `deploy/`: lokale und spaetere Deployment-Artefakte
|
|
|
|
## Lokales Setup
|
|
|
|
1. Go >= 1.22 installieren.
|
|
2. Node.js >= 20 und npm installieren.
|
|
3. Docker Desktop oder kompatible Docker Engine installieren.
|
|
4. `.env.example` nach `.env` kopieren und lokale Werte setzen.
|
|
5. Abhaengigkeiten installieren: `npm install --prefix frontend`.
|
|
6. Go-Abhaengigkeiten installieren: `go work sync`.
|
|
7. Lokale Infrastruktur starten: `make dev`.
|
|
8. Backend starten: `go run ./backend/cmd/api`.
|
|
9. Console-Proxy starten: `go run ./console-proxy/cmd/console-proxy`.
|
|
10. Frontend starten: `npm run dev --prefix frontend`.
|
|
|
|
Supabase self-hosted liegt unter `deploy/supabase/`. Die lokale `deploy/supabase/.env` wird aus der offiziellen Vorlage erzeugt und nicht committed. Fuer App-`.env` die Werte `POSTGRES_PASSWORD`, `ANON_KEY` und `SERVICE_ROLE_KEY` aus `deploy/supabase/.env` uebernehmen.
|
|
|
|
Lokale Dienste:
|
|
|
|
- Supabase API Gateway: `http://localhost:8000`
|
|
- Supabase Studio: `http://localhost:8000/project/default`
|
|
- Supavisor Session Pooler: `localhost:5432`
|
|
- Supavisor Transaction Pooler: `localhost:6543`
|
|
|
|
Aktuelle Targets:
|
|
|
|
- `make test`: Go-Tests
|
|
- `make build`: Go-Builds
|
|
- `make frontend-build`: Frontend-Production-Build
|
|
- `make lint`: Go Vet und Frontend-ESLint
|
|
- `make verify`: Lint, Tests und Builds
|
|
- `make dev-down`: Supabase-Stack stoppen
|
|
- `make dev-logs`: Supabase-Logs verfolgen
|
|
- `make migrate`: Platzhalter bis E2-T01 `golang-migrate` einbindet
|
|
|
|
## CI
|
|
|
|
Forgejo Actions laufen unter `.forgejo/workflows/ci.yml`.
|
|
|
|
- `verify`: installiert Go/Node-Abhaengigkeiten und fuehrt `make verify` aus.
|
|
- `secret-scan`: fuehrt `zricethezav/gitleaks:v8.28.0` mit `.gitleaks.toml` aus. Die Konfiguration erlaubt nur dokumentierte Beispielwerte aus den offiziellen Supabase-Upstream-Dateien.
|
|
|
|
## Sicherheitsregeln
|
|
|
|
- Nur Backend, Worker und Console-Proxy sprechen mit Proxmox.
|
|
- Proxmox-Tokens werden nie im Frontend sichtbar und nie unverschluesselt gespeichert.
|
|
- Tenant-bezogene Queries muessen immer tenant-gefiltert sein.
|
|
- Secrets gehoeren in `.env` oder einen Secret-Manager, nie ins Repo.
|