# Module: Nexus Control Center

**Placering:** `source/nexus-control-center/`  
**Fase:** 1 (skeleton) → løbende  
**Type:** Cloud API + Web Admin UI

---

## Funktioner

- API Gateway for alle klienter og admin
- Admin web UI (dashboard, enheder, brugere, politikker, apps)
- Event bus og notifikationer
- Audit log aggregation og søgning
- Tenant management (Fase 8)
- Rapportering og analytics
- Konfiguration og feature flags

---

## Ansvar

| Ansvar | Ejer |
|--------|------|
| API Gateway og routing | Control Center |
| Admin UI | Control Center |
| Event orchestration | Control Center |
| Audit aggregation | Control Center |
| Service hosting for backend moduler | Control Center |

---

## Datamodel

```
Tenant (Fase 8)
├── id: UUID (PK)
├── name: string
├── subdomain: string
├── branding: JSON
├── settings: JSON

AuditEvent
├── (se security/AUDIT_LOGGING.md)

Notification
├── id: UUID
├── recipient_id: UUID
├── type: string
├── message: string
├── read: boolean
├── created_at: timestamp

FeatureFlag
├── key: string
├── enabled: boolean
├── tenant_id: UUID (nullable)
```

---

## Afhængigheder

| Afhænger af | Hvorfor |
|-------------|---------|
| Identity | Authentication for admin |
| PostgreSQL | Data persistence |
| Redis | Cache, events, sessions |

| Afhænges af af | Hvorfor |
|----------------|---------|
| Alle moduler | Hosting og API gateway |
| Admin brugere | Administration |
| Agent | Device API |
| Shell | Profile API |

---

*Se: [architecture/SYSTEM_OVERVIEW.md](../architecture/SYSTEM_OVERVIEW.md)*
