Kant CMS: Grundgerüst, visueller Editor, Mediathek

Symfony 7.4 / Twig / Doctrine DBAL auf herkömmlichem PHP-Webhosting.
Versionierte Blockdokumente (v1-v3) mit unveränderlichen Revisionen,
getrennten Entwürfen/Veröffentlichungen und optimistischer
Konflikterkennung. Visueller Editor mit Strukturbaum, Live-Vorschau,
responsiven Gerätewerten, Abschnittsvorlagen, Bildmediathek,
Galerien und Effekten. Öffentliche Ausgabe ohne Editor-JavaScript.

Geprüft: 41 PHP-Tests / 155 Assertions, 10 JavaScript-Modelltests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-12 10:19:05 +02:00
commit 82b07820bc
87 files changed
+14463

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
// PHP web hosts may omit E from variables_order. Honor real process configuration.
foreach (['APP_ENV', 'APP_DEBUG', 'APP_SECRET', 'DATABASE_URL', 'SITE_ORIGIN', 'MEDIA_DIRECTORY'] as $name) {
$value = getenv($name, true);
if (false !== $value && !isset($_SERVER[$name]) && !isset($_ENV[$name])) {
$_SERVER[$name] = $_ENV[$name] = $value;
}
}
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
+7
View File
@@ -0,0 +1,7 @@
<?php
return [
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
];
+19
View File
@@ -0,0 +1,19 @@
framework:
secret: '%env(APP_SECRET)%'
csrf_protection: true
session:
handler_id: null
storage_factory_id: session.storage.factory.native
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
cookie_httponly: true
cookie_samesite: lax
cookie_secure: auto
cookie_path: /admin
name: KANTSESSION
router:
utf8: true
handle_all_throwables: true
http_method_override: false
disallow_search_engine_index: '%kernel.debug%'
php_errors:
log: true
+29
View File
@@ -0,0 +1,29 @@
security:
password_hashers:
App\Domain\CmsUser: auto
providers:
cms_users:
id: App\Security\UserProvider
role_hierarchy:
ROLE_ADMIN: [ROLE_EDITOR, ROLE_PUBLISHER]
ROLE_PUBLISHER: ROLE_EDITOR
firewalls:
admin:
pattern: ^/admin(?:/|$)
lazy: true
provider: cms_users
form_login:
login_path: admin_login
check_path: admin_login
enable_csrf: true
default_target_path: admin_pages
login_throttling:
max_attempts: 5
interval: '1 minute'
logout:
path: admin_logout
target: admin_login
enable_csrf: true
access_control:
- { path: ^/admin/login$, roles: PUBLIC_ACCESS }
- { path: ^/admin, roles: ROLE_EDITOR }
+4
View File
@@ -0,0 +1,4 @@
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file
+5
View File
@@ -0,0 +1,5 @@
security:
password_hashers:
App\Domain\CmsUser:
algorithm: bcrypt
cost: 4
+3
View File
@@ -0,0 +1,3 @@
twig:
default_path: '%kernel.project_dir%/templates'
strict_variables: true
+3
View File
@@ -0,0 +1,3 @@
controllers:
resource: ../src/Controller/
type: attribute
+16
View File
@@ -0,0 +1,16 @@
services:
_defaults:
autowire: true
autoconfigure: true
App\:
resource: '../src/'
exclude: '../src/{Kernel.php,Domain/}'
Doctrine\DBAL\Connection:
factory: ['App\Infrastructure\ConnectionFactory', 'create']
arguments: ['%env(resolve:DATABASE_URL)%']
App\Controller\PageController:
arguments:
$siteOrigin: '%env(SITE_ORIGIN)%'
App\Content\MediaLibrary:
arguments:
$directory: '%env(resolve:MEDIA_DIRECTORY)%'