Architecture
Orbit is a small, modular React app. No framework magic — a thin IRC layer feeds a zustand store, which renders components.
Project tree
src/
main.tsx App.tsx index.css
core/
config.ts networks.ts handoff.ts i18n/
irc/ client · transport · registration · ircv3 · server-info · parser · modes · casemap · numerics · caps · ctcp
store.ts store/ handler (+ sub-handlers) · commands · upload · account · text · context · persistence
lib/ format.tsx · media.tsx · link-preview.tsx · editor.ts · escape.ts ← presentation + editor helpers
platform/ notify.ts · push.ts · avatars.ts ← browser / OS integration
ui/ appUpdate.ts · viewport.ts
themes/ the light / dark / orbit / yomirc theme system
modules/ api.ts · registry.ts · bus.ts · loader.ts · sandbox/ ← the plugin system
components/
Chat.tsx ← thin assembler
chat/ MessageList · MsgRow · SystemLine · Composer (+ composer/) · Sidebar · Topbar
settings/ SettingsModal · rows · sections/
modals/ Modals · Modal · one file per dialog
profile/ ProfileModal
Avatar · ConnectScreen · Turnstile · PluginBoundary
Layers
core/irc/— the protocol.client.tsis a thin orchestrator overtransport.ts(WebSocket, reconnect, send queues),registration.ts(the CAP/SASL handshake),ircv3.ts(capability negotiation + the cap-gated extended commands), andserver-info.ts(parsed ISUPPORT + limits).parser.ts,modes.ts,casemap.ts,numerics.tsare pure primitives;caps.tslists the requested capabilities.core/store.ts— the zustand store. Incoming IRC events run throughstore/handler.ts, a dispatcher that delegates to focused sub-handlers (whois,membership,messaging,mode,numerics, …); outgoing user actions live incommands/upload/account. Pure helpers sit instore/text.tsandstore/context.ts.lib/—format.tsxrenders mIRC formatting → React;media.tsx+link-preview.tsxare the inline embeds;editor.tsis the rich-composer serialization.components/— the UI, grouped by area (chat/,settings/sections/,modals/,profile/), each large view split into small files behind a thin assembler (Chat.tsx).modules/— the runtime plugin system:api.tsis theOrbitAPI,sandbox/the isolated, capability-gated tier.
Quality
Vitest unit tests cover the IRC layer, the store sub-handlers, and the pure helpers (200+ tests); lint, tests, and a Playwright end-to-end run against a live Ergo server all gate the self-hosted push-to-deploy.