Repository navigation
Core State and Domain
Isllan Toso edited this page Nov 21, 2026
·
1 revision
bullet-core is the zero-dependency foundation of the workspace (#![forbid(unsafe_code)]). It defines every domain type, phase transition, and validation rule so illegal states are unrepresentable at compile time.
-
Single Source of Truth:
AppStateis published viatokio::sync::watch::Sender<AppState>(StateSender) and read by subscribers throughStateReceiver. -
Named Transitions Only: External modules never mutate
AppStatefields directly. Every mutation goes through explicit transition functions inbullet_core::state:set_lcu_connectedset_phaseset_overlay_targetset_injection_statusset_party_statusclear_for_new_game
-
Exclusive Selection Origin:
SelectionOriginis an enum (User,History,Random,Preset) rather than independent booleans, preventing conflicting selection sources.
GamePhase maps League Client lifecycle phases into deterministic behavior:
-
Between matches:
None,WaitingForStats,PreEndOfGame,EndOfGame,FailedToLaunch,TerminatedInError. -
Pre-match selection:
Lobby(including Swiftplay/Brawl/TFT queues),Matchmaking,ReadyCheck,ChampSelect,Finalization. -
Active match:
GameStart,InProgress,Reconnect.
QueueInfo distinguishes standard Summoner's Rift/ARAM queues from Swiftplay/Quickplay (where picks happen in lobby before matchmaking) and TFT queues (QueueInfo::is_tft).
IdentityLoadout models profile customization across 5 categories:
- Summoner Icons
- Ranked/Prestige Borders
- Challenge Tokens
- Profile Titles
- Lobby Banners
Every incoming or persisted IdentityLoadout field is validated against:
- XSS / HTML injection
- CSS injection
- Path traversal (
..,/,\) - Oversized payloads
Only sanitized values are persisted to state/identity.json or broadcast to Party Mode peers.
-
ModSlot: Categorizes custom mods intoSkin,Map,Font,Announcer, andOtherso users can stack multiple non-conflicting mods cleanly. -
OverlayCommand: Typed command channel bridging the UI (desktop window or In-Client UI) withOverlaySession(SelectSkin,SelectRandom,PinPreset,SetMods,SetIdentity,JoinLobbyParty,OpenPanel,Minimize,Hide).
Architecture & Domain
Client & Asset Pipeline
Platform & Security