How ayn2op/discordo works
Discordo is a terminal client for Discord. The main workflow starts in the root UI, accepts a token from the environment or a login screen, then opens chat; chat presents guild/channel navigation and message interaction. Configuration and terminal rendering support that experience, while HTTP, TLS, and gateway packages provide Discord connectivity. The README documents password, QR, and token login. Some implementation excerpts are incomplete, so uncertain internal wiring is not shown.
Main entry points: root/model.go Root UI · chat/model.go Chat UI · login Login screens · messages_list.go Message list
Components 23
Application UI
- Command entry
cmd/root.go - Root UI
internal/ui/root/model.go
Authentication
- Login screens
internal/ui/login - Password login
internal/ui/login - QR login
internal/ui/login/qr/model.go - Token login
internal/ui/login/token/model.go - Token environment
Chat experience
- Chat UI
internal/ui/chat/model.go - Guild navigation
internal/ui/chat/guildstree/model.go - Channel picker
internal/ui/chat/channelspicker/model.go - Message list
internal/ui/chat/messages_list.go - Message composer
internal/ui/chat/composer.go - Attachment picker
internal/ui/chat/attachmentspicker/model.go - Mention list
internal/ui/chat/mentionslist/model.go - Markdown renderer
internal/markdown/renderer.go - Chat state
internal/ui/chat/state.go
Supporting services
- Configuration
internal/config/config.go - Token storage
internal/keyring/keyring.go - HTTP client
internal/http/client.go - TLS client
internal/tls/client.go - Gateway client
internal/gateway/gateway.go
Other components
- Terminal user
- Discord service
Connections 29
- Terminal user → Command entry: starts client
- Command entry → Configuration: loads settings
- Command entry → Root UI: starts UI
- Terminal user → Root UI: interacts
- Root UI → Login screens: shows login
- Login screens → Password login: offers
- Login screens → QR login: offers
- Login screens → Token login: offers
- Terminal user → Password login: enters credentials
- Terminal user → QR login: completes sign-in
- Terminal user → Token login: enters token
- Token environment → Root UI: provides token
- Password login → Root UI: returns token
- QR login → Root UI: returns token
- Token login → Root UI: returns token
- Root UI → Token storage: stores token
- Root UI → Chat UI: opens chat
- Chat UI → Guild navigation: presents navigation
- Chat UI → Channel picker: presents picker
- Chat UI → Message list: presents messages
- Chat UI → Message composer: presents composer
- Message list → Markdown renderer: renders content
- Message list → Attachment picker: offers attachments
- Message list → Chat state: reads chat state
- Message composer → Mention list: uses suggestions
- Chat UI → Configuration: uses settings
- HTTP client → TLS client: creates transport
- HTTP client → Discord service: sends API requests
- Gateway client → Discord service: connects gateway