Implements comprehensive user management interface for admin panel:
- Search and filter users by username, class, and active status
- Sort by username, level, balance, or XP with pagination
- View and edit user details (balance, XP, level, class, daily streak, active status)
- Manage user inventories (add/remove items with quantities)
- Debounced search input (300ms delay)
- Responsive design (mobile full-screen, desktop slide-in panel)
- Draft state management with unsaved changes tracking
- Keyboard shortcuts (Escape to close detail panel)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements the full admin settings page covering all game settings
(leveling, economy, inventory, lootdrops, trivia, moderation, commands)
and guild settings (roles, channels, welcome message, moderation,
feature overrides). Includes role/channel pickers, trivia category
multi-select, and a feature override flag editor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace placeholder panel with a full dashboard landing page showing
bot stats, leaderboards, and recent events from /api/stats. Add
sidebar navigation with placeholder pages for Users, Items, Classes,
Quests, Lootdrops, Moderation, Transactions, and Settings. Update
theme to match Aurora design guidelines.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The web/ folder contains the REST API, WebSocket server, and OAuth
routes — not a web frontend. Renaming to api/ clarifies this distinction
since the actual web frontend lives in panel/.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a React admin panel (panel/) with Discord OAuth2 login,
live dashboard via WebSocket, and settings/management pages.
Includes Docker build support, Vite proxy config for dev,
game_settings migration, and open-redirect protection on auth callback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The backups directory may have been created by Docker/root, making it
unwritable by the deploy user. The script now detects this and attempts
to fix permissions automatically (chmod, then sudo chown as fallback).
Also added shared/db/backups to .gitignore.
The raw 'source .env' pattern breaks when values contain special bash
characters like ) in passwords or database URLs. This caused deploy:remote
to fail with 'syntax error near unexpected token )'.
Changes:
- Created shared/scripts/lib/load-env.sh: reads .env line-by-line with
export instead of source, safely handling special characters
- Updated db-backup.sh, db-restore.sh, deploy-remote.sh, remote.sh to
use the shared loader
- Reordered deploy-remote.sh: git pull now runs first (step 1) so the
remote always has the latest scripts before running backup (step 2)
- Convert ModerationService class to moderationService singleton
- Convert PruneService class to pruneService singleton
- Update all command files to use new singleton imports
- Update web routes to use new singleton imports
- Update tests for singleton pattern
- Remove getNextCaseId from tests (now private module function)
- Move instance properties to module-level state (channelActivity, channelCooldowns)
- Convert constructor cleanup interval to module-level initialization
- Export state variables for testing
- Update tests to use direct state access instead of (service as any)
- Maintains same behavior while following project service pattern
Closes#4
Tickets: #2, #3
- Remove duplicate type definitions from shared/lib/config.ts
- Import types from schema files (game-settings.ts, guild-settings.ts)
- Add GuildConfig interface to guild-settings.ts schema
- Rename ModerationConfig to ModerationCaseConfig in moderation.service.ts
- Delete shared/config/config.json and shared/scripts/migrate-config-to-db.ts
- Update settings API to use gameSettingsService exclusively
- Return DB format (strings) from API instead of runtime BigInts
- Fix moderation service tests to pass config as parameter
Breaking Changes:
- Removes legacy file-based configuration system
- API now returns database format with string values for BigInt fields
- Update all commands and events to fetch guild config once per execution
- Pass config to service methods that need it (ModerationService.issueWarning)
- Update terminal service to use guildSettingsService for persistence
- Remove direct imports of config for guild-specific settings
This consolidates configuration to database-backed guild settings,
eliminating the dual config system.
Add function to fetch guild-specific config from database with:
- 60-second cache TTL
- Fallback to file-based config for migration period
- Cache invalidation helper
Implement service for managing per-guild configuration with methods for
getting, upserting, updating, and deleting settings. Includes helpers
for color role management.
Store guild-specific settings (roles, channels, moderation options) in
database instead of config file, enabling per-guild configuration and
runtime updates without redeployment.
Add comprehensive feature flag management with subcommands:
- list: Show all feature flags
- create/delete: Manage flags
- enable/disable: Toggle flags
- grant/revoke: Manage access for users/roles/guilds
- access: View access records for a flag
- Add beta and featureFlag properties to Command interface
- Add beta access check in CommandHandler before command execution
- Show beta feature message to non-whitelisted users
Implement service for managing feature flags and access control with
methods for checking access, creating/enabling flags, and managing
whitelisted users/guilds/roles.
- AGENTS.md: Update project description from web dashboard to REST API
- README.md: Replace Web Dashboard section with REST API, update tech stack
- docs/main.md: Refactor Web Dashboard section to REST API documentation
- web/README.md: Rewrite from React setup to API endpoint documentation
All React/UI references removed - web is now API-only
- Remove 31 unused packages: React, Tailwind, Radix UI, etc.
- Clean up web/tsconfig.json (remove JSX, DOM lib)
- Remove old web/dist/ build artifacts
Web dashboard is now API-only, no UI dependencies needed
Update references to removed web/package.json:
- CI workflow: Remove 'cd web && bun install' step
- AGENTS.md: Remove web-specific dev commands (cd web && bun run dev/build)
- AGENTS.md: Update schema location to reflect domain module split
- Add Docker commands as recommended local dev approach
All dependencies now installed from root package.json.
Remove web/package.json and web/bun.lock now that all dependencies
are consolidated in root package.json. The web/node_modules directory
will be cleaned up separately (permission restrictions).
Web dashboard now uses dependencies from root node_modules.