|
1 | | -TitanBot Roadmap / Structure Overview |
| 1 | +TitanBot Roadmap / Structure Overview |
2 | 2 |
|
3 | 3 | Goal |
4 | 4 | - Keep this as a practical map of the codebase. |
5 | 5 | - Show main folders and important files only (not every file). |
6 | | -- Document all implemented systems and features. |
7 | 6 |
|
8 | 7 | Root |
9 | 8 | - index.js -> process entry point |
10 | | -- package.json -> scripts, dependencies, project metadata (v2.0.0) |
| 9 | +- package.json -> scripts, dependencies, project metadata |
11 | 10 | - README.md -> setup and usage docs |
12 | 11 | - SECURITY.md -> security policy |
13 | 12 | - scripts/ -> utility/maintenance scripts (backup, restore, migrate) |
14 | 13 | - logs/ -> runtime log output |
15 | 14 | - src/ -> main bot application code |
16 | | -- tests/ -> test suite (17 tests for core systems) |
| 15 | +- tests/ -> unit tests (run via npm test) |
17 | 16 |
|
18 | 17 | src/ |
19 | 18 | - app.js -> creates client, initializes systems, starts web server |
20 | 19 |
|
21 | | -- commands/ -> slash command categories (19 feature modules) |
22 | | - - Core/ -> essential bot commands (help, ping, stats, uptime, invite) |
23 | | - - Community/ -> application management system + dashboards |
24 | | - - modules/app_dashboard.js -> interactive applications management UI |
| 20 | +- commands/ -> slash command categories by feature |
| 21 | + - Core/ -> help, ping, stats, uptime, invite |
| 22 | + - Community/ -> application management + dashboards |
25 | 23 | - Logging/ -> audit logging + event management |
26 | | - - modules/logging_dashboard.js -> logging configuration dashboard |
27 | | - - modules/logging_filter.js -> ignore list management |
28 | | - - modules/logging_setchannel.js -> log channel configuration |
29 | | - - Ticket/ -> support ticket system + management |
30 | | - - modules/ticket_dashboard.js -> ticket system configuration dashboard |
| 24 | + - modules/logging_dashboard.js |
| 25 | + - modules/logging_setchannel.js |
| 26 | + - Ticket/ -> support ticket system + dashboard |
31 | 27 | - ServerStats/ -> server stats channel system |
32 | | - - Economy/ -> economy system (currency, shop, transactions) |
33 | | - - Moderation/ -> moderation/admin commands (ban, warn, kick, mute) |
| 28 | + - Economy/ -> economy system |
| 29 | + - Moderation/ -> moderation/admin commands |
34 | 30 | - Verification/ -> member verification flow |
35 | 31 | - JoinToCreate/ -> dynamic voice channel creation |
36 | 32 | - Reaction_roles/ -> automatic role assignment |
37 | | - - Birthday/ -> birthday tracking and announcements |
38 | | - - Fun/ -> entertainment/game commands |
39 | | - - Giveaway/ -> giveaway management system |
40 | | - - Leveling/ -> xp and level system |
41 | | - - Search/ -> search functionality |
42 | | - - Tools/ -> utility tools |
43 | | - - Utility/ -> general utility commands |
44 | | - - Voice/ -> voice channel features |
45 | | - - Welcome/ -> welcome message system |
| 33 | + - Birthday/, Fun/, Giveaway/, Leveling/, Search/, Tools/, Utility/, Welcome/ |
46 | 34 |
|
47 | 35 | - config/ -> centralized configuration modules |
48 | | - - application.js -> main application config loader |
49 | | - - bot.js -> bot settings, embed colors/theme, presence, feature flags |
50 | | - - postgres.js -> PostgreSQL connection config and pool settings |
51 | | - - schemaVersion.js -> database schema version tracking |
52 | | - - shop/ -> shop item definitions and economy config |
53 | | - |
54 | | -- events/ -> Discord event listeners (13 event handlers) |
55 | | - - ready.js -> bot startup initialization |
56 | | - - interactionCreate.js -> slash command/button/modal interaction handler |
57 | | - - messageCreate.js -> message processing and prefix commands |
58 | | - - messageDelete.js -> message deletion logging |
59 | | - - messageUpdate.js -> message edit logging |
60 | | - - guildMemberAdd.js -> new member join handling |
61 | | - - guildMemberRemove.js -> member leave handling |
62 | | - - guildMemberUpdate.js -> member profile change handling |
63 | | - - voiceStateUpdate.js -> voice channel join/leave handling |
64 | | - - roleCreate.js -> role creation logging |
65 | | - - roleDelete.js -> role deletion logging |
66 | | - - userUpdate.js -> user profile change logging |
67 | | - - channelDelete.js -> channel deletion logging |
68 | | - |
| 36 | +- events/ -> Discord event listeners |
69 | 37 | - handlers/ -> interaction routing and component handlers |
70 | | - - commandLoader.js -> loads all slash commands at startup |
71 | | - - commands.js -> slash command execution router |
| 38 | + - commandLoader.js -> loads slash commands at startup |
72 | 39 | - events.js -> Discord event listener registration |
73 | | - - interactions.js -> button/select menu/modal interaction router |
74 | | - - interactionHandlers/ -> specific interaction handler modules |
75 | | - - calculateButtons.js -> calculator button interactions |
76 | | - - calculateModals.js -> calculator modal interactions |
77 | | - - countdownButtons.js -> countdown timer button handlers |
78 | | - - counterButtons.js -> counter system button handlers |
79 | | - - giveawayButtons.js -> giveaway participation handlers |
80 | | - - helpButtons.js -> help command buttons |
81 | | - - helpSelectMenus.js -> help command select menus |
82 | | - - loggingButtons.js -> logging dashboard buttons |
83 | | - - reactionRoles.js -> reaction role assignment handlers |
84 | | - - ticketButtons.js -> ticket system button handlers |
85 | | - - todoButtons.js -> todo system button handlers |
86 | | - - verificationButtons.js -> verification button handlers |
87 | | - - wipedataButtons.js -> wipe data confirmation handlers |
88 | | - |
89 | | -- interactions/ -> Discord interaction-specific handlers |
90 | | - - buttons/ -> button component response handlers |
91 | | - - modals/ -> modal form submission handlers |
92 | | - - selectMenus/ -> select menu choice handlers |
93 | | - |
94 | | -- services/ -> business logic + data operations (22 service modules) |
95 | | - - database.js -> storage abstraction layer |
96 | | - - guildConfig.js -> guild-level settings persistence |
97 | | - - applicationService.js -> application role management |
98 | | - - birthdayService.js -> birthday tracking and notifications |
99 | | - - configService.js -> configuration management |
100 | | - - economy.js -> economy system operations |
101 | | - - economyService.js -> economy service layer |
102 | | - - giveawayService.js -> giveaway management and scheduling |
103 | | - - joinToCreateService.js -> dynamic voice channel creation |
104 | | - - leveling.js -> user leveling system |
105 | | - - loggingService.js -> audit logging service |
106 | | - - moderationService.js -> moderation operations (warnings, bans, etc) |
107 | | - - reactionRoleService.js -> reaction role assignment |
108 | | - - serverstatsService.js -> server statistics tracking |
109 | | - - shopService.js -> economy shop management |
110 | | - - ticket.js -> ticket system operations |
111 | | - - utilityService.js -> utility helper functions |
112 | | - - verificationService.js -> member verification |
113 | | - - voiceService.js -> voice channel operations |
114 | | - - warningService.js -> user warning system |
115 | | - - welcomeService.js -> welcome message system |
116 | | - - xpSystem.js -> experience points calculation |
117 | | - |
118 | | -- utils/ -> shared helpers and utilities (20+ utility modules) |
119 | | - - logger.js -> logging system with file rotation |
120 | | - - embeds.js -> standardized embed creation helpers |
121 | | - - components.js -> Discord button/select menu/modal builders |
122 | | - - helpers.js -> general purpose helper functions |
123 | | - - constants.js -> application constants and enums |
124 | | - - errorHandler.js -> custom error handling and error registry |
125 | | - - errorRegistry.js -> error message registry |
126 | | - - permissionGuard.js -> permission checking utilities |
127 | | - - interactionHelper.js -> safe interaction response utilities |
128 | | - - interactionValidator.js -> interaction input validation |
129 | | - - database.js -> database utility functions |
130 | | - - postgresDatabase.js -> PostgreSQL-specific operations |
131 | | - - memoryStorage.js -> in-memory fallback storage |
132 | | - - dateUtils.js -> date/time helper functions |
133 | | - - messageTemplates.js -> message template definitions |
134 | | - - abuseProtection.js -> rate limiting and abuse detection |
135 | | - - commandInputValidation.js -> Zod schema validation |
136 | | - - moderation.js -> moderation utility functions |
137 | | - - economy.js -> economy calculation helpers |
138 | | - - giveaways.js -> giveaway scheduling helpers |
139 | | - - loggingUi.js -> logging dashboard UI builders |
140 | | - - rateLimiter.js -> cooldown and rate limit management |
141 | | - |
142 | | -Database Abstraction Layer |
143 | | -- Supports PostgreSQL (primary) with in-memory fallback for development |
144 | | -- Graceful degradation: if PostgreSQL unavailable, bot switches to in-memory mode |
| 40 | + - interactions.js -> button/select/modal router |
| 41 | + - ticketButtons.js, reactionRoles.js, etc. |
| 42 | + |
| 43 | +- interactions/ -> button, modal, and select menu handlers |
| 44 | +- services/ -> business logic + data operations |
| 45 | +- utils/ -> shared helpers |
| 46 | + - database.js -> facade re-exporting database modules |
| 47 | + - database/wrapper.js -> DatabaseWrapper, get/set helpers |
| 48 | + - database/keys.js -> Redis-style key builders |
| 49 | + - database/tickets.js -> ticket persistence + guild ticket stats |
| 50 | + - panelStatus.js -> shared panel message detection |
| 51 | + - errorHandler.js, logger.js, embeds.js, etc. |
| 52 | + |
| 53 | +Database |
| 54 | +- PostgreSQL (primary) with in-memory fallback for development |
| 55 | +- Graceful degradation when PostgreSQL is unavailable |
145 | 56 |
|
146 | 57 | Notes |
147 | | -- This project is modular by feature area: commands -> handlers -> services -> utils |
| 58 | +- Modular by feature area: commands -> handlers -> services -> utils |
148 | 59 | - bot.js is the single source of truth for embed theming/colors and core bot config |
149 | | -- We might not have everything done as mentioned in the roadmap.txt or some new features which is not mentioned in roadmap.txt |
0 commit comments