Command System & Event Bus - Incomplete-Infinity/eve-companion GitHub Wiki
🧭 Command System & Event Bus
A global command and event system will allow modules and workers to:
- Dispatch standardized commands (e.g.
openWindow('Mail')
) - Broadcast events (e.g.
fit:parsed
,fleet:update
,token:expired
) - Listen and react without tight coupling
Command Pattern
window.dispatchEvent(new CustomEvent('app:command', {
detail: {
type: 'window:open',
payload: { id: 'Mail', pinned: true }
}
}));
Event listeners will be namespace-aware and scoped per module.
Event Bus Utility (Planned)
A shared bus module will:
- Standardize event dispatching and logging
- Allow hooks into UI (for notifications, log display)
- Enable worker-to-worker messages via proxy relay
This enables dynamic communication between otherwise isolated modules.
📌 Summary
- Background workers make the app feel fast and responsive
- Work is divided across logical domains (market, API, fleet, scan)
- The command system will unify control and communication across modules
- The event bus will act as an invisible glue between core services