# Project Checklist (tidy & current) Below are implemented features and pending items, grouped by area. ## Backend - [x] Express API: OAuth, server settings, channel/role endpoints, leave - [x] Invite endpoints (GET/POST/DELETE) and invite-token issuance - [x] Per-command toggles persistence and management - [x] Config endpoints for welcome/leave and autorole ## Frontend - [x] Login, Dashboard, Server Settings pages - Login redirects to Dashboard after OAuth and user/guilds are persisted in localStorage - Dashboard is protected: user must be logged in to view (redirects to login otherwise) - [x] MUI components, responsive layout, mobile fixes - [x] Theme switching (persist local) and user settings UI - [x] Invite UI: create form, list, copy, delete with confirmation - [x] Commands UI (per-command toggles) - [x] Live Notifications UI (per-server toggle & config) - Live Notifications accessible from server page via dropdown and dialog - Dashboard: channel dropdown and watched-user list added ## Discord Bot - [x] discord.js integration (events and commands) - [x] Slash commands: `/create-invite`, `/list-invites`, `/manage-commands`, `/help` - [x] Bot used by backend to fetch live guild data and manage invites - [x] Bot reads/writes per-guild command toggles via backend/Postgres - [x] Backend immediately notifies bot of toggle changes (pushes updated settings to bot cache) so frontend toggles take effect instantly - [x] New slash command: `/list-twitchusers` to list watched Twitch usernames for a guild - [x] Frontend: Confirm dialog and working Delete action for Twitch watched users in Live Notifications - [x] Live Notifications: bot posts message to configured channel with stream title and link when a watched Twitch user goes live - [x] Live Notifications: bot posts rich embed to channel when a watched Twitch user goes live (thumbnail, clickable title, bio/description, category/game, viewers, footer with "ehchadservices" and start datetime) - [x] Live Notifications polling frequency set to 3 seconds for rapid detection (configurable via `TWITCH_POLL_INTERVAL_MS`) - [x] Frontend: show "Watch Live" button next to watched user when they are live (links to Twitch) ## Database - [x] Postgres support via `DATABASE_URL` (backend auto-creates `servers`, `invites`, `users`) - [x] Legacy encrypted `backend/db.json` retained (migration planned) - [ ] Migration script: import `backend/db.json` into Postgres (planned) - [x] Schema: live notification settings stored in server settings (via `liveNotifications` JSON) ## Security & Behavior - [x] Invite DELETE requires short-lived HMAC token (`x-invite-token`) - [x] Frontend confirmation dialog for invite deletion - [ ] Harden invite-token issuance (require OAuth + admin check) ## Docs & Deployment - [x] README and CHANGELOG updated with setup steps and Postgres guidance - Core env vars: `DATABASE_URL`, `DISCORD_CLIENT_ID`, `DISCORD_CLIENT_SECRET`, `DISCORD_BOT_TOKEN`, `INVITE_TOKEN_SECRET`, `ENCRYPTION_KEY`, `HOST`, `PORT`, `CORS_ORIGIN` - Frontend: set `REACT_APP_API_BASE` to backend URL before build - Tailscale: bind backend to your tailnet IP (100.x.y.z) and set `DATABASE_URL` to a Postgres reachable over the tailnet Notes: - `backend/.env.example` and `frontend/.env.example` are templates — copy to `.env` and fill values. - Postgres / pgAdmin: create DB & user, set `DATABASE_URL`; backend auto-creates tables on startup. UI tweaks applied: - Server cards: uniform sizes, image cropping, name clamping - Mobile spacing and typography adjustments - Dashboard action buttons repositioned (Invite/Leave under title) - [x] Browser tab now shows `ECS - ` (e.g., 'ECS - Dashboard') - [x] Dashboard duplicate title fixed; user settings (avatar/themes) restored via NavBar - [x] Maintenance page - Frontend displays a maintenance page with a loading indicator when the backend is offline; it polls the backend and reloads UI immediately when the backend is available. - [x] Global backend health & SSE - [x] Added `BackendContext` to centralize health polling and a single shared EventSource - [x] Pages (including `ServerSettings`) use the shared event bus for live updates so the whole site receives changes in real-time - [ ] Frontend file re-organization - [ ] Verify guild-scoped SSE payloads include guildId and frontend filters events by guild (in-progress) - [ ] Add debug SSE publish endpoint to help validate real-time flows (done, guarded by DEBUG_SSE) - [x] Created `frontend/src/lib/api.js` and refactored some modules to use it - [x] Created `frontend/src/components/common` and `frontend/src/components/server` - [x] Moved `ConfirmDialog` and `MaintenancePage` to `components/common` - [x] Moved `ServerSettings` and `HelpPage` to `components/server` - [ ] Remove legacy top-level duplicate files (archival recommended)