# Veylant IA — AI Governance Hub

B2B SaaS platform acting as an intelligent proxy/gateway for enterprise AI consumption.
Prevents Shadow AI, enforces PII anonymization, ensures GDPR/EU AI Act compliance, and controls costs across all LLM usage.

## Quick start

```bash
# Start the full local stack (proxy + PostgreSQL + ClickHouse + Redis + Keycloak)
make dev

# Health check
make health
# → {"status":"ok","timestamp":"..."}

# Stop and clean
make dev-down
```

## Test credentials (development only)

| User | Password | Role |
|------|----------|------|
| admin@veylant.dev | admin123 | Admin |
| user@veylant.dev | user123 | User |

Keycloak admin console: http://localhost:8080 (admin / admin)

## Architecture

See `docs/AI_Governance_Hub_PRD.md` for the full technical architecture.

```
API Gateway (Traefik)
        │
Go Proxy [cmd/proxy]          ← chi router, JWT auth, routing rules
  ├── Module Auth             ← Keycloak/OIDC/SAML
  ├── Module Router           ← rules engine
  ├── Module Logger           ← ClickHouse append-only
  ├── Module PII              ← gRPC → Python sidecar
  ├── Module Billing          ← cost tracking
  └── Module RBAC             ← row-level per tenant
        │ gRPC
PII Service [services/pii]    ← FastAPI + Presidio + spaCy
        │
LLM Adapters                  ← OpenAI, Anthropic, Azure, Mistral, Ollama
```

## Commands

```bash
make build        # go build ./cmd/proxy/
make test         # go test -race ./...
make lint         # golangci-lint + black --check
make fmt          # gofmt + black
make proto        # buf generate (requires: brew install buf)
make migrate-up   # apply DB migrations
make health       # curl /healthz
```

## Documentation

- `docs/AI_Governance_Hub_PRD.md` — Full product requirements
- `docs/AI_Governance_Hub_Plan_Realisation.md` — 26-week execution plan (164 tasks)
- `docs/Veylant_IA_Plan_Agile_Scrum.md` — Agile/Scrum plan (13 sprints)
- `docs/adr/` — Architecture Decision Records
