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
-- Domain Monitor v1.1.0 - Complete Initial Schema
-- This consolidated migration includes all features for fresh installations
-- =====================================================
2025-10-20 21:55:04 +03:00
-- USER MANAGEMENT & AUTHENTICATION (must be first)
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-20 21:55:04 +03:00
-- Users table (must be created first - referenced by other tables)
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
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY ,
username VARCHAR ( 100 ) NOT NULL UNIQUE ,
password VARCHAR ( 255 ) NOT NULL ,
email VARCHAR ( 255 ) ,
email_verified BOOLEAN DEFAULT FALSE ,
email_verification_token VARCHAR ( 255 ) NULL ,
email_verification_sent_at TIMESTAMP NULL ,
2025-10-20 21:15:09 +03:00
two_factor_enabled BOOLEAN DEFAULT FALSE ,
two_factor_secret VARCHAR ( 32 ) NULL ,
two_factor_backup_codes TEXT NULL ,
two_factor_setup_at TIMESTAMP NULL ,
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
full_name VARCHAR ( 255 ) ,
2025-10-27 18:13:38 +02:00
avatar VARCHAR ( 255 ) NULL ,
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
role VARCHAR ( 50 ) DEFAULT ' user ' ,
is_active BOOLEAN DEFAULT TRUE ,
last_login TIMESTAMP NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
INDEX idx_username ( username ) ,
INDEX idx_email ( email ) ,
INDEX idx_role ( role )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-09 18:34:09 +03:00
-- Insert default admin user (credentials will be set during installation)
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
INSERT INTO users ( username , password , email , full_name , is_active , role , email_verified ) VALUES
2025-10-09 18:34:09 +03:00
( ' {{ADMIN_USERNAME}} ' , ' {{ADMIN_PASSWORD_HASH}} ' , ' {{ADMIN_EMAIL}} ' , ' Administrator ' , 1 , ' admin ' , 1 )
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
ON DUPLICATE KEY UPDATE username = username ;
-- Password reset tokens table
CREATE TABLE IF NOT EXISTS password_reset_tokens (
id INT AUTO_INCREMENT PRIMARY KEY ,
user_id INT NOT NULL ,
token VARCHAR ( 255 ) NOT NULL UNIQUE ,
expires_at TIMESTAMP NOT NULL ,
used BOOLEAN DEFAULT FALSE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE ,
INDEX idx_token ( token ) ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_expires_at ( expires_at )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Sessions table (database-backed sessions)
CREATE TABLE IF NOT EXISTS sessions (
id VARCHAR ( 128 ) NOT NULL PRIMARY KEY ,
user_id INT DEFAULT NULL ,
ip_address VARCHAR ( 45 ) NOT NULL ,
user_agent TEXT ,
country VARCHAR ( 100 ) DEFAULT NULL ,
country_code VARCHAR ( 2 ) DEFAULT NULL ,
region VARCHAR ( 100 ) DEFAULT NULL ,
city VARCHAR ( 100 ) DEFAULT NULL ,
isp VARCHAR ( 255 ) DEFAULT NULL ,
timezone VARCHAR ( 50 ) DEFAULT NULL ,
payload MEDIUMTEXT NOT NULL ,
last_activity INT UNSIGNED NOT NULL ,
created_at INT UNSIGNED NOT NULL ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_last_activity ( last_activity ) ,
INDEX idx_created_at ( created_at ) ,
CONSTRAINT fk_sessions_user FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Remember me tokens table
CREATE TABLE IF NOT EXISTS remember_tokens (
id INT AUTO_INCREMENT PRIMARY KEY ,
user_id INT NOT NULL ,
session_id VARCHAR ( 128 ) DEFAULT NULL ,
token VARCHAR ( 255 ) NOT NULL UNIQUE ,
expires_at TIMESTAMP NOT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE ,
FOREIGN KEY ( session_id ) REFERENCES sessions ( id ) ON DELETE CASCADE ,
INDEX idx_token ( token ) ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_session_id ( session_id ) ,
INDEX idx_expires_at ( expires_at )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-20 21:15:09 +03:00
-- Two-factor authentication verification attempts table
CREATE TABLE IF NOT EXISTS two_factor_verification_attempts (
id INT AUTO_INCREMENT PRIMARY KEY ,
user_id INT NOT NULL ,
ip_address VARCHAR ( 45 ) NOT NULL ,
success BOOLEAN DEFAULT FALSE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_ip_address ( ip_address ) ,
INDEX idx_created_at ( created_at )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Two-factor authentication email codes table
CREATE TABLE IF NOT EXISTS two_factor_email_codes (
id INT AUTO_INCREMENT PRIMARY KEY ,
user_id INT NOT NULL ,
code VARCHAR ( 6 ) NOT NULL ,
expires_at TIMESTAMP NOT NULL ,
used BOOLEAN DEFAULT FALSE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_code ( code ) ,
INDEX idx_expires_at ( expires_at ) ,
INDEX idx_used ( used )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-20 21:55:04 +03:00
-- =====================================================
-- CORE TABLES
-- =====================================================
-- Notification groups table (must be created first - referenced by domains)
CREATE TABLE IF NOT EXISTS notification_groups (
id INT AUTO_INCREMENT PRIMARY KEY ,
name VARCHAR ( 255 ) NOT NULL ,
description TEXT ,
user_id INT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE SET NULL ,
INDEX idx_notification_groups_user_id ( user_id )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Domains table
CREATE TABLE IF NOT EXISTS domains (
id INT AUTO_INCREMENT PRIMARY KEY ,
domain_name VARCHAR ( 255 ) NOT NULL UNIQUE ,
notification_group_id INT NULL ,
registrar VARCHAR ( 255 ) ,
registrar_url VARCHAR ( 255 ) ,
expiration_date DATE ,
updated_date DATE ,
abuse_email VARCHAR ( 255 ) ,
last_checked TIMESTAMP NULL ,
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
dns_last_checked TIMESTAMP NULL ,
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
ssl_last_checked TIMESTAMP NULL ,
crtsh_last_fetched DATETIME NULL DEFAULT NULL ,
2026-02-08 22:58:59 +02:00
status ENUM ( ' active ' , ' expiring_soon ' , ' expired ' , ' error ' , ' available ' , ' redemption_period ' , ' pending_delete ' ) DEFAULT ' active ' ,
2025-10-20 21:55:04 +03:00
whois_data JSON ,
notes TEXT ,
is_active BOOLEAN DEFAULT TRUE ,
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
dns_monitoring_enabled TINYINT ( 1 ) NOT NULL DEFAULT 1 ,
ssl_monitoring_enabled TINYINT ( 1 ) NOT NULL DEFAULT 0 ,
2025-10-20 21:55:04 +03:00
user_id INT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( notification_group_id ) REFERENCES notification_groups ( id ) ON DELETE SET NULL ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE SET NULL ,
INDEX idx_notification_group_id ( notification_group_id ) ,
INDEX idx_domain_name ( domain_name ) ,
INDEX idx_expiration_date ( expiration_date ) ,
INDEX idx_status ( status ) ,
INDEX idx_is_active ( is_active ) ,
INDEX idx_domains_user_id ( user_id )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-20 22:49:08 +03:00
-- User notifications table (in-app notifications)
CREATE TABLE IF NOT EXISTS user_notifications (
id INT AUTO_INCREMENT PRIMARY KEY ,
user_id INT NOT NULL ,
type VARCHAR ( 50 ) NOT NULL ,
title VARCHAR ( 255 ) NOT NULL ,
message TEXT NOT NULL ,
domain_id INT NULL ,
is_read BOOLEAN DEFAULT FALSE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
read_at TIMESTAMP NULL ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE CASCADE ,
FOREIGN KEY ( domain_id ) REFERENCES domains ( id ) ON DELETE SET NULL ,
INDEX idx_user_id ( user_id ) ,
INDEX idx_is_read ( is_read ) ,
INDEX idx_created_at ( created_at ) ,
INDEX idx_type ( type )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-29 11:42:41 +02:00
-- =====================================================
-- TAGS SYSTEM (normalized)
-- =====================================================
-- Tags table
CREATE TABLE IF NOT EXISTS tags (
id INT AUTO_INCREMENT PRIMARY KEY ,
name VARCHAR ( 100 ) NOT NULL ,
color VARCHAR ( 50 ) DEFAULT ' bg-gray-100 text-gray-700 border-gray-300 ' ,
description TEXT NULL ,
usage_count INT DEFAULT 0 ,
user_id INT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE SET NULL ,
INDEX idx_name ( name ) ,
INDEX idx_usage_count ( usage_count ) ,
INDEX idx_user_id ( user_id ) ,
UNIQUE KEY unique_user_tag ( user_id , name )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Domain tags junction table
CREATE TABLE IF NOT EXISTS domain_tags (
id INT AUTO_INCREMENT PRIMARY KEY ,
domain_id INT NOT NULL ,
tag_id INT NOT NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
FOREIGN KEY ( domain_id ) REFERENCES domains ( id ) ON DELETE CASCADE ,
FOREIGN KEY ( tag_id ) REFERENCES tags ( id ) ON DELETE CASCADE ,
UNIQUE KEY unique_domain_tag ( domain_id , tag_id ) ,
INDEX idx_domain_id ( domain_id ) ,
INDEX idx_tag_id ( tag_id )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Default tags
INSERT INTO tags ( name , color , description , user_id ) VALUES
( ' production ' , ' bg-green-100 text-green-700 border-green-300 ' , ' Production environment domains ' , NULL ) ,
( ' staging ' , ' bg-yellow-100 text-yellow-700 border-yellow-300 ' , ' Staging environment domains ' , NULL ) ,
( ' development ' , ' bg-blue-100 text-blue-700 border-blue-300 ' , ' Development environment domains ' , NULL ) ,
( ' client ' , ' bg-purple-100 text-purple-700 border-purple-300 ' , ' Client-related domains ' , NULL ) ,
( ' personal ' , ' bg-orange-100 text-orange-700 border-orange-300 ' , ' Personal domains ' , NULL ) ,
( ' archived ' , ' bg-gray-100 text-gray-700 border-gray-300 ' , ' Archived or inactive domains ' , NULL )
ON DUPLICATE KEY UPDATE color = VALUES ( color ) , description = VALUES ( description ) ;
2025-10-20 21:55:04 +03:00
-- Notification channels table
CREATE TABLE IF NOT EXISTS notification_channels (
id INT AUTO_INCREMENT PRIMARY KEY ,
notification_group_id INT NOT NULL ,
2025-11-18 13:22:49 +02:00
channel_type ENUM ( ' email ' , ' telegram ' , ' discord ' , ' slack ' , ' mattermost ' , ' webhook ' , ' pushover ' ) NOT NULL ,
2025-10-20 21:55:04 +03:00
channel_config JSON NOT NULL ,
is_active BOOLEAN DEFAULT TRUE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( notification_group_id ) REFERENCES notification_groups ( id ) ON DELETE CASCADE ,
INDEX idx_group_id ( notification_group_id ) ,
INDEX idx_channel_type ( channel_type )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Notification logs table
CREATE TABLE IF NOT EXISTS notification_logs (
id INT AUTO_INCREMENT PRIMARY KEY ,
domain_id INT NOT NULL ,
notification_type VARCHAR ( 50 ) NOT NULL ,
channel_type VARCHAR ( 50 ) NOT NULL ,
message TEXT NOT NULL ,
sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
status ENUM ( ' sent ' , ' failed ' ) DEFAULT ' sent ' ,
error_message TEXT ,
FOREIGN KEY ( domain_id ) REFERENCES domains ( id ) ON DELETE CASCADE ,
INDEX idx_domain_id ( domain_id ) ,
INDEX idx_sent_at ( sent_at )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
2025-10-20 21:15:09 +03:00
-- Error logs table for debugging and error tracking
CREATE TABLE IF NOT EXISTS error_logs (
id INT PRIMARY KEY AUTO_INCREMENT ,
error_id VARCHAR ( 32 ) UNIQUE NOT NULL COMMENT ' Unique reference ID for user reporting ' ,
error_type VARCHAR ( 100 ) NOT NULL COMMENT ' Exception class name ' ,
error_message TEXT NOT NULL COMMENT ' Error message ' ,
error_file VARCHAR ( 500 ) NOT NULL COMMENT ' File where error occurred ' ,
error_line INT NOT NULL COMMENT ' Line number where error occurred ' ,
stack_trace TEXT COMMENT ' Full stack trace ' ,
-- Request context
request_method VARCHAR ( 10 ) COMMENT ' HTTP method (GET, POST, etc) ' ,
request_uri VARCHAR ( 500 ) COMMENT ' Request URI ' ,
request_data TEXT COMMENT ' JSON encoded POST/GET data (sanitized) ' ,
-- User context
user_id INT NULL COMMENT ' User who encountered the error ' ,
user_agent TEXT COMMENT ' Browser user agent string ' ,
ip_address VARCHAR ( 45 ) COMMENT ' IP address (IPv4 or IPv6) ' ,
session_data TEXT COMMENT ' Session data (sanitized, no passwords) ' ,
-- System context
php_version VARCHAR ( 20 ) COMMENT ' PHP version at time of error ' ,
memory_usage BIGINT COMMENT ' Memory usage in bytes ' ,
-- Tracking
occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT ' First occurrence timestamp ' ,
occurrences INT DEFAULT 1 COMMENT ' Number of times this error occurred ' ,
last_occurred_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT ' Last occurrence timestamp ' ,
-- Management
is_resolved BOOLEAN DEFAULT FALSE COMMENT ' Admin marked as resolved ' ,
resolved_at TIMESTAMP NULL COMMENT ' When marked as resolved ' ,
resolved_by INT NULL COMMENT ' Admin user who resolved it ' ,
notes TEXT COMMENT ' Admin notes about resolution ' ,
-- Foreign keys
FOREIGN KEY ( user_id ) REFERENCES users ( id ) ON DELETE SET NULL ,
FOREIGN KEY ( resolved_by ) REFERENCES users ( id ) ON DELETE SET NULL ,
-- Indexes for performance
KEY idx_error_id ( error_id ) ,
KEY idx_error_type ( error_type ) ,
KEY idx_occurred_at ( occurred_at ) ,
KEY idx_user_id ( user_id ) ,
KEY idx_is_resolved ( is_resolved ) ,
KEY idx_occurrences ( occurrences )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
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
-- =====================================================
-- TLD REGISTRY SYSTEM
-- =====================================================
-- TLD registry table
CREATE TABLE IF NOT EXISTS tld_registry (
id INT AUTO_INCREMENT PRIMARY KEY ,
tld VARCHAR ( 63 ) NOT NULL UNIQUE ,
rdap_servers JSON ,
whois_server VARCHAR ( 255 ) ,
registry_url VARCHAR ( 500 ) ,
iana_publication_date TIMESTAMP NULL ,
iana_last_updated TIMESTAMP NULL ,
record_last_updated TIMESTAMP NULL ,
registration_date DATE NULL ,
is_active BOOLEAN DEFAULT TRUE ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
INDEX idx_tld ( tld ) ,
INDEX idx_is_active ( is_active ) ,
INDEX idx_iana_publication_date ( iana_publication_date )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- TLD import logs table
CREATE TABLE IF NOT EXISTS tld_import_logs (
id INT AUTO_INCREMENT PRIMARY KEY ,
import_type ENUM ( ' tld_list ' , ' rdap ' , ' whois ' , ' manual ' , ' complete_workflow ' , ' check_updates ' ) NOT NULL ,
total_tlds INT DEFAULT 0 ,
new_tlds INT DEFAULT 0 ,
updated_tlds INT DEFAULT 0 ,
failed_tlds INT DEFAULT 0 ,
iana_publication_date TIMESTAMP NULL ,
version VARCHAR ( 50 ) NULL ,
started_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
completed_at TIMESTAMP NULL ,
status ENUM ( ' running ' , ' completed ' , ' failed ' ) DEFAULT ' running ' ,
error_message TEXT ,
details JSON ,
INDEX idx_started_at ( started_at ) ,
INDEX idx_status ( status )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
-- =====================================================
-- DNS MONITORING
-- =====================================================
-- DNS records table for tracking DNS record changes
CREATE TABLE IF NOT EXISTS dns_records (
id INT AUTO_INCREMENT PRIMARY KEY ,
domain_id INT NOT NULL ,
record_type VARCHAR ( 10 ) NOT NULL COMMENT ' A, AAAA, MX, TXT, NS, CNAME, SOA ' ,
host VARCHAR ( 255 ) NOT NULL DEFAULT ' @ ' ,
value TEXT NOT NULL ,
ttl INT NULL ,
priority INT NULL COMMENT ' MX priority ' ,
is_cloudflare BOOLEAN DEFAULT FALSE ,
Enhance DNS discovery, validation & transfers
Add comprehensive DNS management and input validation, plus safer transfer and logging behavior.
- Add CronHelper utilities for cron scripts and unify logging/formatting.
- Improve InputValidator: sanitizeDomainInput and validateRootDomain (handles multi-level TLDs) and use throughout domain import/create flows to reject subdomains.
- DomainController: refactor DNS refresh to support quick/deep discovery (background deep scans), add endpoints to discover, add/delete/bulk-delete DNS records, import BIND zone files, enrich IP metadata via enrichIpDetails, and strengthen bulk import/reporting messages.
- DnsRecord model: add source column handling (discovered/manual/imported), avoid auto-deleting manual/imported records, and add helpers for deleting, bulk deleting, manual adding and importing zone records.
- Tag, NotificationGroup and Domain transfer logic: unlink groups when ownership changes, remove tags that belong to other users, add audit logging via Logger and improved bulk transfer reporting. TagController/View: show transferable users for admins and skip global tags on transfer.
- Notification channels (Discord, Mattermost, etc.) and EmailHelper: allow explicit subjects and improve payload fields based on notification type.
- Add new migration 029_add_dns_record_source.sql and wire it into the installer; update migrations detection.
- Add new views/partials for confirm/import/transfer modals, update various domain/group/tag templates, and update cron scripts and routes for discovery.
These changes preserve manual/imported DNS records, improve root-domain validation, enable background deep discovery, and add better logging/audit trails for transfers and imports.
2026-03-10 22:54:28 +02:00
source ENUM ( ' discovered ' , ' manual ' , ' imported ' ) NOT NULL DEFAULT ' discovered ' ,
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
raw_data JSON NULL COMMENT ' Full record data from dns_get_record() ' ,
first_seen_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
last_seen_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( domain_id ) REFERENCES domains ( id ) ON DELETE CASCADE ,
INDEX idx_domain_id ( domain_id ) ,
INDEX idx_record_type ( record_type ) ,
INDEX idx_domain_type ( domain_id , record_type ) ,
INDEX idx_last_seen ( last_seen_at )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
-- SSL certificates table for tracking monitored TLS endpoints
CREATE TABLE IF NOT EXISTS ssl_certificates (
id INT AUTO_INCREMENT PRIMARY KEY ,
domain_id INT NOT NULL ,
hostname VARCHAR ( 255 ) NOT NULL ,
port INT NOT NULL DEFAULT 443 ,
status ENUM ( ' valid ' , ' expiring ' , ' expired ' , ' invalid ' ) NOT NULL DEFAULT ' invalid ' ,
is_trusted TINYINT ( 1 ) NOT NULL DEFAULT 0 ,
is_self_signed TINYINT ( 1 ) NOT NULL DEFAULT 0 ,
valid_from DATETIME NULL ,
valid_to DATETIME NULL ,
days_remaining INT NULL ,
issuer_name VARCHAR ( 255 ) NULL ,
subject_name VARCHAR ( 255 ) NULL ,
serial_number VARCHAR ( 255 ) NULL ,
signature_algorithm VARCHAR ( 100 ) NULL ,
key_bits INT NULL ,
key_type VARCHAR ( 20 ) NULL ,
certificate_version VARCHAR ( 20 ) NULL ,
san_list JSON NULL ,
last_checked DATETIME NULL ,
last_error TEXT NULL ,
raw_data JSON NULL ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
FOREIGN KEY ( domain_id ) REFERENCES domains ( id ) ON DELETE CASCADE ,
UNIQUE KEY uniq_domain_host_port ( domain_id , hostname , port ) ,
INDEX idx_ssl_domain_id ( domain_id ) ,
INDEX idx_ssl_status ( status ) ,
INDEX idx_ssl_valid_to ( valid_to )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
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
-- =====================================================
-- SYSTEM SETTINGS
-- =====================================================
-- Settings table
CREATE TABLE IF NOT EXISTS settings (
id INT AUTO_INCREMENT PRIMARY KEY ,
setting_key VARCHAR ( 255 ) NOT NULL UNIQUE ,
setting_value TEXT ,
` type ` VARCHAR ( 50 ) DEFAULT ' string ' ,
` description ` TEXT ,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Insert default settings
INSERT INTO settings ( setting_key , setting_value , ` type ` , ` description ` ) VALUES
-- Application settings
( ' app_name ' , ' Domain Monitor ' , ' string ' , ' Application name ' ) ,
( ' app_url ' , ' http://localhost:8000 ' , ' string ' , ' Application URL ' ) ,
( ' app_timezone ' , ' UTC ' , ' string ' , ' Application timezone ' ) ,
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
( ' app_version ' , ' 1.1.5 ' , ' string ' , ' Application version number ' ) ,
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
-- Email settings
( ' mail_host ' , ' smtp.mailtrap.io ' , ' string ' , ' SMTP server host ' ) ,
( ' mail_port ' , ' 2525 ' , ' string ' , ' SMTP server port ' ) ,
( ' mail_username ' , ' ' , ' string ' , ' SMTP username ' ) ,
( ' mail_password ' , ' ' , ' encrypted ' , ' SMTP password (encrypted) ' ) ,
( ' mail_encryption ' , ' tls ' , ' string ' , ' SMTP encryption (tls/ssl) ' ) ,
( ' mail_from_address ' , ' noreply@domainmonitor.com ' , ' string ' , ' From email address ' ) ,
( ' mail_from_name ' , ' Domain Monitor ' , ' string ' , ' From name ' ) ,
-- Monitoring settings
( ' notification_days_before ' , ' 60,30,21,14,7,5,3,2,1 ' , ' string ' , ' Notification days before expiration ' ) ,
2026-02-08 22:58:59 +02:00
( ' notification_status_triggers ' , ' available,registered,expired,redemption_period,pending_delete ' , ' string ' , ' Domain status changes that trigger notifications ' ) ,
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
( ' check_interval_hours ' , ' 24 ' , ' string ' , ' Domain check interval in hours ' ) ,
( ' last_check_run ' , NULL , ' datetime ' , ' Last time cron job ran ' ) ,
-- Authentication settings
( ' registration_enabled ' , ' 0 ' , ' boolean ' , ' Enable user registration ' ) ,
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
( ' require_email_verification ' , ' 1 ' , ' boolean ' , ' Require email verification for new users ' ) ,
-- CAPTCHA settings
( ' captcha_provider ' , ' disabled ' , ' string ' , ' CAPTCHA provider (disabled, recaptcha_v2, recaptcha_v3, turnstile) ' ) ,
( ' captcha_site_key ' , ' ' , ' string ' , ' CAPTCHA site/public key ' ) ,
( ' captcha_secret_key ' , ' ' , ' encrypted ' , ' CAPTCHA secret key (encrypted) ' ) ,
2025-10-20 17:04:13 +03:00
( ' recaptcha_v3_score_threshold ' , ' 0.5 ' , ' string ' , ' reCAPTCHA v3 minimum score threshold (0.0 to 1.0) ' ) ,
2025-10-20 21:15:09 +03:00
-- Two-factor authentication settings
( ' two_factor_policy ' , ' optional ' , ' string ' , ' 2FA policy: disabled, optional, or required ' ) ,
( ' two_factor_rate_limit_minutes ' , ' 15 ' , ' string ' , ' Rate limit for 2FA attempts in minutes ' ) ,
( ' two_factor_email_code_expiry_minutes ' , ' 10 ' , ' string ' , ' Email code expiry time in minutes ' ) ,
2025-10-20 17:04:13 +03:00
-- User isolation settings
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
( ' user_isolation_mode ' , ' shared ' , ' string ' , ' User data visibility mode: shared (all users see all data) or isolated (users see only their own data) ' ) ,
Add DNS monitoring and refresh functionality
Introduce DNS monitoring: add DnsService (comprehensive DNS lookup, crt.sh discovery, Cloudflare detection, IP enrichment) and a new DnsRecord model to persist snapshots, manage diffs, and provide queries/stats. Update DomainController to support a dns_monitoring_enabled flag, refactor WHOIS/DNS refresh logic into performWhoisRefresh/performDnsRefresh, and add endpoints for refreshWhois, refreshDns and refreshAll; send notifications when DNS monitoring is toggled. Add UI templates/tabs for DNS, billing, notifications, overview, SSL and WHOIS and wire DNS data into the domain view; expose cached IP details. Add cron/check_dns.php and migration 027_add_dns_monitoring.sql (and include it in installer migration lists). Other tweaks: safer EmailHelper subject handling, TldRegistry search improvements, domain sorting using an effective status (expiring_soon), Discord channel null-safe fields, settings UI additions (domain_view_template and cron staleness warnings), and route/migration updates. This enables scheduled and manual DNS scans with persistent records and notifications.
2026-03-08 14:32:05 +02:00
-- Domain view settings
( ' domain_view_template ' , ' detailed ' , ' string ' , ' Domain view template: detailed or default ' ) ,
-- DNS monitoring settings
( ' dns_check_interval_hours ' , ' 24 ' , ' string ' , ' DNS record check interval in hours ' ) ,
( ' last_dns_check_run ' , NULL , ' datetime ' , ' Last time DNS cron job ran ' ) ,
Add SSL monitoring (Svc, model, cron, UI)
Introduce SSL certificate monitoring: add SslService for fetching/parsing certs and parsing monitor targets, SslCertificate model for storing snapshots and managing monitored targets, and cron/check_ssl.php for scheduled checks. Extend DomainController with many SSL endpoints and helpers (add/refresh/bulk refresh/delete/bulk delete, snapshot handling, formatting, stats, safety checks) and surface SSL data in domain views. Add NotificationService helpers to create/send SSL alerts, update Installer to include new migration, add migration 028 to create ssl_certificates table, bump app version default to 1.1.5, update changelog, and modify routes and templates to include SSL tab and related UI. Logs and basic validation/error handling are included to surface SSL issues and protect default root-target behavior.
2026-03-08 21:12:09 +02:00
-- SSL monitoring settings
( ' ssl_check_interval_hours ' , ' 12 ' , ' string ' , ' SSL certificate check interval in hours ' ) ,
( ' last_ssl_check_run ' , NULL , ' datetime ' , ' Last time SSL cron job ran ' ) ,
Add import/export and update system
Implement CSV/JSON import and export for domains, notification groups and tags (with masking for sensitive channel data), including size/format validation, in-memory CSV building, and logging. Add tag transfer and bulk transfer actions (admin-only). Introduce a new update system: Add UpdateController and UpdateService, migration 025_add_update_system_v1.1.3.sql, and installer changes to include the new migration and version handling; provide endpoints to check, apply, rollback and configure updates. Update helpers and UI bits: add getUpdateBadgeInfo in LayoutHelper, update notification icons/redirects, and add getMaxUploadSize in ViewHelper. Misc: add NotificationGroup::findByName, tweak .gitignore backups path, and update related views and routes.
2026-02-11 17:43:23 +02:00
-- Update system settings
( ' update_channel ' , ' stable ' , ' string ' , ' Update channel: stable (releases only) or latest (releases + hotfixes) ' ) ,
( ' update_badge_enabled ' , ' 1 ' , ' string ' , ' Show update available badge in top menu when an update is available (1=yes, 0=no) ' )
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
ON DUPLICATE KEY UPDATE setting_key = setting_key ;
-- =====================================================
-- MIGRATION TRACKING
-- =====================================================
-- Migrations tracking table
CREATE TABLE IF NOT EXISTS migrations (
id INT AUTO_INCREMENT PRIMARY KEY ,
migration VARCHAR ( 255 ) NOT NULL UNIQUE ,
executed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
INDEX idx_migration ( migration )
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci ;
-- Mark this consolidated migration as executed
INSERT INTO migrations ( migration ) VALUES ( ' 000_initial_schema_v1.1.0.sql ' )
ON DUPLICATE KEY UPDATE migration = migration ;