Cross-cutting: docs/overview/ARCHITECTURE.md · docs/overview/MVP_PRODUCT_SUMMARY.md · docs/reference/WORKFLOWS.md
src/MimironsGoldOMatic.TwitchExtension is MVP-5 — Vite + React + TypeScript viewer panel with window.Twitch.ext, Zustand (mgmPanelStore), and generated typed API client files src/api/models.ts + src/api/client.ts (produced by src/Tools/MimironsGoldOMatic.ApiTsGen from Backend + Shared contracts). It calls /api/roulette/state, /api/pool/me, /api/payouts/my-last, renders visual roulette + countdown from nextSpinAt/serverNow, and aligns with UI-101–106 (UI_SPEC.md). See docs/reference/IMPLEMENTATION_READINESS.md.UI_SPEC.md in this folder — MVP: viewer UI-101–106 only. Broadcaster UI-201–204 are post-MVP (see docs/overview/ROADMAP.md MVP-5). Cross-cutting tokens: docs/reference/UI_SPEC.md.!twgold <CharacterName> and gift queue via !twgift <CharacterName> (see docs/overview/SPEC.md), not form-driven.!twgold <CharacterName> in stream chat to join roulette. Gift queue uses !twgift <CharacterName> (docs/overview/SPEC.md §12). After a roulette win, they must watch WoW for the streamer whisper (Russian text, docs/overview/SPEC.md §9) and reply !twgold in-game before gold mail can be sent.window.Twitch.ext for viewer identity and polls the EBS for pool size, spin state, and winner/payout status./api/roulette/state, GET /api/pool/me, GET /api/payouts/my-last — all use Twitch Extension JWT (Bearer) only in MVP (docs/overview/SPEC.md §5, §5.1). Dev Rig uses real Twitch-issued tokens; EBS validates per Twitch (docs/overview/SPEC.md deployment scope)./api/version — update metadata check (version, optional releaseNotesUrl, optional minimum component versions). The panel checks in background on mount and at low frequency; failures are logged only and do not show an error banner.GET /api/roulette/state + GET /api/pool/me — server-authoritative nextSpinAt (UTC :00/:05/…), spinPhase enum, optional currentSpinCycleId. Must drive the countdown from nextSpinAt / serverNow.GET /api/payouts/my-last — PayoutDto or 404 when the viewer has no winner payout yet./api/payouts/claim for Dev Rig / testing only — requires Mgm:DevSkipSubscriberCheck on the EBS until Helix subscriber verification is implemented for this path (docs/overview/SPEC.md §5)./who / verification if the EBS exposes it.!twgold (case-insensitive; docs/overview/SPEC.md §9). Status changes to Sent only after [MGM_CONFIRM:UUID] confirmation in WoW log flow.Sent (in-panel) per docs/overview/SPEC.md §11: Награда отправлена персонажу <WINNER_NAME> на почту, проверяй ящик! (WINNER_NAME = enrolled CharacterName). Twitch broadcast chat delivery is EBS Helix only in MVP (Extension does not trigger chat post).axios — HTTP client; createMimironsGoldOMaticEbsClient adds Authorization: Bearer from Twitch helper.zustand — panel store + polling hooks (useMgmEbsPolling, useMgmSpinCountdown, useTwitchExtensionAuth).package.json).src/api/models.ts and src/api/client.ts are auto-generated by src/Tools/MimironsGoldOMatic.ApiTsGen and must not be edited manually.src/state/mgmPanelStore.ts and src/hooks/.PanelErrorBoundary wraps the viewer UI (src/components/PanelErrorBoundary.tsx)./my-last to present payout progress (Pending -> InProgress -> Sent). In UX text, Sent must mean mail confirmation via [MGM_CONFIRM:UUID] after the whisper consent step.429, 503, or network errors, use exponential backoff (cap interval, e.g. ≤ 60s) and a Retry action (docs/overview/SPEC.md §5.1).