How koreanbots/core works
Koreanbots is a Korean Discord listing and discovery application for bots, servers, and their owners. Visitors browse or search listings and profiles; owners can submit and manage listings, while users can vote and report. The repository also exposes API routes and supports application management, moderation, notifications, and Discord webhook delivery. The graph emphasizes the main listing and voting flows plus shared data and notification services. Some routes and capabilities are identified from the file tree; where source excerpts do not establish a connection, the graph leaves it out.
Main entry points: Query.ts Query and domain data · index.ts API routes · index.tsx Bot details · NotificationManager.ts Vote notifications
Components 24
Discovery and profiles
- Bot listings
pages/bots/index.tsx - Bot details
pages/bots/[id]/index.tsx - Server listings
pages/servers/index.tsx - Server details
pages/servers/[id]/index.tsx - Search
pages/search.tsx - User profiles
pages/users/[id]/index.tsx - Listing components
components/ServerCard.tsx
Listing lifecycle
- Bot submission
pages/addbot.tsx - Server submission
pages/addserver/index.tsx - Listing edits
pages/bots/[id]/edit.tsx - Developer applications
pages/developers/applications/index.tsx - Submission review
pages/pendingBots/[id]/[date].tsx
API and services
- API routes
pages/api/v2/index.ts - Bot API
pages/api/v2/bots/[id]/index.ts - Server API
pages/api/v2/servers/[id]/index.ts - Application API
pages/api/v2/applications/bots/[id]/index.ts - Query and domain data
utils/Query.ts
Data and integrations
- SQL database
utils/Knex.ts - MongoDB models
utils/Mongo.ts - Discord clients
utils/DiscordBot.ts - Vote notifications
utils/NotificationManager.ts - Webhook delivery
utils/Webhook.ts
Other components
- Visitor
- Firebase messaging
Connections 19
- Visitor → Bot listings: browses
- Visitor → Server listings: browses
- Visitor → Search: searches
- Bot listings → Listing components: renders
- Server listings → Listing components: renders
- Bot details → API routes: fetches stats
pages/bots/[id]/index.tsx - Bot details → API routes: submits report
pages/bots/[id]/index.tsx - Bot details → Query and domain data: loads bot
utils/Query.ts - Server details → Query and domain data: loads server
utils/Query.ts - User profiles → Query and domain data: loads user
pages/users/[id]/index.tsx - API routes → Bot API: routes
- API routes → Server API: routes
- Query and domain data → SQL database: queries
utils/Query.ts - Query and domain data → MongoDB models: reads
utils/Query.ts - Vote notifications → Query and domain data: loads vote data
utils/NotificationManager.ts - Vote notifications → Firebase messaging: sends push
utils/NotificationManager.ts - Discord clients → Vote notifications: initializes
utils/DiscordBot.ts - Webhook delivery → Query and domain data: loads targets
utils/Webhook.ts - Webhook delivery → Discord clients: sends messages
utils/Webhook.ts