151 lines
12 KiB
Markdown
151 lines
12 KiB
Markdown
# Project Checklist
|
|
|
|
## Backend
|
|
- [x] Create backend directory
|
|
- [x] Initialize Node.js project
|
|
- [x] Install backend dependencies
|
|
- [x] Create a basic Express server
|
|
- [x] Set up Discord OAuth2
|
|
- [x] Create API endpoint to get user's servers
|
|
- [x] Store user theme preference on the backend
|
|
- [x] Create API endpoint to make bot leave a server
|
|
- [x] Encrypt user information in `db.json`.
|
|
|
|
## Frontend
|
|
- [x] Create login page
|
|
- [x] Create dashboard page
|
|
- [x] Connect frontend to backend
|
|
- [x] Improve frontend UI with a component library
|
|
- [x] Implement server-specific settings pages
|
|
- [x] Persist user data on the frontend
|
|
- [x] Add logout functionality
|
|
- [x] Add more styling and animations to the UI
|
|
- [x] Remember scroll position
|
|
- [x] Fix issue with fetching server names
|
|
- [x] Implement theme switching (light, dark, Discord grey)
|
|
- [x] Create a user settings menu
|
|
- [x] Set Discord grey as the default theme
|
|
- [x] Refine user settings menu UI
|
|
- [x] Further refine user settings menu UI
|
|
- [x] Add server icons to dashboard cards
|
|
- [x] Ensure responsive and uniform card sizing
|
|
- [x] Fine-tune card sizing
|
|
- [x] Further fine-tune card UI
|
|
- [x] Add Commands section to server settings page
|
|
- [x] Refine 'Back to Dashboard' button
|
|
- [x] Remove 'Open Help Page' button from individual command controls (moved to dedicated Commands List page)
|
|
- [x] Rename Help nav/button to 'Commands List' and update page title
|
|
- [x] Restructure Commands list UI to show per-command toggles and cleaner layout
|
|
- [x] Ensure frontend persists selections and doesn't overwrite other settings
|
|
- [x] Improve NavBar layout and styling for clarity and compactness
|
|
- [x] Implement single-hamburger NavBar (hamburger toggles to X; buttons hidden when collapsed)
|
|
- [x] Commands List button added above Commands accordion in Server Settings
|
|
- [ ] Add server invite management
|
|
- [ ] Add UI to create invites: optional channel dropdown, maxAge dropdown, maxUses dropdown, temporary toggle, create button
|
|
- [ ] Allow invite creation without selecting a channel (use default)
|
|
- [ ] Persist created invites to backend encrypted DB
|
|
- [ ] Add front-end list showing created invites with Copy and Delete actions and metadata (url, createdAt, uses, maxUses, maxAge, temporary)
|
|
- [ ] Add `/create-invite` and `/list-invites` slash commands in the bot; ensure actions sync with backend
|
|
- [ ] Add enable/disable toggles for these commands in Commands list
|
|
- [x] Place 'Invite' button beside the server title on dashboard/server cards
|
|
- Acceptance criteria: the invite button appears horizontally adjacent to the server title (to the right), remains visible and usable on tablet and desktop layouts, is keyboard-focusable, and has an accessible aria-label (e.g. "Invite bot to SERVER_NAME").
|
|
- [x] Show the server name in a rounded "bubble" and render it bold
|
|
- Acceptance criteria: server name is inside a rounded container (padding + border-radius), the text is bold, background provides sufficient contrast, and the bubble adapts to long names (truncation or wrapping) to avoid layout breakage.
|
|
- [x] Update Dashboard component to use bubble title + invite-button layout
|
|
- Acceptance criteria: visual matches design spec above; small-screen fallback stacks invite button under the title or shows a compact icon; no regressions to other card elements.
|
|
- [x] Add pre-invite check to dashboard invite button
|
|
- Acceptance criteria: Clicking invite button checks if bot is already in the server. If so, show a dismissible message (e.g., a snackbar or modal) saying "Bot is already in this server." If not, proceed with the invite.
|
|
- [x] Center invite button on Server Settings page
|
|
- Acceptance criteria: On the server-specific settings page, the "Invite Bot" button (or the "Bot is already in this server" text) should be vertically and horizontally aligned with the main server name title for a cleaner look.
|
|
- [x] Fix incorrect invite link on dashboard cards
|
|
- Acceptance criteria: The invite link generated for the dashboard cards should correctly redirect to the Discord OAuth2 authorization page with the proper client ID, permissions, and scope, matching the functionality of the invite button in the server settings panel.
|
|
- [x] ~~by default hide or gray out bot options in each server dashboard panel if the bot is not in the server. Only allow to edit the features if the bot is in the discord server.~~ (User changed their mind)
|
|
- [x] Allow dashboard cards to be clickable even if the bot is not in the server. Inside the server settings, all commands and categories should be greyed out and not touchable. Only allow the invite button to be clicked within.
|
|
- [x] Add a button to the server cards that allows the user to make the bot leave the server. The button should only be visible if the bot is in the server.
|
|
- [x] In the server settings, replace the text "The bot is already in this server" with a "Leave" button.
|
|
- [x] Add a confirmation dialog to the "Leave" buttons on both the dashboard cards and the server settings page.
|
|
- [x] Redesign the login page to be more bubbly, centered, and eye-catching, with bigger text and responsive design.
|
|
- [x] Make server settings panels collapsible for a cleaner mobile UI.
|
|
|
|
## Recent frontend tweaks
|
|
|
|
- [x] Commands list sorted alphabetically in Server Settings for easier scanning
|
|
- [x] Invite creation form: labels added above dropdowns (Channel, Expiry, Max Uses, Temporary) and layout improved for mobile (stacked inputs)
|
|
- [x] Theme persistence: theme changes now persist immediately (localStorage) and are not overwritten on page navigation; server-side preference is respected when different from local selection
|
|
- [x] Theme preference behavior: UI now prefers an explicit user selection (localStorage) over defaults; default is used only on first visit when no prior selection exists
|
|
|
|
|
|
## Discord Bot
|
|
- [x] Create a basic Discord bot
|
|
- [x] Add a feature with both slash and web commands
|
|
- [x] Implement bot invitation functionality
|
|
- [x] Reorganize bot file structure
|
|
- [x] Implement command handler
|
|
- [x] Implement event handler
|
|
- [x] Set bot status on ready event
|
|
- [x] Automatically register slash commands on server join.
|
|
- [x] On startup, automatically register all slash commands and remove any obsolete commands.
|
|
- [x] Add a mechanism to enable or disable commands from being registered and displayed.
|
|
- [x] In `ready.js`, set the bot's activity to change every 3 seconds with the following streaming activities: "Watch EhChad Live!", "Follow EhChad!", "/help", and "EhChadServices", all pointing to `https://twitch.tv/ehchad`.
|
|
|
|
## Features
|
|
- [x] **Welcome/Leave Messages**
|
|
- [x] Add "Welcome/Leave" section to server settings.
|
|
- [x] **Welcome Messages:**
|
|
- [x] Add toggle to enable/disable welcome messages.
|
|
- [x] Add dropdown to select a channel for welcome messages.
|
|
- [x] Add 3 default welcome message options.
|
|
- [x] Add a custom welcome message option with a text input and apply button.
|
|
- [x] **Leave Messages:**
|
|
- [x] Add toggle to enable/disable leave messages.
|
|
- [x] Add dropdown to select a channel for leave messages.
|
|
- [x] Add 3 default leave message options.
|
|
- [x] Add a custom leave message option with a text input and apply button.
|
|
- [x] **Bot Integration:**
|
|
- [x] Connect frontend settings to the backend.
|
|
- [x] Implement bot logic to send welcome/leave messages based on server settings.
|
|
- [x] Fix: Leave messages now fetch channel reliably, ensure bot has permissions (ViewChannel/SendMessages), and use mention-friendly user formatting. Added debug logging.
|
|
- [x] Fix: Removed verbose console logging of incoming settings and messages in backend and bot (no sensitive or noisy payloads logged).
|
|
- [x] **Slash Command Integration:**
|
|
- [x] ~~Create a `/config-welcome` slash command.~~
|
|
- [x] ~~Add a subcommand to `set-channel` for welcome messages.~~
|
|
- [x] ~~Add a subcommand to `set-message` with options for default and custom messages.~~
|
|
- [x] ~~Add a subcommand to `disable` welcome messages.~~
|
|
- [x] ~~Create a `/config-leave` slash command.~~
|
|
- [x] ~~Add a subcommand to `set-channel` for leave messages.~~
|
|
- [x] ~~Add a subcommand to `set-message` with options for default and custom messages.~~
|
|
- [x] ~~Add a subcommand to `disable` leave messages.~~
|
|
- [x] ~~Create a `/view-config` slash command to display the current welcome and leave channels.~~
|
|
- [x] Refactor `/config-welcome` to `/setup-welcome` with interactive setup for channel and message.
|
|
- [x] Refactor `/config-leave` to `/setup-leave` with interactive setup for channel and message.
|
|
- [x] Rename `/view-config` to `/view-welcome-leave`.
|
|
- [x] Ensure settings updated via slash commands are reflected on the frontend.
|
|
- [x] Ensure settings updated via the frontend are reflected in the bot's behavior.
|
|
- [x] **New:** Interactive setup should prompt for channel, then for message (default or custom, matching frontend options).
|
|
- [x] Persist the selected message option (default or custom) for welcome and leave messages.
|
|
- [x] Added `/view-autorole` slash command to report autorole status and selected role.
|
|
- [x] Added `/manage-commands` admin slash command to list and toggle commands per-server (persists toggles to backend DB).
|
|
- [x] Refactor: `/manage-commands` now renders a single message with toggle buttons reflecting each command's current state and updates in-place.
|
|
- [x] Ensure `/manage-commands` lists all loaded commands (including non-slash/simple commands like `ping`) and will include future commands automatically.
|
|
- [x] Ensure the `/help` command is locked (protected) and cannot be disabled via `/manage-commands`.
|
|
- [x] Add a Help tab in the frontend Server Settings that lists all bot commands and their descriptions per-server.
|
|
- [x] Move Help to a dedicated page within the server dashboard and add a top NavBar (collapsible) with Dashboard, Discord!, Contact, and Help (when on a server) buttons. Ensure Help page has a back arrow to return to the Commands section.
|
|
- [x] Move Help to a dedicated page within the server dashboard and add a top NavBar (collapsible) with Dashboard, Discord!, and Commands List (when on a server) buttons. Ensure Help page has a back arrow to return to the Commands section.
|
|
- [x] Remove Contact page from the frontend and App routes (no longer needed).
|
|
- [x] Redesign NavBar for cleaner layout and prettier appearance.
|
|
- [x] Redesign NavBar for cleaner layout and prettier appearance. (Title updated to 'ECS - EHDCHADSWORTH')
|
|
- [x] Added `/help` slash command that lists commands and their descriptions and shows per-server enable/disable status.
|
|
- [x] **Autorole**
|
|
- [x] Add "Autorole" section to server settings.
|
|
- [x] **Backend:**
|
|
- [x] Create API endpoint to get/set autorole settings.
|
|
- [x] Create API endpoint to fetch server roles.
|
|
- [x] **Bot Integration:**
|
|
- [x] Create a `/setup-autorole` slash command to enable/disable and select a role.
|
|
- [x] Update `guildMemberAdd` event to assign the selected role on join.
|
|
- [x] **Frontend:**
|
|
- [x] Add toggle to enable/disable autorole.
|
|
- [x] Add dropdown to select a role for autorole.
|
|
- [x] Ensure settings updated via slash commands are reflected on the frontend.
|
|
- [x] Ensure settings updated via the frontend are reflected in the bot's behavior.
|
|
- [x] Fix: Autorole dropdown excludes @everyone and shows only roles the bot can manage. Assignment is validated at join. |