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/
config.ts App.tsx main.tsx index.css
lib/ format.tsx editor.ts ← presentation + editor helpers
ui/ theme.ts prefs.ts viewport.ts
services/ notify.ts push.ts avatars.ts
irc/ parser client modes numerics casemap types caps ctcp
store.ts store/text.ts store/persistence.ts
components/
Chat.tsx ← thin assembler
chat/ MessageList Composer Sidebar Topbar MemberList Banners
settings/ SettingsModal
profile/ ProfileModal
modals/ Modals
Avatar ConnectScreen Turnstile
Layers
irc/— the protocol.client.tsis the WebSocket transport + CAP negotiation;parser.ts,modes.ts,casemap.ts,numerics.tsare pure primitives.caps.tslists the requested capabilities.store.ts— turns IRC events into buffers, messages and members (zustand). Pure helpers split intostore/text.ts(masking, formatting) andstore/persistence.ts.lib/—format.tsxrenders mIRC formatting → React;editor.tsis the rich-composer serialization.components/— the UI, grouped by area (chat/,settings/,profile/,modals/).Chat.tsxis a ~30-line assembler.
Quality
Vitest unit tests cover the pure modules (parser, casemap, masking). Lint + test + build run in CI, and the self-hosted push-to-deploy gates on the same.