·
16 commits
to production
since this release
Added
- GitHub Token Management: Move GitHub personal access token from environment variables to secure database storage
- GitHub token section in admin settings with show/hide toggle
- Token is hidden with asterisks and cannot be viewed once set
- Warning alert about token protection and immutability
- Fallback to
GITHUB_TOKENenvironment variable for backward compatibility
- SystemSettings Database Table: Extended Prisma model for storing system-wide configuration including credentials and notification settings
- Admin Settings API: Complete GET/POST endpoints for retrieving and updating all system settings with database fallback support
- Pterodactyl Configuration Management: Editable Pterodactyl URL, API Key, and API endpoint in admin settings panel
- Crowdin Integration Settings: Project ID and Personal Token configuration for translation management
- Email Notifications System: Resend API integration with database-backed credential storage
- Conditional API key input that appears only when email notifications are enabled
- Helper functions for common notification templates
- Discord Webhook Management: Support for multiple Discord webhooks with add/remove functionality
- Manage webhook names and URLs directly from admin panel
- Conditional section that displays only when Discord notifications are enabled
- Separate webhook entries with individual delete buttons
- Notification Library: Comprehensive notifications module (
packages/core/lib/notifications.ts)sendEmailNotification()- Send emails via Resend APIsendDiscordNotification()- Send to configured Discord webhooks with embed supportsendNotification()- Combined email and Discord notification sender- Helper functions for common notification types (server status, sync updates, maintenance, user registration)
- Maintenance Mode Page: Beautiful
/maintenancepage with animated UI for when site is under maintenance- Accessible by all users; admins can bypass maintenance mode
- Contact support button with styling
- Sync Service Database Credentials: Updated sync library to fetch Pterodactyl credentials from database
- Fallback to environment variables for backward compatibility
- Respects
syncIntervalsetting from database
- Middleware Authentication & Access Control:
- Maintenance mode: Redirects all non-admin users to
/maintenancewhen enabled - Registration disabled: Prevents access to
/auth/registerwhen registration is disabled - All checks performed via database settings with proper fallback
- Maintenance mode: Redirects all non-admin users to
- System Features Toggle: Enable/disable registration, maintenance mode, and auto-sync from database
- Notification Settings: Database-backed email and Discord webhook notification configuration with credential storage
- Advanced Settings: Cache timeout and sync interval configuration with persistent database storage
- Admin Users Table Responsive Design: Mobile-optimized table layout with email displayed under username on small screens
- Connection Testing: Updated test endpoint to use database credentials with validation before sending requests
- Webhook Dispatcher Service: Comprehensive Discord webhook notification system (
packages/core/dispatchers/webhooks.ts)- Event-specific dispatch functions:
dispatchSettingsUpdate(),dispatchServerStateChange(),dispatchSyncCompletion(),dispatchSystemAlert(),dispatchSupportTicket(),dispatchNodeAlert(),dispatchBillingEvent() - Non-blocking asynchronous webhook delivery with parallel execution
- Type-safe webhook routing by event type (GAME_SERVER, VPS, SYSTEM, BILLING, SECURITY, SUPPORT, CUSTOM)
- Webhook delivery tracking with
testSuccessAttimestamp updates - Rich Discord embeds with color-coding by event type
- Automatic webhook selection based on event type and scope (ADMIN, USER, PUBLIC)
- Per-webhook error reporting and detailed delivery statistics
- Event-specific dispatch functions:
- Webhook Integration: Automatic webhook triggers for system events
- Settings updates automatically send SYSTEM webhooks with changed field names
- Sync operations automatically send SYSTEM webhooks with sync summary and duration
- Admin panel webhook management with test functionality
- Webhook creation, editing, deletion via REST API (
/api/admin/settings/webhooks)
- Webhook Documentation: Complete guides and examples (
docs/folder)WEBHOOK_DISPATCHER_README.md- Architecture and feature overviewWEBHOOK_INTEGRATION_GUIDE.md- Integration examples for all event typesWEBHOOK_QUICK_REFERENCE.ts- Copy-paste code samples
- Incremental Sync Progress Logging: Sync functions now emit progress updates to database during operation
- Real-time item counts:
itemsTotal,itemsSynced,itemsFailedupdated after each batch - Last message updates in
metadata.lastMessagefor live progress display - Implemented for locations, nodes, allocations, nests/eggs, servers, and database syncs
- Real-time item counts:
- Allocation Sync Batching: Prevent long blocking operations by batching allocation processing
- Configurable batch size via
SYNC_ALLOCATION_BATCH_SIZEenv variable (default: 100) - Progress updates after each batch for real-time feedback
- Significantly improves sync responsiveness for large node allocations
- Configurable batch size via
- Sync Cancellation Support: Allow admins to cancel running sync operations
- Sync functions check
metadata.cancelRequestedflag and abort gracefully - New
/api/admin/sync/cancelendpoint sets cancellation flag on running sync log - Cancelled syncs marked as FAILED with "Cancelled by user" message
- Sync functions check
- Sync Logs Endpoint: New
/api/admin/sync/logsAPI endpoint for fetching sync audit history- Cursor-based pagination support for efficient browsing of large log histories
- Returns
nextCursorfor client-side pagination - Configurable limit parameter (max 100 entries)
- Admin-only access with authentication check
- Auto-Sync Scheduler: Background scheduler for automatic periodic sync operations
- Reads
auto_sync_enabledandsync_intervalfrom system config - Idempotent scheduler prevents duplicate runs if already executing
- Configurable via admin UI without code changes
- Scheduler started automatically on server render in
app/layout.tsx
- Reads
- Sync Logs Admin Page: New dedicated admin page at
/admin/sync/logsfor sync operation audit- Displays recent sync runs with status badges (Running, Completed, Failed, Pending)
- Real-time scheduler status indicator with last run timestamp
- Full-text search across sync messages and operation types
- Configurable result limit (1-100 entries per page)
- Cursor-based pagination with "Load More" button
- Mobile-responsive card-based layout
- Sync Logs Pagination: Server-side cursor-based pagination for sync logs endpoint
- Efficient pagination using cursor (lastId) approach
- Next cursor included in response for seamless client-side browsing
- Prevents N+1 queries and improves performance with large datasets
- Scheduler Settings API: New
/api/admin/sync/settingsendpoint for managing auto-sync configuration- GET endpoint returns current
auto_sync_enabledandsync_intervalsettings - POST endpoint allows updating scheduler configuration with validation
- Admin-only access with system admin role check
- GET endpoint returns current
- Scheduler Controls in Admin UI: Admin users can now configure auto-sync directly from Sync Logs page
- Toggle switch for enabling/disabling automatic sync
- Numeric input for configuring sync interval in seconds
- Save button to persist configuration to database
- Loading states and error handling with toast notifications
- Sync Logs Sidebar Navigation: Added "Sync Logs" link to admin panel navigation
- Appears as separate menu item from main Sync page
- Accessible to all admin users
- Sync Logs Translation Keys: Complete internationalization for Sync Logs page
- Added
admin.syncLogstranslation section with all UI strings - Includes status labels, button text, field labels, and descriptions
- Supports multiple languages via translation system
- Added
- Servers Admin Panel Schema Fix: Updated servers API and UI to use Prisma schema correctly
- Changed from non-existent direct fields (memory, disk, cpu) to ServerProperty key-value pairs
- Servers API now fetches properties array instead of individual fields
- Server page displays resource info by extracting values from properties
- Graceful handling of missing properties (shows nothing if not available)
Changed
- GitHub Release API: Updated to fetch GitHub token from database first, then fallback to environment variable
- Admin Users Table: Restructured table with fixed layout to prevent content overflow on mobile
- Admin Users Status Badges: Full badge text now displays on mobile with vertical stacking when multiple badges present
- Admin Settings Page: Completely redesigned with four tabs (Connections, Features, Notifications, Advanced)
- Pterodactyl section now includes editable URL and API fields with external link button
- New Crowdin section for translation management configuration
- New GitHub section for token management with security warnings
- Features tab with all toggles (Registration, Maintenance Mode, Auto-sync)
- Notifications tab with conditional email and Discord sections with proper styling
- Advanced tab with cache timeout and sync interval selectors
- Pterodactyl Sync Service: Now reads credentials from database first, then falls back to environment variables
- API Route Authentication: Settings test endpoint changed from GET to POST to support credential testing with user-provided values
- Settings Persistence: All configuration now properly persists to database across page reloads
- Translation File Structure: Reorganized monolithic
templates/en.jsoninto modular files for better maintainability- Split into 5 focused modules:
common.json,home.json,pages.json,auth.json,admin.json - Translation loader merges all modular files at runtime
- Crowdin configuration updated to sync from
templates/en/*.jsonpattern - GitHub workflow updated to monitor modular files instead of single file
- No breaking changes - all translation keys available exactly as before
- Split into 5 focused modules:
- Sync Logs Page UI: Redesigned for consistency with other admin pages and improved mobile responsiveness
- Header with title and Refresh button stacks vertically on mobile
- Scheduler status section moved to dedicated Settings card
- Better form control styling with Switch component for toggles
- Mobile-optimized search and filter fields with proper spacing
- Scroll area with divide separators for log list
- Status badges now include animated icons (spinner, checkmark, X)
- Log entry layout is flexible for mobile (stacks) and desktop (side-by-side)
- Egg Property Upsert: Fixed to properly handle composite unique key
[eggId, key, panelType]- Replaced invalid composite upsert with findFirst/update/create pattern
- Properly handles nullable panelType field in searches and filters
- Prevents Prisma validation errors on sync
- Server User Lookup: Fixed to use
findFirstinstead offindUniqueforpterodactylIdfieldpterodactylIdis not unique on User model, changed to proper first-match pattern- Prevents Prisma validation errors when syncing server owners
Fixed
- Admin Users Table Mobile Overflow: Fixed table content breaking off-screen on mobile devices
- Admin Users Email Display: Email now shown under username on mobile instead of separate column
- User menu now properly detects admin users on mobile
- Settings Credentials: Passwords and API keys no longer accidentally logged or exposed in responses
- GitHub Token Security: GitHub token now stored in database instead of .env file, no longer visible in git history
- Incorrect footer links: The
About NodeBytesection was incorrectly linking to/changeloginstead of/about - Egg Property Upsert Validation Error: Fixed Prisma validation error when upserting egg properties (was using non-existent
eggId_keyunique) - Server Owner Lookup Validation Error: Fixed Prisma validation error when looking up servers by pterodactylId (field is not unique)
- Servers Admin Panel Display: Fixed servers table to properly display resource data from database schema
Security
- GitHub Token Protection: Token is encrypted-ready in database and cannot be viewed once set (hidden with asterisks)
- Credential Encryption Ready: Database structure prepared for future encryption of sensitive fields (API keys, tokens)
- Admin-Only Access: All settings management restricted to authenticated admin users via middleware
- Environment Variable Fallback: System gracefully handles missing database settings by falling back to environment variables
- Token Immutability: Warning displayed to admins that GitHub token cannot be changed after initial setup without manual database intervention
- Webhook URL Validation: Discord webhook URLs validated before storage to prevent invalid configurations
- Webhook Scope Control: Webhooks can be scoped to ADMIN/USER/PUBLIC to control event distribution
- Webhook Delivery Tracking: Successful webhook deliveries logged with timestamp for audit trail
- Webhook Error Isolation: Individual webhook failures don't impact other webhooks or main application
- Sync Cancellation Security: Cancel endpoint restricted to admin users with proper authentication checks
- User Role Management: Only system admins can modify user roles via new role management endpoint
- Safety check prevents self-demotion of system admin status
- Role updates require authentication and authorization verification
Removed
- Dockerfile: was using it to force docker to pull the latest version of our translations, but the
nixpacks.tomlnow does this instead