# Nexus Product Tree

**Version:** 1.0  
**Formål:** Visuel og logisk produktstruktur — hvad der findes, hvad der bygges hvornår

---

## 1. Produkt-hierarki

```
Ninja Nexus (Platform)
│
├── 🖥️  BRUGEROPLEVELSE                    [POC 1: delvist]
│   └── Nexus Shell
│       ├── Login Screen                    ✅ POC 1
│       ├── Dashboard (desktop + widgets)   ✅ POC 1
│       ├── Launcher                        ✅ POC 1
│       ├── Taskbar                         ✅ POC 1 (basis)
│       ├── App Launcher Engine             ✅ POC 1
│       ├── Notifikationscenter             ⬜ POC 2
│       ├── Indstillinger                   ⬜ POC 2 (tema)
│       └── App Center View                 ⬜ Fase 7
│
├── 🔐  IDENTITY                            [POC 1: Lite]
│   └── Nexus Identity
│       ├── Authentication (OIDC)           ✅ POC 1
│       ├── Brugerprofil                    ✅ POC 1 (minimal)
│       ├── Session Management              ✅ POC 1 (minimal)
│       ├── MFA                             ⬜ POC 2
│       ├── RBAC / Roller                   ⬜ Fase 3
│       └── Federation (AD/Azure AD)        ⬜ Fase 8
│
├── ⚙️  ENHED (klient-service)              [Prototype 2+]
│   └── Nexus Agent
│       ├── Heartbeat & Registration        ⬜ POC 2
│       ├── IPC Server (Shell kommunikation)  ⬜ POC 2
│       ├── Inventory Collector             ⬜ Fase 4
│       ├── Policy Engine                   ⬜ Fase 4
│       ├── Install Engine                  ⬜ Fase 6
│       └── Remote Tunnel                   ⬜ Fase 5
│
├── ☁️  CLOUD / ADMIN                       [Prototype 2+]
│   └── Nexus Control Center
│       ├── API Gateway                     ⬜ POC 2
│       ├── Identity Host (monolit)         ✅ POC 1 (minimal)
│       ├── Admin Web UI                    ⬜ Fase 3
│       ├── Event Bus                       ⬜ Fase 4
│       └── Audit Aggregation               ⬜ Fase 8
│
├── 📱  DEVICE MANAGEMENT                   [Fase 4]
│   └── Nexus Device Management
│       ├── Enhedsregistrering
│       ├── Enhedsgrupper
│       ├── Politikker
│       ├── Compliance
│       └── Device Trust
│
├── 📦  SOFTWARE                            [Fase 6–7]
│   ├── Nexus Update Service
│   │   ├── Pakke-hosting
│   │   ├── Deployment jobs
│   │   └── Platform-opdateringer
│   └── Nexus App Center
│       ├── App-katalog
│       ├── Godkendelsesflow
│       └── Licensing
│
├── 🎧  SUPPORT                             [Fase 5]
│   └── Nexus Remote Support
│       ├── Skærmdeling
│       ├── Remote Terminal
│       └── Session Audit
│
└── 🧩  SHARED                              [Løbende]
    └── Shared Libraries
        ├── Protokol-kontrakter (IPC, API)
        ├── Datamodeller
        ├── Design System (UI komponenter)
        └── Krypto/logging utilities
```

**Legende:** ✅ POC 1 · ⬜ Senere

---

## 2. POC 1 produkt-træ (kun det der bygges)

```
Ninja Nexus — Prototype 1
│
├── Nexus Shell.exe                    ← Winlogon Shell
│   ├── Views/
│   │   ├── LoginView
│   │   ├── DashboardView              ← desktop + widgets
│   │   └── LauncherOverlay
│   ├── Services/
│   │   ├── AuthService                ← OIDC klient
│   │   ├── ProfileService             ← lokal cache
│   │   ├── AppCatalogService          ← læser apps.manifest.json
│   │   └── AppLaunchService           ← Process.Start
│   └── Assets/
│       └── apps.manifest.json         ← statisk app-liste
│
└── Nexus Control Center (API)         ← kan køre lokalt i dev
    └── Identity/
        ├── POST /connect/token        ← OIDC token endpoint
        ├── GET  /connect/authorize    ← OIDC authorize
        ├── GET  /api/users/me         ← profil
        └── GET  /health               ← health check
```

**Ikke i POC 1-træet:** Agent, Device Mgmt, App Center, Update Service, Remote Support, Admin UI.

---

## 3. Feature → modul mapping

| Feature | Primær modul | Sekundær | POC 1 |
|---------|--------------|----------|-------|
| Bruger logger ind | Shell (UI) | Identity (auth) | ✅ |
| Dashboard vises | Shell | — | ✅ |
| Widgets vises | Shell | — | ✅ (mock) |
| Launcher åbnes | Shell | — | ✅ |
| App startes | Shell | — | ✅ |
| App søges | Shell | — | ✅ |
| Seneste apps | Shell | — | ✅ |
| Pinned apps | Shell | — | ✅ (lokal) |
| Tema (light/dark) | Shell | Identity (persist) | ⬜ |
| MFA | Shell (UI) | Identity | ❌ |
| Device trust widget | Shell (UI) | Agent + Device Mgmt | ❌ |
| App install | Shell (UI) | App Center + Update + Agent | ❌ |
| Fjernsupport | — | Remote Support + Agent | ❌ |
| Admin brugerstyring | Control Center UI | Identity | ❌ |
| Politikker | Device Mgmt | Agent | ❌ |

---

## 4. Overlap-zoner og ejerskab

```
                    ┌─────────────────────────────────────┐
                    │           OVERLAP-ZONER              │
                    └─────────────────────────────────────┘

  Zone A: Login          Shell ═══ UI ═══ Identity (auth)
                         Ejer: UI=Shell, verify=Identity

  Zone B: Profil         Shell ═══ cache ═══ Identity (data)
                         Ejer: data=Identity, cache=Shell

  Zone C: App-liste      Shell ═══ launcher ═══ Agent (inventar)
                         POC 1: Shell alene (manifest)
                         Fremtid: Agent syncer, Shell viser

  Zone D: App-start      Shell ═══ execute ═══ Agent (policy)
                         POC 1: Shell alene
                         Fremtid: Agent godkender, Shell starter

  Zone E: App-katalog    Shell ═══ UI ═══ App Center (data)
                         Fremtid: App Center data, Shell UI

  Zone F: Admin bruger   Control Center ═══ UI ═══ Identity (API)
                         Fremtid: CC UI, Identity API
```

---

## 5. Leverancepakker per prototype

### Prototype 1 (nu)

| Pakke | Indhold | Kilde-mappe |
|-------|---------|-------------|
| `NexusShell.msi` | Shell exe + manifest + assets | `source/nexus-shell/` |
| `NexusIdentity.Api` | ASP.NET Core + OpenIddict | `source/nexus-identity/` |
| Seed data | 3 test-brugere, 8 apps i manifest | `source/nexus-identity/` |

### Prototype 2

| Pakke | Tilføjes |
|-------|----------|
| `NexusAgent.msi` | Windows Service + IPC |
| Shell update | Agent IPC klient, netværk via Agent |
| Identity update | MFA (TOTP) |
| Control Center | Device register endpoint |

### MVP (Fase 4)

| Pakke | Tilføjes |
|-------|----------|
| Device Management modul | Politikker, inventar, compliance |
| Control Center Admin UI | Bruger- og enhedsstyring |
| Agent (fuld) | Policy engine |

---

## 6. Afhængighedsgraf (POC 1)

```
                    ┌──────────────────┐
                    │  Windows 11      │
                    │  (Winlogon)      │
                    └────────┬─────────┘
                             │ starter
                             ▼
                    ┌──────────────────┐
                    │  Nexus Shell     │
                    └────────┬─────────┘
                             │ HTTPS (OIDC)
                             ▼
                    ┌──────────────────┐
                    │  Identity API    │
                    │  (Control Center │
                    │   host - dev)    │
                    └──────────────────┘

Ingen Agent. Ingen Device Mgmt. Ingen App Center.
```

---

## 7. Naming — undgå forvirring

| Term | Betyder | Betyder IKKE |
|------|---------|--------------|
| **Dashboard** | Desktop-skærm med widgets (Slut-bruger) | Control Center admin |
| **Launcher** | App-søge overlay (Win-taste) | Hele Shell |
| **Shell** | Hele Nexus desktop-miljøet | Kun taskbar |
| **Control Center** | Cloud admin platform | Bruger-dashboard |
| **Identity** | Auth-service | Windows Login |
| **Agent** | Windows Service på enhed | Shell |

---

*Se: [NEXUS_MASTER_ARCHITECTURE.md](./NEXUS_MASTER_ARCHITECTURE.md) · [NEXUS_PHASE_1_POC.md](./NEXUS_PHASE_1_POC.md)*
