Dev-Setup & Deployment
Anleitung für das lokale Entwicklungssetup der SOCSuite. Zielgruppe: Entwickler, die zum ersten Mal mit dem Projekt arbeiten.
Voraussetzungen
| Tool | Version | Hinweis |
|---|---|---|
| Go | 1.26+ | go version |
| Node.js | 20 LTS+ | node --version |
| pnpm | 9+ | pnpm --version |
| Docker | 24+ | Für lokale Services |
| kubectl | 1.30+ | Kubernetes-Deployment |
| make | — | Build-Automatisierung |
| Git | 2.40+ | Conventional Commits |
Ersteinrichtung (Schritt-für-Schritt)
1. Repository klonen
git clone https://gitlab.com/imvee/socsuite.git
cd socsuite2. Abhängigkeiten installieren
make installDies führt aus:
pnpm install(Frontend + Packages)cd apps/api && go mod download(Backend)
3. Umgebungsvariablen
cp .env.example .env:::warn [Keine echten Secrets in .env]
.env ist in .gitignore. Nur .env.example wird committed — dort stehen Platzhalter, keine echten Werte.
:::
4. Services starten
# Alle Dev-Server (Frontend + Backend)
make dev
# Nur Frontend
make dev-web
# Nur Backend
make dev-apiServices und Ports
| Service | URL / Port |
|---|---|
| App | https://socsuite.dev.imvee.de |
| Auth | https://auth.dev.imvee.de |
| SIEM | https://siem.dev.imvee.de |
| API (direkt) | :8080 |
| Frontend (Vite) | :3000 |
| PostgreSQL | :5432 |
| Redis | :6379 |
| OpenSearch | :9200 |
| Keycloak | :8080 (via auth.dev.imvee.de) |
| Agent WebSocket | wss://socsuite.dev.imvee.de/ws/agents/:id (via Gateway) |
Kubernetes-Deployment
kubectl apply -k infrastructure/k8s/overlays/dev:::info [Details]
Vollständige Dokumentation zu K8s-Deploy-Workflow, Gateway API und CI/CD-Pipeline →
infrastructure/AGENTS.md
:::
Lint & Code-Qualität
Alle Checks müssen vor einem Commit grün sein:
| Typ | Befehl | Severity |
|---|---|---|
| TypeScript/JS | npx eslint apps/web/src --max-warnings=0 | Blocker |
| Formatierung | npx prettier --check . | Warning |
| Go | golangci-lint run ./... | Blocker |
| YAML | yamllint | Blocker |
| Shell | shellcheck | Blocker |
| SQL | sqlfluff | Blocker |
:::info [Lint-Configs]
Konfigurationsdateien im Repo-Root: golangci.yml, prettier.json, eslint.config.js, yamllint.yml
:::
IDE-Setup (empfohlen)
VS Code Extensions
- Go (
golang.go) — Go-Support mit gopls - ESLint (
dbaeumer.vscode-eslint) - Prettier (
esbenp.prettier-vscode) - YAML (
redhat.vscode-yaml)
Formatierung
- Go:
gofmt-Stil (Tabs) - TypeScript/JS: Prettier (2 Spaces, Semicolons, Trailing Commas)
- Kein
anyin TypeScript →unknownverwenden
Git-Workflow
Branch-Struktur
main → Stable (bis MVP: Direkt-Commits)
feature/* → Features
fix/* → Bugfixes:::info [Bis MVP: direkt auf main]
In der MVP-Phase werden Commits direkt auf main gemacht. Ab Post-MVP: eigener Branch,
kein direkter Commit auf main. Kein Force-Push auf geteilte Branches.
:::
Commit-Konventionen
Alle Commits folgen dem Conventional-Commits-Format:
| Präfix | Verwendung |
|---|---|
feat: | Neues Feature |
fix: | Bugfix |
refactor: | Refactoring (kein Feature, kein Fix) |
test: | Tests hinzufügen oder anpassen |
docs: | Dokumentation |
chore: | Wartungsaufgaben, Abhängigkeiten |
Was niemals committed wird
.env-Dateien (nur.env.exampleist erlaubt)node_modules/dist/vendor/- Lock-Files manuell editieren
- Binäre Dateien
Troubleshooting
Keycloak-Redirect schlägt fehl
SameSite=Strict bricht den OAuth-Redirect. Die Anwendung nutzt SameSite=Lax — stelle sicher, dass du über https://socsuite.dev.imvee.de zugreifst (nicht localhost).
Datenbank-Verbindung fehlgeschlagen
Prüfe ob PostgreSQL auf Port :5432 erreichbar ist:
pg_isready -h localhost -p 5432Port-Konflikt auf :8080
API und Keycloak nutzen beide :8080. Keycloak wird über auth.dev.imvee.de geroutet — stelle sicher, dass die /etc/hosts-Einträge korrekt gesetzt sind.
Frontend zeigt leere Seite
# Cache löschen und neu starten
rm -rf node_modules/.vite
pnpm devSiehe auch
- Architektur — Monorepo-Struktur und Tech-Stack
- Betrieb — Monitoring, Backup, Wartung
- Contributing — Git-Workflow und Code-Standards
- Test-Strategie — Test-Pyramide und Coverage-Ziele