mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-09 20:02:34 +02:00
Overhaul the Docsify documentation (English + Russian) so it matches the current codebase and follows one consistent pattern. Content accuracy (post-migration): - Rewrite development/autoloader.md to PSR-4 / Composer (the old XC_Autoloader scanner, igbinary tmp/cache/autoload_map and registerDirectories are gone). - PascalCase every source path (src/core -> src/Core, domain/Stream, cli/Commands, public/Controllers, Infrastructure/Redis, ...) across all docs. - Replace the removed autoload.php references with vendor/autoload.php (build_system, bootstrap-contexts, error-handling, modules). - ssl-generation: note that the installer now auto-generates a unique self-signed certificate before Nginx starts. Common pattern (Clean & uniform): - Strip emoji from headings; remove the in-page Navigation blocks (the Docsify sidebar already provides navigation). - One H1 + intro per doc; uniform "Related files" / "Связанные файлы" section, added to the code-centric docs that lacked it. Structure: - Remove the empty stray docs/api/; move updates_checklist.md into builds/; link the previously-orphaned ucs-integration.md. - Regroup the sidebars (split the oversized guides group into Developer Guides / Security & Access / Integrations; fold builds into Build & Release). Augment: - dev-workflow: Local Setup (make dev-tools) + Quality Checks (phpstan, cs, gates). - build_system: Composer Dependencies section (committed prod-only vendor, committed lock, dev tools via composer install, no build-time vendor step). en/ru parity: - Apply the same structure, fixes and pattern to docs/ru/ (translated), including a new Russian ucs-integration.md. The en and ru file sets are now identical.
2.1 KiB
2.1 KiB
Development Feature Flags
XC_VM uses constants and settings-driven flags to control environment behavior.
Application constants are stored in src/Core/Config/AppConfig.php.
Active Runtime Flag
PHP_ERRORS
define('PHP_ERRORS', $rShowErrors); // derived from $rSettings['debug_show_errors']
PHP_ERRORS controls PHP/debug verbosity and logger screen output:
Logger::init(PHP_ERRORS, LOGS_TMP_PATH . 'error_log.log');
DB_ACCESS_ENABLED
define('DB_ACCESS_ENABLED', false); // enables phpMiniAdmin tab/page in admin panel
DB_ACCESS_ENABLED controls access to phpMiniAdmin from admin UI only.
It does not block core application database connections.
Settings-driven Flags ($rSettings)
Loaded from settings cache and used in runtime decision points.
| Key | Type | Meaning |
|---|---|---|
debug_show_errors |
bool |
show detailed errors/debug output |
recaptcha_enable |
bool |
enable reCAPTCHA v2 on login |
verify_host |
bool |
enforce host allowlist validation |
save_login_logs |
bool |
persist login attempts in login_logs |
These values are loaded from CACHE_TMP_PATH/settings by request guards.
Static App Constants
From src/Core/Config/AppConfig.php:
define('DB_ACCESS_ENABLED', false);
define('XC_VM_VERSION', '2.2.1');
define('GIT_OWNER', 'Vateron-Media');
define('GIT_REPO_MAIN', 'XC_VM');
define('GIT_REPO_UPDATE', 'XC_VM_Update');
define('GIT_REPO_BIN', 'XC_VM_Binaries');
define('MONITOR_CALLS', 3);
define('OPENSSL_EXTRA', '...');
Adding New Flags
Use static constants in AppConfig.php for fixed Infrastructure/runtime constants.
Use settings ($rSettings) for values that must be managed from panel UI.
Avoid defining the same behavior in both places.
Related files
| File | Purpose |
|---|---|
src/Core/Config/AppConfig.php |
static app constants |
src/Core/Http/RequestGuard.php |
loads $rSettings, sets PHP_ERRORS |
src/Core/Error/ErrorHandler.php |
uses debug_show_errors behavior |
src/Core/Logging/Logger.php |
debug/verbosity behavior |