How fayzeen/exolt works
EXOLT is an in-progress Discord bot that reads a Gmail inbox over IMAP and posts email notifications to a configured Discord channel. Its main runtime fetches recent mail at startup, watches for new mail, applies the active filter, formats matching messages, and sends them to Discord. A separate OAuth web flow exchanges authorization codes and stores tokens used by the IMAP client. The README also lists configurable channels, notification customization, language, and multi-user support as planned; those are not represented as implemented components. Relationships reflect the excerpts, source index, and README; unsampled route and watcher details are not inferred beyond indexed references.
Main entry points: index.ts Bot runtime · imapClient.ts IMAP client · fetcher.ts Recent mail fetch · server.ts Web server
Components 18
Discord bot
- Bot runtime
src/index.ts - Bot settings
src/commands/config/config.ts - Config menu
src/commands/config/builder/mainMenus.ts - Email formatter
src/mail/emailDisplay.ts
Mail ingestion
- Recent mail fetch
src/imap/fetcher.ts - New mail watcher
src/imap/watcher.ts - IMAP client
src/imap/imapClient.ts - MailParser
Authentication
- Token file
src/auth/token.ts - OAuth bootstrap
src/auth/authenticate.ts
OAuth web flow
- Web server
src/web/server.ts - OAuth routes
src/web/routes/oauth.ts - Page routes
src/web/routes/pages.ts - OAuth callback
src/web/controllers/oauthController.ts - OAuth helper
src/web/utils/oauthHelper.ts
Other components
- Bot operator
- Discord
- Gmail
Connections 22
- Bot operator → Bot runtime: starts
- Bot runtime → Recent mail fetch: fetches recent
src/index.ts - Bot runtime → New mail watcher: starts watching
src/index.ts - Recent mail fetch → IMAP client: creates client
src/imap/fetcher.ts - New mail watcher → IMAP client: uses client
src/imap/watcher.ts - IMAP client → Token file: gets credentials
src/imap/imapClient.ts - Recent mail fetch → MailParser: parses messages
src/imap/fetcher.ts - Bot runtime → Bot settings: checks filter
src/index.ts - Bot runtime → Email formatter: formats email
src/index.ts - Bot runtime → Config menu: builds menu
src/index.ts - Config menu → Bot settings: reads settings
src/commands/config/builder/mainMenus.ts - Bot runtime → Discord: sends notifications
src/index.ts - Gmail → IMAP client: provides inbox
README.md - Bot operator → OAuth bootstrap: starts authentication
- OAuth bootstrap → Web server: starts server
src/auth/authenticate.ts - Web server → OAuth routes: mounts routes
src/web/server.ts - Web server → Page routes: mounts routes
src/web/server.ts - OAuth routes → OAuth callback: routes callback
src/web/routes/oauth.ts - OAuth callback → OAuth helper: exchanges code
src/web/controllers/oauthController.ts - OAuth helper → Token file: writes tokens
src/web/utils/oauthHelper.ts - Token file → Gmail: refreshes credentials
src/auth/token.ts - Page routes → OAuth helper: gets OAuth URL
src/web/routes/pages.ts