2025-10-08 14:23:07 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Core\Application;
|
|
|
|
|
use Core\Auth;
|
|
|
|
|
use App\Controllers\DashboardController;
|
|
|
|
|
use App\Controllers\DomainController;
|
|
|
|
|
use App\Controllers\NotificationGroupController;
|
|
|
|
|
use App\Controllers\AuthController;
|
|
|
|
|
use App\Controllers\DebugController;
|
|
|
|
|
use App\Controllers\SearchController;
|
|
|
|
|
use App\Controllers\TldRegistryController;
|
2025-10-08 18:54:34 +03:00
|
|
|
use App\Controllers\SettingsController;
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
use App\Controllers\ProfileController;
|
|
|
|
|
use App\Controllers\UserController;
|
|
|
|
|
use App\Controllers\InstallerController;
|
|
|
|
|
use App\Controllers\NotificationController;
|
2025-10-10 14:01:19 +03:00
|
|
|
use App\Controllers\ErrorLogController;
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
use App\Controllers\TwoFactorController;
|
2025-10-25 02:04:00 +03:00
|
|
|
use App\Controllers\TagController;
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
$router = Application::$router;
|
|
|
|
|
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
// Installer routes (public - before auth)
|
|
|
|
|
$router->get('/install', [InstallerController::class, 'index']);
|
|
|
|
|
$router->get('/install/check-database', [InstallerController::class, 'checkDatabase']);
|
|
|
|
|
$router->post('/install/run', [InstallerController::class, 'install']);
|
|
|
|
|
$router->get('/install/complete', [InstallerController::class, 'complete']);
|
|
|
|
|
$router->get('/install/update', [InstallerController::class, 'showUpdate']);
|
|
|
|
|
$router->post('/install/update', [InstallerController::class, 'runUpdate']);
|
|
|
|
|
|
2025-10-08 14:23:07 +03:00
|
|
|
// Authentication routes (public)
|
|
|
|
|
$router->get('/login', [AuthController::class, 'showLogin']);
|
|
|
|
|
$router->post('/login', [AuthController::class, 'login']);
|
|
|
|
|
$router->get('/logout', [AuthController::class, 'logout']);
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
$router->get('/register', [AuthController::class, 'showRegister']);
|
|
|
|
|
$router->post('/register', [AuthController::class, 'register']);
|
|
|
|
|
$router->get('/verify-email', [AuthController::class, 'showVerifyEmail']);
|
|
|
|
|
$router->get('/resend-verification', [AuthController::class, 'resendVerification']);
|
|
|
|
|
$router->get('/forgot-password', [AuthController::class, 'showForgotPassword']);
|
|
|
|
|
$router->post('/forgot-password', [AuthController::class, 'forgotPassword']);
|
|
|
|
|
$router->get('/reset-password', [AuthController::class, 'showResetPassword']);
|
|
|
|
|
$router->post('/reset-password', [AuthController::class, 'resetPassword']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
// Two-Factor Authentication routes (public during verification)
|
|
|
|
|
$router->get('/2fa/verify', [TwoFactorController::class, 'showVerify']);
|
|
|
|
|
$router->post('/2fa/verify', [TwoFactorController::class, 'verify']);
|
|
|
|
|
$router->post('/2fa/send-email-code', [TwoFactorController::class, 'sendEmailCode']);
|
|
|
|
|
|
2025-10-08 14:23:07 +03:00
|
|
|
// Debug route (public - remove in production!)
|
|
|
|
|
$router->get('/debug/whois', [DebugController::class, 'whois']);
|
|
|
|
|
|
|
|
|
|
// Protected routes - require authentication
|
|
|
|
|
Auth::require();
|
|
|
|
|
|
|
|
|
|
// Dashboard
|
|
|
|
|
$router->get('/', [DashboardController::class, 'index']);
|
|
|
|
|
$router->get('/dashboard', [DashboardController::class, 'index']);
|
|
|
|
|
|
|
|
|
|
// Search
|
|
|
|
|
$router->get('/search', [SearchController::class, 'index']);
|
|
|
|
|
$router->get('/api/search/suggest', [SearchController::class, 'suggest']);
|
|
|
|
|
|
|
|
|
|
// Domains
|
|
|
|
|
$router->get('/domains', [DomainController::class, 'index']);
|
|
|
|
|
$router->get('/domains/create', [DomainController::class, 'create']);
|
|
|
|
|
$router->get('/domains/bulk-add', [DomainController::class, 'bulkAdd']);
|
|
|
|
|
$router->post('/domains/bulk-add', [DomainController::class, 'bulkAdd']);
|
|
|
|
|
$router->post('/domains/bulk-refresh', [DomainController::class, 'bulkRefresh']);
|
|
|
|
|
$router->post('/domains/bulk-delete', [DomainController::class, 'bulkDelete']);
|
|
|
|
|
$router->post('/domains/bulk-assign-group', [DomainController::class, 'bulkAssignGroup']);
|
|
|
|
|
$router->post('/domains/bulk-toggle-status', [DomainController::class, 'bulkToggleStatus']);
|
2025-10-12 12:46:16 +03:00
|
|
|
$router->post('/domains/bulk-add-tags', [DomainController::class, 'bulkAddTags']);
|
|
|
|
|
$router->post('/domains/bulk-remove-tags', [DomainController::class, 'bulkRemoveTags']);
|
2025-10-25 02:04:00 +03:00
|
|
|
$router->post('/domains/bulk-remove-specific-tag', [DomainController::class, 'bulkRemoveSpecificTag']);
|
|
|
|
|
$router->post('/domains/bulk-assign-existing-tag', [DomainController::class, 'bulkAssignExistingTag']);
|
|
|
|
|
$router->post('/domains/get-tags-for-domains', [DomainController::class, 'getTagsForDomains']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/domains/transfer', [DomainController::class, 'transfer']);
|
|
|
|
|
$router->post('/domains/bulk-transfer', [DomainController::class, 'bulkTransfer']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->post('/domains/store', [DomainController::class, 'store']);
|
|
|
|
|
$router->get('/domains/{id}', [DomainController::class, 'show']);
|
|
|
|
|
$router->get('/domains/{id}/edit', [DomainController::class, 'edit']);
|
|
|
|
|
$router->post('/domains/{id}/update', [DomainController::class, 'update']);
|
2025-10-08 20:56:25 +03:00
|
|
|
$router->post('/domains/{id}/update-notes', [DomainController::class, 'updateNotes']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->post('/domains/{id}/refresh', [DomainController::class, 'refresh']);
|
|
|
|
|
$router->post('/domains/{id}/delete', [DomainController::class, 'delete']);
|
|
|
|
|
|
|
|
|
|
// Notification Groups
|
|
|
|
|
$router->get('/groups', [NotificationGroupController::class, 'index']);
|
|
|
|
|
$router->get('/groups/create', [NotificationGroupController::class, 'create']);
|
|
|
|
|
$router->post('/groups/store', [NotificationGroupController::class, 'store']);
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->get('/groups/{id}/edit', [NotificationGroupController::class, 'edit']);
|
|
|
|
|
$router->post('/groups/{id}/update', [NotificationGroupController::class, 'update']);
|
|
|
|
|
$router->post('/groups/{id}/delete', [NotificationGroupController::class, 'delete']);
|
2025-10-10 14:01:19 +03:00
|
|
|
$router->post('/groups/bulk-delete', [NotificationGroupController::class, 'bulkDelete']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/groups/transfer', [NotificationGroupController::class, 'transfer']);
|
|
|
|
|
$router->post('/groups/bulk-transfer', [NotificationGroupController::class, 'bulkTransfer']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
// Notification Channels
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->post('/groups/{group_id}/channels', [NotificationGroupController::class, 'addChannel']);
|
|
|
|
|
$router->post('/groups/{group_id}/channels/{id}/delete', [NotificationGroupController::class, 'deleteChannel']);
|
|
|
|
|
$router->post('/groups/{group_id}/channels/{id}/toggle', [NotificationGroupController::class, 'toggleChannel']);
|
2025-10-13 16:35:28 +03:00
|
|
|
$router->post('/channels/test', [NotificationGroupController::class, 'testChannel']);
|
2025-10-08 14:23:07 +03:00
|
|
|
|
|
|
|
|
// TLD Registry
|
|
|
|
|
$router->get('/tld-registry', [TldRegistryController::class, 'index']);
|
|
|
|
|
$router->get('/tld-registry/{id}', [TldRegistryController::class, 'show']);
|
|
|
|
|
$router->post('/tld-registry/import-tld-list', [TldRegistryController::class, 'importTldList']);
|
|
|
|
|
$router->post('/tld-registry/import-rdap', [TldRegistryController::class, 'importRdap']);
|
|
|
|
|
$router->post('/tld-registry/import-whois', [TldRegistryController::class, 'importWhois']);
|
|
|
|
|
$router->post('/tld-registry/start-progressive-import', [TldRegistryController::class, 'startProgressiveImport']);
|
|
|
|
|
$router->get('/tld-registry/import-progress/{log_id}', [TldRegistryController::class, 'importProgress']);
|
|
|
|
|
$router->get('/tld-registry/api/import-progress', [TldRegistryController::class, 'apiGetImportProgress']);
|
|
|
|
|
$router->post('/tld-registry/bulk-delete', [TldRegistryController::class, 'bulkDelete']);
|
|
|
|
|
$router->get('/tld-registry/check-updates', [TldRegistryController::class, 'checkUpdates']);
|
|
|
|
|
$router->get('/tld-registry/{id}/toggle-active', [TldRegistryController::class, 'toggleActive']);
|
|
|
|
|
$router->get('/tld-registry/{id}/refresh', [TldRegistryController::class, 'refresh']);
|
2025-11-21 14:49:41 +02:00
|
|
|
$router->post('/tld-registry/{id}/update-whois-server', [TldRegistryController::class, 'updateWhoisServer']);
|
2026-01-08 14:23:40 +02:00
|
|
|
$router->post('/tld-registry/{id}/update-rdap-servers', [TldRegistryController::class, 'updateRdapServers']);
|
2025-10-08 14:23:07 +03:00
|
|
|
$router->get('/tld-registry/import-logs', [TldRegistryController::class, 'importLogs']);
|
|
|
|
|
$router->get('/api/tld-info', [TldRegistryController::class, 'apiGetTldInfo']);
|
|
|
|
|
|
2025-10-08 18:54:34 +03:00
|
|
|
// Settings
|
|
|
|
|
$router->get('/settings', [SettingsController::class, 'index']);
|
|
|
|
|
$router->post('/settings/update', [SettingsController::class, 'update']);
|
|
|
|
|
$router->post('/settings/update-app', [SettingsController::class, 'updateApp']);
|
|
|
|
|
$router->post('/settings/update-email', [SettingsController::class, 'updateEmail']);
|
Add CSRF, CAPTCHA, and input validation improvements
Introduces CSRF protection to all sensitive controller actions, integrates configurable CAPTCHA (reCAPTCHA v2/v3, Turnstile) for authentication and registration flows, and centralizes input validation via a new InputValidator helper. Adds new helpers and services for CSRF and CAPTCHA, updates settings and migration for CAPTCHA configuration, and enhances logging and error handling in TLD registry import processes. Also improves validation for user, domain, group, and profile inputs throughout the application.
2025-10-10 00:04:12 +03:00
|
|
|
$router->post('/settings/update-captcha', [SettingsController::class, 'updateCaptcha']);
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
$router->post('/settings/update-two-factor', [SettingsController::class, 'updateTwoFactor']);
|
2025-10-08 18:54:34 +03:00
|
|
|
$router->post('/settings/test-email', [SettingsController::class, 'testEmail']);
|
|
|
|
|
$router->post('/settings/test-cron', [SettingsController::class, 'testCron']);
|
|
|
|
|
$router->post('/settings/clear-logs', [SettingsController::class, 'clearLogs']);
|
2025-10-20 17:04:13 +03:00
|
|
|
$router->post('/settings/toggle-isolation', [SettingsController::class, 'toggleIsolationMode']);
|
2025-10-08 18:54:34 +03:00
|
|
|
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
// Profile
|
|
|
|
|
$router->get('/profile', [ProfileController::class, 'index']);
|
|
|
|
|
$router->post('/profile/update', [ProfileController::class, 'update']);
|
|
|
|
|
$router->post('/profile/change-password', [ProfileController::class, 'changePassword']);
|
|
|
|
|
$router->get('/profile/delete', [ProfileController::class, 'delete']);
|
|
|
|
|
$router->get('/profile/resend-verification', [ProfileController::class, 'resendVerification']);
|
|
|
|
|
$router->post('/profile/logout-other-sessions', [ProfileController::class, 'logoutOtherSessions']);
|
|
|
|
|
$router->post('/profile/logout-session/{sessionId}', [ProfileController::class, 'logoutSession']);
|
2025-10-27 18:13:38 +02:00
|
|
|
$router->post('/profile/upload-avatar', [ProfileController::class, 'uploadAvatar']);
|
|
|
|
|
$router->post('/profile/delete-avatar', [ProfileController::class, 'deleteAvatar']);
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
|
Add two-factor authentication (2FA) support
Introduces two-factor authentication (2FA) with TOTP, backup codes, and email codes. Adds controllers, services, views, and migration for 2FA setup, verification, and management. Updates user and settings models, email helper, and relevant controllers to support 2FA policy enforcement, configuration, and user flows. Enhances security by allowing admins to require or disable 2FA, and provides backup code generation and management for account recovery.
2025-10-16 17:25:06 +03:00
|
|
|
// Two-Factor Authentication management (protected)
|
|
|
|
|
$router->get('/2fa/setup', [TwoFactorController::class, 'setup']);
|
|
|
|
|
$router->post('/2fa/verify-setup', [TwoFactorController::class, 'verifySetup']);
|
|
|
|
|
$router->get('/2fa/cancel-setup', [TwoFactorController::class, 'cancelSetup']);
|
|
|
|
|
$router->get('/2fa/backup-codes', [TwoFactorController::class, 'backupCodes']);
|
|
|
|
|
$router->post('/2fa/disable', [TwoFactorController::class, 'disable']);
|
|
|
|
|
$router->post('/2fa/regenerate-backup-codes', [TwoFactorController::class, 'regenerateBackupCodes']);
|
|
|
|
|
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
// Notifications
|
|
|
|
|
$router->get('/notifications', [NotificationController::class, 'index']);
|
|
|
|
|
$router->get('/notifications/{id}/mark-read', [NotificationController::class, 'markAsRead']);
|
|
|
|
|
$router->get('/notifications/mark-all-read', [NotificationController::class, 'markAllAsRead']);
|
|
|
|
|
$router->get('/notifications/{id}/delete', [NotificationController::class, 'delete']);
|
|
|
|
|
$router->get('/notifications/clear-all', [NotificationController::class, 'clearAll']);
|
|
|
|
|
$router->get('/api/notifications/unread-count', [NotificationController::class, 'getUnreadCount']);
|
|
|
|
|
$router->get('/api/notifications/recent', [NotificationController::class, 'getRecent']);
|
|
|
|
|
|
|
|
|
|
// User Management (Admin Only)
|
|
|
|
|
$router->get('/users', [UserController::class, 'index']);
|
|
|
|
|
$router->get('/users/create', [UserController::class, 'create']);
|
|
|
|
|
$router->post('/users/store', [UserController::class, 'store']);
|
2025-10-20 21:08:09 +03:00
|
|
|
$router->get('/users/{id}/edit', [UserController::class, 'edit']);
|
|
|
|
|
$router->post('/users/{id}/update', [UserController::class, 'update']);
|
|
|
|
|
$router->post('/users/{id}/delete', [UserController::class, 'delete']);
|
|
|
|
|
$router->post('/users/{id}/toggle-status', [UserController::class, 'toggleStatus']);
|
2025-10-10 14:01:19 +03:00
|
|
|
$router->post('/users/bulk-toggle-status', [UserController::class, 'bulkToggleStatus']);
|
|
|
|
|
$router->post('/users/bulk-delete', [UserController::class, 'bulkDelete']);
|
|
|
|
|
|
|
|
|
|
// Error Logs (Admin Only)
|
|
|
|
|
$router->get('/errors', [ErrorLogController::class, 'index']);
|
|
|
|
|
$router->get('/errors/{id}', [ErrorLogController::class, 'show']);
|
|
|
|
|
$router->post('/errors/{id}/resolve', [ErrorLogController::class, 'markResolved']);
|
|
|
|
|
$router->post('/errors/{id}/unresolve', [ErrorLogController::class, 'markUnresolved']);
|
|
|
|
|
$router->post('/errors/{id}/delete', [ErrorLogController::class, 'delete']);
|
|
|
|
|
$router->post('/errors/bulk-delete', [ErrorLogController::class, 'bulkDelete']);
|
|
|
|
|
$router->post('/errors/clear-resolved', [ErrorLogController::class, 'clearResolved']);
|
Upgraded to 1.1.0
1.1.0 (2025-10-09)
- **User Notifications System** - In-app notification center with 7 notification types, filtering, pagination
- **Advanced Session Management** - Database-backed sessions with geolocation (country, city, ISP)
- **Remote Session Control** - Terminate any device instantly with immediate logout validation
- **Enhanced Profile Page** - Sidebar navigation with 4 tabs, hash-based routing (#profile, #security, #sessions)
- **MVC Architecture Refactoring** - 3 new Helpers (Layout, Domain, Session), ~265 lines cleaned from views
- **Geolocation Tracking** - IP-based location detection using ip-api.com, country flags with flag-icons
- **Device Detection** - Browser & device type parsing (Chrome/Firefox/Safari, Desktop/Mobile/Tablet)
- **Auto-Detected Cron Paths** - Settings show actual installation paths (thanks @jadeops)
- **Welcome Notifications** - Sent to new users on registration or fresh install
- **Upgrade Notifications** - Admins notified on system updates with version & migration count
- **Web-Based Installer** - Replaces CLI, auto-generates encryption key, one-time password display
- **Web-Based Updater** - `/install/update` for running new migrations with smart detection
- **User Registration** - Full signup flow with email verification, password reset, resend verification
- **User Management** - CRUD for users with filtering, sorting, pagination (admin-only)
- **Remember Me** - 30-day secure tokens linked to sessions, cascade deletion on logout
- **Session Validator** - Middleware validates sessions on every request for instant remote logout
- **Consistent UI/UX** - Unified filtering, sorting, pagination across Domains, Users, Notifications, TLD Registry
- **Smart Migrations** - Consolidated schema for fresh installs, incremental for upgrades
- **XSS Protection** - htmlspecialchars() applied across all user-facing data (thanks @jadeops)
2025-10-09 18:02:46 +03:00
|
|
|
|
2025-10-25 02:04:00 +03:00
|
|
|
// Tag Management
|
|
|
|
|
$router->get('/tags', [TagController::class, 'index']);
|
|
|
|
|
$router->post('/tags/create', [TagController::class, 'create']);
|
|
|
|
|
$router->post('/tags/update', [TagController::class, 'update']);
|
|
|
|
|
$router->post('/tags/delete', [TagController::class, 'delete']);
|
|
|
|
|
$router->post('/tags/bulk-delete', [TagController::class, 'bulkDelete']);
|
|
|
|
|
$router->get('/tags/{id}', [TagController::class, 'show']);
|
|
|
|
|
$router->post('/tags/bulk-add-to-domains', [TagController::class, 'bulkAddToDomains']);
|
|
|
|
|
$router->post('/tags/bulk-remove-from-domains', [TagController::class, 'bulkRemoveFromDomains']);
|
|
|
|
|
|
|
|
|
|
|