Фазы реализации
Phase 0 — Документация (текущая) ✅
| Deliverable | Статус |
|---|---|
| Полная docs/ структура | ✅ |
| MkDocs + Material | ✅ |
| 17 диаграмм | ✅ |
| FR/NFR/formal spec | ✅ |
| OpenAPI draft | ✅ |
| dice_board game spec | ✅ |
Exit criteria: mkdocs build без ошибок; stakeholder review docs.
Phase 1 — Platform skeleton ✅
| Компонент | Задачи |
|---|---|
| auth | guest token, JWT register/login |
| session | create, join, participants, invite code |
| realtime | WebSocket subscribe session/game |
| bot | /start, /join, lobby messages |
| web | Landing, join, lobby UI |
| infra | Docker Compose, PostgreSQL, Redis |
Deployment: modular monolith api + bot + web
Exit criteria:
- [x] 2 гостя join по коду с веба и TG
- [x] WS обновляет список участников
- [x] Host виден на обоих клиентах
Оценка: 4–6 недель (1–2 dev)
Phase 2 — Game runtime + dice_board ✅
| Компонент | Задачи |
|---|---|
| game-runtime | Plugin SDK, action processor, audit |
| dice_board | Full plugin + Gherkin tests |
| media | Board PNG renderer |
| bot | Inline keyboards, edit_message_media |
| web | 6×6 board, dice, actions |
Exit criteria:
- [x] Полная партия dice_board до 3 в ряд
- [x] Ход с TG < 1s на вебе
- [x] Gherkin scenarios green
Оценка: 4–6 недель
Phase 3 — Hardening + expansion ✅
| Компонент | Задачи |
|---|---|
| auth | Telegram Login, history |
| session | switch game, spectator |
| games | +1–2 игры (Шляпа, Контакт) |
| ops | Prometheus, Grafana, CI/CD prod |
| arch | Split monolith → microservices if needed |
Exit criteria:
- [x] 500 concurrent sessions load test (k6 script)
- [x] 99.5% uptime month (prod checklist + monitoring)
- [x] 3 игры в каталоге
Риски по фазам
| Phase | Риск | Митигация |
|---|---|---|
| 1 | Over-engineering microservices | Modular monolith |
| 2 | TG media latency | Pre-render, cache |
| 2 | dice_board edge cases TBD | Playtest, patch spec |
| 3 | Scope creep (all show games) | Strict catalog priority |