Commit Graph
71 Commits
Author SHA1 Message Date
hserver71 86ba16708b UCS Integration readme added 2026-06-22 16:15:39 +00:00
Divarion-D 99bc6c2680 docs(cli): document tools recaptcha subcommand 2026-06-21 13:06:33 +03:00
Divarion-D e382227a1d docs: remove root ARCHITECTURE.md files; promote architecture docs into docs/
ARCHITECTURE.md and ARCHITECTURE_RU.md (620 lines each) were a parallel
documentation source that drifted from the code and contained outdated
references (CONTEXT_* string constants, global $db, MIGRATION.md which
does not exist).

All relevant content is now covered by specialized pages in docs/:
- Module system → development/modules.md
- Bootstrap contexts → development/bootstrap-contexts.md
- Event system → development/event-system.md
- Build variants → builds/build_system.md

docs/{en,ru}/development/architecture.md rewritten as a clean, self-contained
overview: source tree table, runtime flow diagram, extension points table,
contributor rules. Broken links to ARCHITECTURE.md and MIGRATION.md removed.
2026-06-15 19:00:19 +03:00
Divarion-D f4555e7943 docs: reorganize structure, sync with current code, add missing framework reference
Structure:
- Split development/ (20 files) into development/ (framework reference) and guides/ (how-to)
- Moved 13 how-to files into new guides/ category (auth, cli, error-handling, etc.)
- Moved navbar-rendering.md from system/ into development/
- Deleted empty system/README.md files
- Deleted documentation_gaps.md (all gaps resolved) and redundant info/update.md

Sidebar / navbar:
- Removed all emojis from _sidebar.md (EN + RU) — fixes tree hierarchy rendering
- Removed flag emojis from _navbar.md language switcher
- Removed duplicate entries from the old "System Documentation" section
- Renamed section headers: "Development" -> "Framework Reference" + "Developer Guides"

Content fixes (modules.md EN + RU):
- Updated "Class naming" section: now documents XcVm\Module\{Pascal} namespaces
  (was "global PHP namespace — Until PHP namespaces are introduced")
- Updated main module class example to use namespace declaration + use statements
- Updated class naming in ModuleLoader description to FQN
- Replaced installCrontab() manual crontab instruction with getCronEntries() API
- Updated enable/disable section: added ModuleState enum table, updated config examples
- Fixed FAQ answer for disabling a module

Content fixes (bootstrap-contexts.md EN + RU):
- Replaced CONTEXT_* string constants with BootContext enum cases throughout
- Updated boot() signature: string $context -> BootContext $context
- Updated getContext() return type: ?string -> ?BootContext

New framework reference docs (EN + RU):
- docs/{en,ru}/development/event-system.md: EventDispatcher singleton bridge,
  #[ListensTo] attribute, getEventSubscribers() array API, stoppable events,
  built-in event catalog, custom event authoring, ListensTo attribute reference
- docs/{en,ru}/development/exception-hierarchy.md: full XcVmException tree,
  container vs module subtrees, PSR-11 compliance notes, catch-by-subsystem examples
2026-06-15 18:27:23 +03:00
Divarion-D 4302fd0633 docs: update module development guides for BaseModule and BoundaryInterface
Replaced the incorrect BoundaryInterface API (boot/getExportedServices)
with the real contract (getName/getEntryPoint/isIsolated). Updated all
examples to use extends BaseModule instead of implements ModuleInterface.
Both English and Russian guides are in sync.
2026-06-15 18:05:27 +03:00
Divarion-D 4a0501324c feat(modules): evolve module system to extensible platform architecture
TASK-000: Remove legacy core patching system
- Delete src/core/Module/CoreCodePatcher.php
- Delete src/core/Module/CoreCodePatchableModuleInterface.php

TASK-001: Split ModuleInterface into specialized provider interfaces
- Add ServiceProviderInterface (boot, getEventSubscribers)
- Add RouteProviderInterface (registerRoutes)
- Add CommandProviderInterface (registerCommands)
- Add NavbarProviderInterface (registerNavbar)
- Add StreamMiddlewareProviderInterface
- ModuleLoader::bootAll() detects supported providers via instanceof

TASK-002: Refactor EventDispatcher
- Add ListenerProvider with priority support
- Add AbstractEvent base class
- Add StoppableEventInterface support
- Preserve legacy subscribe/publish API compatibility

TASK-003: Extend ServiceContainer
- Add ServiceContainer::decorate()
- Support priority-based decorator chains
- Add protected service registry:
  - db
  - settings
  - config
  - auth

TASK-004: Add core event catalog
- ModuleLoadedEvent
- ModuleBootedEvent
- PackageInstalledEvent
- UserAuthenticatedEvent
- UserLoggedOutEvent
- StreamStartingEvent
- StreamStartedEvent
- StreamStoppedEvent
- SettingsChangedEvent

TASK-005: Formalize subsystem boundaries
- Add BoundaryInterface
- Add MinistraBootstrap implementation
- Define exported service contracts

TASK-006: Add stream middleware pipeline
- Add StreamContext
- Add StreamMiddlewareInterface
- Add StreamPipeline
- Support middleware priority ordering

TASK-007: Add module hot reload
- Dispatch PackageInstalledEvent after installation
- Add ModuleManager::hotReload()
- Load and boot newly installed modules without service restart

TASK-008: Standardize container contracts
- Add container interfaces:
  - ContainerInterface
  - ContainerExceptionInterface
  - NotFoundExceptionInterface
- Add NotFoundException implementation
- ServiceContainer::get() throws NotFoundException

TASK-009: Refactor navbar registration
- CoreNavbarProvider implements NavbarProviderInterface
- Add registerNavbar() instance method
- ModuleLoader uses provider-based registration

TASK-010: Add module priority support
- Add priority field to module.json
- Default value: 0
- Higher priority modules load earlier
- Resolve load order by:
  1. Priority DESC
  2. Module name ASC

TASK-011: Add optional dependencies
- Add optional_dependencies field to module.json
- Missing optional dependencies do not block module loading
- Process optional dependencies after required dependencies

Tests
- Add ServiceContainer tests
- Add EventDispatcher tests
- Add StreamPipeline tests
- Add ModuleLoader priority tests

Documentation
- Rewrite module architecture documentation
- Update examples and extension development guides
- Document lifecycle, events, services, middleware, and dependencies
2026-06-14 14:25:19 +03:00
Divarion-D 8ea44d0f81 refactor: remove deprecated variables and update documentation in bootstrap files 2026-06-12 13:37:28 +03:00
Divarion-D 8f796254ed Refactor configuration handling and database connections
- Removed ConfigLoader.php and transitioned to using ConfigReader for configuration management.
- Updated DatabaseHandler instantiation to no longer rely on global $_INFO, instead using default parameters.
- Enhanced Database and MigrationRunner classes to improve error handling and connection management.
- Simplified RedisManager connection logic by utilizing XC_VM::redis_connect().
- Adjusted various controllers and services to align with the new configuration and database connection methods.
- Removed unnecessary global variables and improved code readability across multiple files.
- Updated comments and documentation to reflect changes in configuration handling and database connections.
2026-06-12 00:54:31 +03:00
Divarion-D 1896387e46 refactoring(modules): remove the magscan module and update the documentation 2026-05-29 18:44:30 +03:00
Divarion-D 9d8641a61c refactoring(modules): remove fingerprint module and update related documentation 2026-05-29 18:31:55 +03:00
Divarion-D 908331849b docs(update) Sync ru version 2026-05-23 19:31:21 +03:00
Brett Petch 6e1e1a69c5 fixes(docs): update docs files 2026-05-21 11:30:14 -04:00
Brett Petch 8c2b133767 docs(backlog): Add backlogged items 2026-05-19 14:51:24 -04:00
Divarion-DandCopilot 64dc25097c Add server installation command and proxy installation flow
- Implemented `ServerInstallCommand` for installing and configuring servers via SSH.
- Created `ProxyInstallFlow` class to handle proxy-specific installation tasks.
- Updated `ServerService` to use the new command structure for server installations.
- Modified API endpoint to initiate server installations using the new command format.
- Enhanced error handling and logging during installation processes.

Co-authored-by: Copilot <copilot@github.com>
2026-05-12 14:23:48 +03:00
Divarion-DandCopilot e629101d15 feat(modules): enhance module manifest structure and loader functionality
- Added new fields to module.json: environment, dependencies, has_navbar, and has_settings.
- Updated ModuleLoader to support environment filtering and topological sorting of modules based on dependencies.
- Implemented error handling for missing and cyclic dependencies during module loading.
- Enhanced documentation for module.json structure and ModuleLoader functionality.
- Introduced unit tests for ModuleLoader to validate loading behavior and dependency resolution.
- Updated existing modules' manifest files to include new fields.

Co-authored-by: Copilot <copilot@github.com>
2026-05-06 21:53:37 +03:00
Divarion-D 657e241912 doc(navbar): documentation of the dynamic navigation menu system 2026-05-06 18:01:07 +03:00
Divarion-D 1244d42716 feat(docs): adding browser STB emulation help for Ministra 2026-05-03 15:33:33 +03:00
Divarion-D 6d11302d73 Refactor various components for improved error handling and code clarity
- Added checks for file existence before unlinking files in CacheHandlerCommand and CacheEngineCronJob.
- Suppressed errors for exec and shell_exec calls in WatchdogCommand, DaemonTrait, and SystemInfo.
- Enhanced bouquet map retrieval in BouquetService and CacheEngineCronJob to handle potential unserialization issues.
- Improved error handling in RootMysqlCronJob for MySQLD log parsing.
- Updated UserRepository to safely retrieve user IDs and user info from files, ensuring file existence checks.
- Refactored EpisodeService to handle stream sources and subtitles more robustly, including fallback mechanisms.
- Adjusted API responses in PlayerApiController and admin views to ensure consistent data handling.
- Enhanced server and line management views to prevent potential errors with undefined variables and arrays.
- General code cleanup and consistency improvements across various files.
2026-04-23 21:28:51 +03:00
Divarion-D 788ec37637 refactor: replace DEVELOPMENT flag, fix bootstrap and logging
- Remove DEVELOPMENT constant from AppConfig.php; introduce DB_ACCESS_ENABLED
  (controls phpMiniAdmin access in admin panel only, not core DB connections)
- Detach bootstrap.php from www/constants.php: load core/Config/* and
  core/Logging/Logger directly; define PHP_ERRORS fallback
- Switch Logger::init() to PHP_ERRORS in bootstrap.php, stream/init.php,
  RequestGuard.php; remove leftover TODO comment
- Logger: always set error_reporting(E_ALL); UI visibility controlled
  separately via display_errors; rename $development -> $showErrors
- MigrationRunner: track applied/failed counts separately; failed migrations
  are not marked as applied
- Replace DEVELOPMENT with DB_ACCESS_ENABLED in admin settings.php and
  database.php (phpMiniAdmin gate)
- Replace DEVELOPMENT with PHP_ERRORS in CertbotCronJob
- Docs (en/ru): add DB_ACCESS_ENABLED flag description; update feature-flags,
  updates_checklist, http-request-handling; remove DEVELOPMENT references
- MIGRATION.md: mark L-1 as done, remove from backlog and wave A;
  unblock L-2; renumber steps
2026-04-19 18:13:56 +03:00
Divarion-D db850b6065 Bump version to 2.1.2 2026-04-18 18:30:35 +03:00
Divarion-D 17c7a16f78 refactor: streamline Docker installation process and update documentation 2026-04-18 18:09:12 +03:00
Divarion-D 71087a184f docs: add EPG/XMLTV endpoint information to XtreamCodes API documentation 2026-04-18 17:48:40 +03:00
Divarion-D e737025ff8 test: add targeted PHPUnit setup and docs, fix GitHubReleases cache switching
- add PHPUnit bootstrap and config under tests/
- add focused unit tests for GitHubReleases, InputValidator and FfmpegPaths
- fix GitHubReleases cache file handling when switching update channel
- document PHPUnit PHAR usage and debug run commands in RU/EN docs
- document SFTP sync for tests/ and contributor test workflow
- remove broad smoke coverage approach in favor of per-file tests
2026-04-17 22:55:54 +03:00
Divarion-D 9aa7836b45 docs: sync ru/en documentation and navigation 2026-04-17 19:56:58 +03:00
Divarion-D 44af6bc515 docs(architecture): remove language and sync-ID from architecture overview 2026-04-17 16:13:31 +03:00
Divarion-D f53382c82f docs(i18n): add synchronized EN/RU architecture overview pages 2026-04-17 15:58:55 +03:00
Divarion-D 531be6e9e0 docs(build): sync LB/update docs with current Makefile and updater 2026-04-17 15:58:36 +03:00
Divarion-D db0f13462b feat(docs): update deleted files section in release checklist for clarity and automation details 2026-04-13 01:34:32 +03:00
Divarion-D f664fc23ba feat(docs): Added a CLI update guide to the documentation 2026-04-12 23:37:26 +03:00
Divarion-D 2c6935c929 feat: add changelog.json for version 2.1.0 and update release preparation checklist 2026-04-12 17:47:56 +03:00
Divarion-D d9bbd6c35b build: unify install and update into a single archive
Replace separate install/update build targets with a single archive that
serves both purposes. The update script (src/update) now extracts to a
temp directory, removes excluded dirs (binaries, config, user data), and
copies remaining files over the live installation.

Changes:
- Remove main_update, lb_update, lb_update_copy_files,
  main_update_copy_files Makefile targets and UPDATE_EXCLUDE_DIRS var
- Move exclude dirs list into src/update (Python) where filtering
  actually happens at runtime
- Rewrite doUpdate() to use tempdir extraction with try/finally cleanup
- Make delete_files_list/lb_delete_files_list gracefully skip when
  LAST_TAG is empty (warn instead of error)
- Simplify CI workflows: one make command per variant instead of
  conditional install + update steps
- Add ARCHITECTURE.md §5.5 documenting update flow
- Update en/ru docs: update-system.md, updates_checklist.md
- Update makefile-build.instructions.md with new targets
2026-04-12 17:38:35 +03:00
Divarion-D d6864ee3f1 fix(docs): reorder commands in release preparation checklist 2026-04-12 16:52:23 +03:00
Divarion-D 6757a64107 fix(docs): update method for retrieving previous release tag in update checklist 2026-04-12 15:34:20 +03:00
Divarion-D 6cc892f9a7 refactor: eliminate proxy functions, migrate to direct class method calls
312 files changed, 2866 insertions(+), 24110 deletions(-)

Proxy function replacements (130+ functions):
- goHome() -> AdminHelpers::goHome()
- checkPermissions() -> PageAuthorization::checkPermissions()
- getBouquet/getCategory/etc -> Service::getById()
- deleteStream/deleteLine/etc -> Repository/Service::delete()
- APIRequest/systemapirequest -> ApiClient::request/systemRequest()
- prepareArray/preparecolumn -> QueryHelper methods
- confirmIDs/parserelease/etc -> AdminHelpers methods
- getSettings/clearSettingsCache -> SettingsManager methods
- destroySession -> SessionManager::clearContext()
- getMag/getEnigma/deleteMAG/etc -> MagService/EnigmaService
- getSeriesTrailer/getMovieTMDB/etc -> TMDbService methods

Removed legacy files:
- src/includes/admin.php (main proxy hub)
- src/includes/libs/ (35+ files moved to core/modules)
- src/includes/python/ (moved to bin/python)
- src/includes/api/ (moved to Controllers)
- src/includes/ts.php, reseller_api.php
- src/infrastructure/legacy/admin_proxies.php
- tools/run_scan.sh, update_redis_conf.sh

Additional fixes:
- SQL query placeholder migration (BouquetService, CategoryService)
- PHP 8.x null-safe access (live.php, server_view.php, stream.php)
- TmdbCron: extracted variable for repeated similar_text calls
2026-04-09 21:24:48 +03:00
Divarion-D e304612605 feat: add new core/domain architecture classes and migrated libraries
New core classes:
- PageAuthorization, QueryHelper, ApiClient, AdminHelpers
- Logger, Translator, XmlStringStreamer, DropboxClient
- GithubReleases, MobileDetect

New domain classes:
- M3UParser, M3UEntry, TicketRepository, TMDbService

Migrated libraries:
- TMDb SDK → modules/tmdb/lib/
- Python scripts → bin/python/
- permissions.php → config/
- Table controllers → public/Controllers/
- AsyncFileOperations, TimeshiftClient → streaming/

New docs:
- translations.md (en/ru)
2026-04-09 21:23:16 +03:00
Divarion-D a64d59b15c fix(docs): update console paths in documentation and scripts 2026-04-07 20:49:44 +03:00
Divarion-D ac0c3753e7 fix(docs): update release checklist to include disabling development mode 2026-04-07 20:26:06 +03:00
Divarion-D 62f16a2b2f feat(docs): Added a section about the development workflow using SFTP 2026-04-07 15:57:55 +03:00
Divarion-D 6865257fde fix(docs): update release preparation checklist for clarity and automation 2026-04-06 22:08:35 +03:00
Divarion-D cc4d52fd97 style(docs): update index.html with dark theme and improved sidebar styles 2026-04-06 21:48:18 +03:00
Divarion-D 5bad1db08b docs: add beta install, fix deps and update CLI docs 2026-04-05 22:09:22 +03:00
Divarion-D 2dd8d3bd1e refactor: absorb includes/bootstrap/ into XC_Bootstrap
Merge the three legacy bootstrap files into XC_Bootstrap::boot(CONTEXT_ADMIN):

- admin_session.php → already covered by XC_Bootstrap::initSession()
- admin_runtime.php (status constants) → already covered by defineStatusConstants()
- admin_runtime.php (globals) → new initAdminGlobals() method
- admin_bootstrap.php (orchestrator) → eliminated, admin.php calls XC_Bootstrap directly

New private methods in XC_Bootstrap:
- initAdminGlobals(): MobileDetect, timeouts, servers, protocol, translator, admin_constants
- detectProtocol(): inlined issecure()+getProtocol() logic

Updated:
- includes/admin.php: require bootstrap.php + XC_Bootstrap::boot() instead of bridge
- Makefile: remove includes/bootstrap from LB_DIRS_TO_REMOVE
- ARCHITECTURE.md: remove bootstrap/ from tree and LB example
- docs/{en,ru}/builds/build_system.md: remove row from LB tables
- Comments in admin_functions_fc.php, functions.php

Deleted:
- includes/bootstrap/admin_bootstrap.php
- includes/bootstrap/admin_runtime.php
- includes/bootstrap/admin_session.php
2026-03-18 21:34:00 +03:00
Divarion-D d75080ddc5 refactor: move langs/ from includes/ to resources/
Migrate 7 locale .ini files (bg, de, en, es, fr, pt, ru) from
src/includes/langs/ to src/resources/langs/ per ARCHITECTURE.md
migration map.

Updated references:
- bootstrap.php: Translator::init() path
- includes/bootstrap/admin_runtime.php: Translator::init() path
- Makefile: removed includes/langs from LB_DIRS_TO_REMOVE
- ARCHITECTURE.md: marked migration as done, updated LB example
- docs/en/builds/build_system.md: updated excluded dirs table
- docs/ru/builds/build_system.md: updated excluded dirs table

Removed empty src/includes/langs/ directory.
2026-03-18 21:10:08 +03:00
Divarion-D 9211817695 docs: add controller creation guide to module documentation
- Add Step 4a with controller pattern using renderUnifiedLayoutHeader/Footer
- Add layout rules table and important notes
- Add checklist items for modules with admin pages
- Add bootAll() limitation warning
- Both EN and RU versions
2026-03-18 20:33:25 +03:00
Divarion-D a113fb3ec9 refactor: remove legacy proxy files, migrate all callers to console.php
- Delete src/status, src/tools, src/crons/epg.php (logic already in CLI commands)
- Update BalancerCommand: fix remote file_exists to SSH test -f, fix stripos check
- Update StartupCommand, UpdateCommand: use PHP_BIN + console.php
- Update dashboard.php: replace hardcoded sudo php with PHP_BIN
- Update install/test_installer: sentinel console.php, exec paths
- Update Makefile: remove status/tools from LB_ROOT_FILES and set_permissions
- Update docs: migration_guide, update-system (EN/RU)
- Update test-install: README.md, auto_install.sh
2026-03-18 20:32:51 +03:00
Divarion-D 5e0ce36e77 Bump version to 2.0.1 2026-03-17 21:06:17 +03:00
Divarion-D 7529a87707 docs: add module system documentation
- New: docs/en/development/modules.md — full module creation guide (EN)
- New: docs/ru/development/modules.md — full module creation guide (RU)
- Sidebars: add 'Module System' links (EN + RU)
- Build docs: replace TMDB cron rows with module system note
2026-03-16 22:34:17 +03:00
Divarion-D 327c8dc161 ci: automate release asset builds via GitHub Actions 2026-03-15 18:45:19 +03:00
Divarion-D 5ac5b08e2a docs: add autoloader documentation in English and Russian
Covers: how the autoloader works, adding new classes, cache
invalidation, manual registration (addClass), adding new directories,
naming rules, duplicate resolution, and debugging.

Sidebar links added to both language versions of the Docsify site.
2026-03-15 12:26:50 +03:00
Divarion-D 040143215a docs: Full Docsify documentation (EN + RU) and migration replacement
Full bilingual documentation for XC_VM has been added
with Docsify SPA and the outdated database migration has been replaced.

## Docsify

- docs/index.html — SPA entry point: en-us/ru-ru routing,
search, syntax highlighting (bash, PHP, SQL, nginx, JSON)

## EN Documentation

- docs/en/info/faq.md — FAQ (12 questions: streams, access, database, SSL, updates, permissions)
- docs/en/info/migration_guide.md — migration guide from other systems
- docs/en/info/update.md — step-by-step update via the web panel
- docs/en/info/watch_folder.md — Watch Folder: workflow, PTN/guessit parsers, configuration
- docs/en/updates_checklist.md — release preparation checklist

## RU Documentation (fully localized)

- docs/ru/README.md — Main Page
- docs/ru/_sidebar.md — Sidebar Navigation
- docs/ru/administration/ssl-generation.md — Self-Signed SSL Generation
- docs/ru/administration/update-system.md — Update Mechanism (PHP → Python → Post-Update)
- docs/ru/api/playlist.md — Playlist API with Error Codes
- docs/ru/api/system_api.md — System API (13 endpoints)
- docs/ru/api/xtreamcodes_api.md — XtreamCodes API (Authorization, Live, VOD, TV Series, EPG)
- docs/ru/builds/build_binaries.md — nginx build, nginx_rtmp, PHP-FPM, network
- docs/ru/builds/build_ffmpeg.md — Building FFmpeg 8.0 with NVENC/CUDA
- docs/ru/builds/build_system.md — MAIN vs. LB build system
- docs/ru/development/cli-tools.md — CLI: 26 commands, 25 crons, 8 daemons, database migrations
- docs/ru/info/faq.md — FAQ (12 questions)
- docs/ru/info/migration_guide.md — Migration guide
- docs/ru/info/update.md — Updating via the control panel
- docs/ru/info/watch_folder.md — Watch Folder
- docs/ru/updates_checklist.md — Release checklist

## Migrations

- Removed: 001_drop_watch_folders_plex_token.sql (Deprecated)
- Added: 001_update_crontab_filenames.sql — removes the .php suffix from filenames in the crontab table (switches to console.php commands)
2026-03-15 00:02:19 +03:00