# HexaHost GameCloud — Implementation Status

Last updated: 2026-06-26

## Current phase: Phase 2 — Single-Node Vertical Slice ✅

### Phase 2 completed

| Area | Status | Notes |
|------|--------|-------|
| Prisma lifecycle models | Done | Allocations, server fields, node enrollment |
| `@hexahost/contracts` servers | Done | Zod schemas for create/list/action |
| API ServersModule | Done | CRUD, start/stop, BullMQ jobs |
| API NodesModule | Done | WebSocket `/api/v1/nodes/ws`, Redis command bridge |
| API Plans | Done | `GET /api/v1/plans` |
| Admin nodes | Done | `POST /api/v1/admin/nodes` with enrollment token |
| Worker provisioning | Done | Port allocation, Redis commands, response wait |
| Worker lifecycle | Done | start-server, stop-server jobs |
| Go node-agent | Done | WebSocket, Docker (`itzg/minecraft-server:java21`) |
| Web server UI | Done | Create, list, detail, start/stop |
| Dev seed | Done | `pnpm db:seed` — Free plan + local dev node |
| Migrations | Done | `20260626140000_phase2_game_servers` |

### Abnahmekriterium Phase 2

- [x] User creates server in web panel
- [x] Provisioning pipeline (API → Worker → Agent)
- [x] Start/stop lifecycle
- [x] Node enrollment + heartbeat
- [x] Connection address shown (`localhost:port`)
- [ ] Manual Minecraft join validation (requires Docker + agent running locally)

### Local vertical slice

```bash
pnpm dev:infra
pnpm db:migrate   # or db:push
pnpm db:seed
pnpm dev

# Terminal 2 — Node Agent (requires Go + Docker)
cd apps/node-agent
set NODE_ID=00000000-0000-4000-8000-000000000001
set NODE_TOKEN=local-dev-enrollment-token-change-me-32chars
set NODE_AGENT_PUBLIC_URL=ws://localhost:3001/api/v1/nodes/ws
make run
```

### Known limitations

- Single-node only (no scheduler/queue fairness yet).
- Minecraft image pull on first provision can take several minutes.
- Node agent on Windows needs Docker Desktop; run agent on host, not in Compose.
- mTLS for agent deferred; token-based enrollment only.
- Metrics are basic heartbeat payload only.

### Next phase: Phase 3 — Console, files, settings

- Live console WebSocket
- File manager
- server.properties editor
- Player lists
