felt/.planning/STATE.md
Mikkel Georgsen 8be69688e9 docs(01-01): complete project scaffold + core infrastructure plan
- SUMMARY.md with full execution details, 2 task commits, 2 deviations
- STATE.md updated with position (Plan 2/14), decisions, metrics
- REQUIREMENTS.md: ARCH-01, ARCH-04, ARCH-05, ARCH-06, ARCH-07 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:47:04 +01:00

74 lines
3.1 KiB
Markdown

# Project State
## Project Reference
See: .planning/PROJECT.md (updated 2026-02-28)
**Core value:** A venue can run a complete tournament offline on a €100 device with wireless displays and player mobile access — and it just works, on any network, with zero IT involvement.
**Current focus:** Phase 1 — Foundation
## Current Position
Phase: 1 of 7 (Tournament Engine)
Plan: 2 of 14 in current phase
Status: Executing Phase 1
Last activity: 2026-03-01 — Completed Plan A (Project Scaffold + Core Infrastructure) and Plan B (Database Schema + Migrations)
Progress: [█░░░░░░░░░] 14%
## Performance Metrics
**Velocity:**
- Total plans completed: 2
- Average duration: 12min
- Total execution time: 0.42 hours
**By Phase:**
| Phase | Plans | Total | Avg/Plan |
|-------|-------|-------|----------|
| 01-tournament-engine | 2 | 25min | 12min |
**Recent Trend:**
- Last 5 plans: 01-01 (15min), 01-02 (10min)
- Trend: starting
*Updated after each plan completion*
## Accumulated Context
### Decisions
Decisions are logged in PROJECT.md Key Decisions table.
Recent decisions affecting current work:
- [Init]: Go monorepo, shared `internal/`, `cmd/leaf` and `cmd/core` are the only divergence points
- [Init]: NATS sync_interval: always required before first deploy (December 2025 Jepsen finding)
- [Init]: All monetary values int64 cents — never float64 (CI gate test required)
- [Init]: go-libsql has no tagged releases — pin to commit hash in go.mod
- [Init]: Netbird reverse proxy is beta — validate player PWA access in Phase 1 before depending on it in Phase 8
- [01-01]: NATS server v2.12.4 requires Go 1.24+ — auto-upgraded from Go 1.23
- [01-01]: WebSocket JWT via query parameter (browser WS API limitation)
- [01-01]: JWT signing key ephemeral per startup — will persist in auth plan
- [01-02]: go-libsql requires single-statement Exec — migration runner splits SQL files into individual statements
- [01-02]: go-libsql PRAGMA handling is inconsistent — use QueryRow for journal_mode, execPragma helper for others
- [01-02]: Force single DB connection during migrations (SetMaxOpenConns(1)) for table visibility
### Pending Todos
None yet.
### Blockers/Concerns
- [Phase 1]: go-libsql CGO ARM64 cross-compilation must be validated in CI before any downstream features depend on it
- [Phase 1]: Netbird reverse proxy beta status — test the full QR code → HTTPS → WireGuard → Leaf flow early
- [Phase 3]: NATS JetStream cross-domain stream mirroring (Leaf → Core) needs integration test before Phase 2 depends on it
- [Phase 4]: Events engine security — run_command sandboxing, webhook URL allowlist, WYSIWYG HTML sanitization (deferred from Phase 1 security review)
- [Phase 7]: JWT HttpOnly cookies + signing key rotation (deferred from Phase 1 security review — localStorage is acceptable while Leaf is local-network only)
- [Phase 7]: Pi Zero 2W memory must be profiled on actual hardware with all display views before scaling signage
## Session Continuity
Last session: 2026-03-01
Stopped at: Completed 01-01-PLAN.md (Project Scaffold + Core Infrastructure)
Resume file: None