mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-16 12:02:54 +02:00
2.6 KiB
2.6 KiB
Architecture Overview
Canonical runtime details: ARCHITECTURE.md Current migration roadmap: MIGRATION.md
Purpose
This page is the English architecture mirror for contributors. It tracks the same practical state as the Russian architecture docs: mixed legacy + modernized runtime, non-finished migration, and explicit module/runtime boundaries.
Current Architecture in One View
- Project type: structured PHP monolith
- Runtime model: mixed (
ServiceContainer+ constructor injection + legacy globals) - Core flow:
public/index.phpfor panel pages, plus compatibility paths for API/streaming - Streaming: still depends on
www/stream/init.phpin the active hot path - Modules: CLI integration is active, web boot integration is incomplete
- Build model: MAIN (full) and LB (streaming-focused subset)
Source Tree Roles
src/core/: infrastructure primitives (DB, HTTP, Events, Config, Logging, Container)src/domain/: business contexts (Stream, Vod, Line, User, Server, Auth, etc.)src/streaming/: delivery/auth/protection path for stream endpointssrc/public/: front controller, routes, controllers, templates, assetssrc/cli/: command and cron execution layersrc/modules/: optional extension layersrc/infrastructure/legacy/: remaining compatibility code not yet eliminatedsrc/www/: legacy runtime surface still required by part of production traffic
Known Gaps (Synchronized with RU)
- Full constructor injection is still a target, not an everywhere-enforced rule.
www/cannot be removed safely yet because nginx/runtime/service tooling still depend on it.ModuleLoader::bootAll()is not connected topublic/index.php, so web module lifecycle is partial.- Some public controllers still delegate to legacy/procedural handlers.
Contributor Rules
- Treat
ARCHITECTURE.mdandMIGRATION.mdas operational source-of-truth for runtime and migration sequence. - Do not document impossible states (for example, "legacy removed") before code and infra actually match.
- Keep EN and RU architecture pages synchronized under the same Sync-ID.
- Never expose secrets, API keys, or internal credentials in frontend/client-facing docs or examples.
Synchronization Checklist
- Update docs/en/development/architecture.md and docs/ru/development/architecture.md in the same commit.
- Keep
Sync-IDand update date aligned. - If runtime changes significantly, update this page and the root ARCHITECTURE.md.