-
Backend API URL —
PUBLIC_API_URL(default:http://localhost:8080)- Used in:
apps/web/src/lib/api.ts,apps/web/src/lib/stores/aiConfig.svelte.ts - Allows pointing to different API endpoints (local dev, staging, production)
- Used in:
-
AI Provider Configuration — Persisted in localStorage
- Provider: anthropic, openai, google, custom (user-selected)
- API Key: User-provided via Settings UI
- Model: User-selected from available models for provider
- Endpoint: Optional, user-provided for custom providers
- Allows bring-your-own-key pattern ✓
-
Database URL —
DATABASE_URLin.env(for server)- Allows local dev, Docker, or cloud databases
-
CVE Data Feeds —
NVD_API_KEYin.env- Synced on server startup or manual trigger
-
Server Port —
8080(hardcoded in server)- Suggestion: Make configurable via
PORTenv var
- Suggestion: Make configurable via
-
Web Dev Port —
5173(Vite default)- Vite automatically uses next available port if occupied
-
Database Credentials —
postgres:postgres@localhost:5433/zenvra- Should be parameterized in
.env
- Should be parameterized in
-
Scan Engines — Hardcoded in CLI/server (sast, sca, secrets, ai_code)
- Already configurable per-request via
--disableflag and API
- Already configurable per-request via
-
Severity Thresholds — Default
lowin CLI- Already configurable via
--severityflag
- Already configurable via
- Server — Add
PORTandHOSTenv vars - Web — Consider
PUBLIC_APP_NAME,PUBLIC_VERSIONfor UI - Database — Already parametrized in
.env - AI Config — Already per-user via localStorage + Settings UI
# Terminal 1: Start PostgreSQL + Redis
docker compose up -d postgres redis
# Terminal 2: Start API Server
set -a && source .env && set +a
cargo run -p zenvra-server
# Terminal 3: Sync CVE data
cargo run -p zenvra-server -- sync
# Terminal 4: Start Web Frontend
cd apps/web
pnpm dev
# Open http://localhost:5174 in browser/health— Health check/api/v1/scan— Submit code scan (returns scan ID)/api/v1/scan/:id/events— Stream scan results via SSE/api/v1/history— Get scan history/api/v1/sync— Trigger manual CVE sync/api/v1/ai/models— Fetch available AI models for provider