How sparklost/endcord works
Endcord is a terminal-first Discord client, with an optional GTK-backed window. Its principal workflow is selecting or creating an account, connecting to Discord, then browsing channels and messages and issuing commands through the interactive client. The map preserves major documented branches such as search, media, voice, and presence. The source excerpts are partial, so some subsystem links rely on documented product behavior and are omitted where ownership is unclear.
Main entry points: app.py Client orchestration · main.py Application entry · profile_manager.py Profile manager · auth.py Authentication
Components 21
Startup and accounts
- Application entry
main.py - Profile manager
endcord/profile_manager.py
Discord connectivity
- Authentication
endcord/auth.py - Discord API client
endcord/discord.py - Gateway connection
endcord/gateway.py
Client interaction
- Client orchestration
endcord/app.py - Terminal interface
endcord/tui.py - GTK interface
endcord/gtkcurses.py - Commands and parsing
endcord/parser.py - Search and assist
endcord/search.py
Content and media
- Message formatting
endcord/formatter.py - Message operations
endcord/message.py - Media handling
endcord/media.py - Voice calls
endcord/voice.py - Presence and RPC
endcord/rpc.py
Local services
- Configuration
endcord/config.py - Desktop services
endcord/peripherals.py - Channel chat cache
endcord/app.py
Other components
- User
- Discord
- Media applications
Connections 23
- User → Application entry: starts client
- Application entry → Configuration: loads settings
- Application entry → Profile manager: starts account flow
- Profile manager → Authentication: authenticates
- Authentication → Discord: sends login requests
- Profile manager → Client orchestration: opens client
- Client orchestration → Discord API client: requests Discord data
- Client orchestration → Gateway connection: handles live events
- Discord API client → Discord: sends API requests
- Gateway connection → Discord: exchanges events
- User → Terminal interface: interacts
- Client orchestration → Terminal interface: updates interface
- Client orchestration → GTK interface: supports windowed UI
- Client orchestration → Commands and parsing: dispatches commands
- Client orchestration → Search and assist: requests suggestions
- Client orchestration → Message formatting: formats chat
- Client orchestration → Message operations: performs message actions
- Client orchestration → Channel chat cache: reads and writes chat
- Client orchestration → Media handling: handles attachments
- Media handling → Media applications: opens media
- Client orchestration → Voice calls: supports voice calls
- Client orchestration → Presence and RPC: updates presence
- Client orchestration → Desktop services: uses desktop services