morfeditorial/machinima-core
Composer 安装命令:
composer require morfeditorial/machinima-core
包简介
The Core CMS bundle for the Machinima platform.
README 文档
README
machinima-core
Core CMS Bundle of the Machinima platform.
Architecture · Tech stack · Installation · Contributing
This Symfony Bundle provides the core business logic, entities, services, and base UI templates for the Machinima platform. Its unique architecture ensures that the core system remains completely independent and entirely free of any hardcoded platform (like Telegram) dependencies.
Architecture
The core knows nothing about specific login platforms. Everything platform-specific (Telegram, or any other) lives in separate adapters, plugged in through contracts:
Morfeditorial\MachinimaCoreBundle\Contract\PlatformAdapterInterface— a platform adapter: declares its own name (getPlatformName()), an optional JS module for zero-click bootstrap (getBootstrapModulePath()), an optional JS module for presentational UI hints (theme, back button —getUiHintsModulePath()), and the session's UI context (getUiContext()).Morfeditorial\MachinimaCoreBundle\Contract\IdentityProviderPort— an identity provider: validates an assertion (an OIDC id_token, a signed initData string, etc.) and returns anIdentityAssertion.Morfeditorial\MachinimaCoreBundle\Contract\BootstrapOnlyIdentityProvider— a marker for providers that are only ever used via zero-click bootstrap and must never appear as a button on/login.
Zero-click login (e.g. from a Telegram Mini App) goes through a single, generic POST /api/auth/bootstrap endpoint: the platform's bootstrap module detects its runtime in the browser on its own, builds an opaque assertion, and sends {provider, assertion} — with no custom HTTP headers or other platform-specific workarounds involved.
Currently the only real adapter is machinima-telegram-adapter, pulled in as a separate composer package in the host application.
Tech stack
- PHP 8.4+, Symfony 8.1
- Doctrine ORM + PostgreSQL
- Twig + Turbo (Hotwire) on the frontend
Installation
To install this bundle in your Symfony host application:
composer require morfeditorial/machinima-core
Ensure the bundle is registered in your config/bundles.php:
return [ // ... Morfeditorial\MachinimaCoreBundle\MachinimaCoreBundle::class => ['all' => true], ];
Project structure
machinima-core/
+-- config/ # Bundle configuration (services, routes)
+-- src/
| +-- Command/ # CLI commands
| +-- Contract/ # platform-agnostic contracts (adapters, identity providers, UI context)
| +-- Controller/ # web + API controllers
| +-- DependencyInjection/ # Bundle extension
| +-- Entity/ # Doctrine entities
| +-- Event/ # domain events (e.g. UserAuthenticatedEvent)
| +-- EventListener/ # event subscribers
| +-- Security/ # authentication/authorization
| +-- Service/ # adapter/provider registries and other business logic
| +-- Twig/ # Twig extensions/runtime
| \-- MachinimaCoreBundle.php
+-- templates/ # Twig templates
\-- Resources/
\-- public/ # Public CSS/JS assets
Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
License
This project is licensed under the CSSM Unlimited License v2.0 (CSSM-ULv2). See the LICENSE file for details.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: LicenseRef-CSSM-Unlimited-2.0
- 更新时间: 2026-07-14