How cellixx7/cylbot works
CylBot combines a Discord bot, an HTTP API, and a web dashboard. The principal web workflow is a user opening the site, optionally authenticating with Discord, then using dashboard and ticket features through the bot API; ticket operations interact with Discord and persistence. The repository also includes announcements, community previews, profiles, AI text features, and bot presence integrations. Edges are limited to relationships visible in excerpts, the SOURCE INDEX, or README; several unsampled feature internals are represented at their source-directory level.
Main entry points: server.js HTTP API server · vite.config.js Web API proxy · index.js Bot runtime and events · createServices.js Service composition
Components 24
Web experience
- Web application
web/src/App.jsx - Web authentication
web/src/auth/useAuth.js - Dashboard and pages
web/src/dashboard - Ticket workspace
web/src/tickets - Announcements workspace
web/src/announcements - Web API proxy
web/vite.config.js
API and identity
- HTTP API server
bot/src/api/server.js - OAuth routes
bot/src/api/routes/authRoutes.js - Session checks
bot/src/api/http/auth.js - Announcement routes
bot/src/api/routes/announcementRoutes.js - Community preview
bot/src/api/routes/communityPreviewRoutes.js
Ticket operations
- Ticket API routes
bot/src/Ticket/api - Ticket services
bot/src/Ticket/services - Discord ticket adapter
bot/src/Ticket/providers/discordTicketAdapter.js - Ticket repositories
bot/src/Ticket/repositories
Discord bot
- Bot runtime and events
bot/src/index.js - Bot presence
bot/src/services/presenceManager.js
Product services
- PostgreSQL
bot/src/database/schema.js - Service composition
bot/src/app/createServices.js - Announcement service
bot/src/services/announcementService.js - AI services
bot/src/services/openRouterService.js
Other components
- Web user
- Discord
- Spotify
Connections 29
- Web user → Web application: opens
README.md - Web application → Web authentication: checks login
web/src/App.jsx - Web authentication → Web API proxy: requests session
web/src/auth/useAuth.js - Web application → Dashboard and pages: renders pages
web/src/App.jsx - Dashboard and pages → Web API proxy: calls API
- Ticket workspace → Web API proxy: calls API
- Announcements workspace → Web API proxy: calls API
- Web API proxy → HTTP API server: forwards /api
README.md - HTTP API server → OAuth routes: dispatches
bot/src/api/server.js - HTTP API server → Ticket API routes: dispatches
bot/src/api/server.js - HTTP API server → Community preview: dispatches
bot/src/api/server.js - HTTP API server → Announcement routes: dispatches
bot/src/api/server.js - OAuth routes → Session checks: checks sessions
bot/src/api/routes/authRoutes.js - Ticket API routes → Session checks: checks sessions
bot/src/Ticket/api/ticketMessageRoutes.js - Ticket API routes → Ticket services: invokes operations
bot/src/Ticket/api/ticketMessageRoutes.js - Ticket services → Discord ticket adapter: uses Discord
- Ticket services → Ticket repositories: persists tickets
- Ticket repositories → PostgreSQL: reads and writes
bot/src/Ticket/repositories/postgresTicketRepository.js - Service composition → Ticket repositories: selects repository
bot/src/app/createServices.js - Service composition → Discord ticket adapter: creates adapter
bot/src/app/createServices.js - Service composition → Announcement service: creates service
bot/src/app/createServices.js - Announcement routes → Announcement service: handles announcements
bot/src/api/routes/announcementRoutes.js - Announcement service → AI services: uses AI
- Bot runtime and events → Service composition: creates services
bot/src/index.js - Bot runtime and events → HTTP API server: starts API
bot/src/index.js - Bot runtime and events → Discord: connects bot
README.md - Bot runtime and events → Bot presence: configures presence
- Bot presence → Spotify: fetches playback
bot/src/services/presenceManager.js - Community preview → Discord: fetches channel posts
bot/src/api/routes/communityPreviewRoutes.js