Orbit documentation: docs, wiki and FAQ pages
This commit is contained in:
commit
bcbe5fff22
18 changed files with 714 additions and 0 deletions
40
docs/architecture.md
Normal file
40
docs/architecture.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# 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.ts` is the WebSocket transport + CAP negotiation; `parser.ts`,
|
||||
`modes.ts`, `casemap.ts`, `numerics.ts` are pure primitives. `caps.ts` lists the requested
|
||||
capabilities.
|
||||
- **`store.ts`** — turns IRC events into buffers, messages and members (zustand). Pure helpers split
|
||||
into `store/text.ts` (masking, formatting) and `store/persistence.ts`.
|
||||
- **`lib/`** — `format.tsx` renders mIRC formatting → React; `editor.ts` is the rich-composer
|
||||
serialization.
|
||||
- **`components/`** — the UI, grouped by area (`chat/`, `settings/`, `profile/`, `modals/`).
|
||||
`Chat.tsx` is 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](/docs/push-to-deploy/) gates on the same.
|
||||
Loading…
Add table
Add a link
Reference in a new issue