Files
ledgrab/plans/game-integration/PLAN.md
T
alexei.dolgolyov 492bdb95e3 feat: game integration system
Receive real-time events from games (CS2, Dota 2, LoL, etc.) and drive
LED effects through the existing color strip and value source pipelines.

Core:
- GameEventBus (thread-safe pub/sub) with standardized 23-type event vocabulary
- GameAdapter ABC + AdapterRegistry + MappingAdapter (YAML-driven)
- Built-in adapters: CS2 GSI, Dota 2 GSI, LoL Live Client, Generic Webhook
- Community YAML adapters: Minecraft, Valorant, Rocket League
- GameEventColorStripStream with 5 effects (flash/pulse/sweep/color_shift/breathing)
- GameEventValueSource with EMA smoothing and timeout
- 4 built-in effect presets (FPS Combat, MOBA Health, Racing, Generic Alert)
- Auto-setup for Valve GSI games (Steam path detection, cfg file writing)
- Demo capture engine exposed to non-demo mode

Frontend:
- Game tab in Streams tree navigation with integration cards
- Game integration editor modal with adapter picker, config fields, event mappings
- game_event source type in CSS and ValueSource editors
- Setup instructions overlay (markdown rendered)
- Live event monitor and connection test

API:
- Full CRUD for game integrations
- Event ingestion endpoint (adapter-level auth)
- Adapter metadata, presets, auto-setup, status/diagnostics endpoints
2026-03-31 13:17:52 +03:00

54 lines
2.6 KiB
Markdown

# Feature: Game Integration
**Branch:** `feature/game-integration`
**Base branch:** `master`
**Created:** 2026-03-30
**Status:** 🟡 In Progress
**Strategy:** Big Bang
**Mode:** Automated
**Execution:** Orchestrator
## Summary
A system that receives real-time events from games (CS2, LoL, Dota 2, etc.) and drives LED effects through the existing color strip and value source pipelines. Uses a standardized event vocabulary so users configure effects against universal categories (health, kill, death) rather than game-specific IDs. Supports built-in adapters, community YAML adapter files, and a generic webhook fallback.
## Build & Test Commands
- **Build (frontend):** `cd server && npm run build`
- **Test:** `cd server && py -3.13 -m pytest tests/ --no-cov -q`
- **Lint:** `cd server && ruff check src/ tests/ --fix`
- **TypeScript:** `cd server && npx tsc --noEmit`
## Phases
- [x] Phase 1: Core Event Bus & Adapter Framework [backend] → [subplan](./phase-1-event-bus.md)
- [x] Phase 2: Storage & API — Game Integration Configs [backend] → [subplan](./phase-2-storage-api.md)
- [x] Phase 3: Built-in Game Adapters [backend] → [subplan](./phase-3-adapters.md)
- [x] Phase 4: GameEventColorStripStream [backend] → [subplan](./phase-4-css-stream.md)
- [x] Phase 5: GameEventValueSource [backend] → [subplan](./phase-5-value-source.md)
- [x] Phase 6: Frontend — Game Integration Management UI [frontend] → [subplan](./phase-6-frontend-management.md)
- [x] Phase 7: Frontend — ColorStrip & ValueSource Game Bindings [frontend] → [subplan](./phase-7-frontend-bindings.md)
- [x] Phase 8: Effect Presets & Polish [fullstack] → [subplan](./phase-8-presets-polish.md)
## Phase Progress Log
| Phase | Domain | Status | Review | Build | Committed |
|-------|--------|--------|--------|-------|-----------|
| Phase 1: Event Bus & Adapter Framework | backend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 2: Storage & API | backend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 3: Built-in Adapters | backend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 4: CSS Stream | backend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 5: Value Source | backend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 6: Frontend Management UI | frontend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 7: Frontend Bindings | frontend | ✅ Done | ✅ | ⬜ | ⬜ |
| Phase 8: Presets & Polish | fullstack | ✅ Done | ✅ | ✅ | ⬜ |
## Parallel Phases
Phases 4 and 5 are independent (no shared files) — can run in parallel.
## Final Review
- [ ] Comprehensive code review
- [ ] Full build passes
- [ ] Full test suite passes
- [ ] Merged to `master`