b2in/packages/flux-cms/core/config/flux-cms.php
2025-10-20 17:50:35 +02:00

305 lines
No EOL
10 KiB
PHP

<?php
return [
/*
|--------------------------------------------------------------------------
| Flux CMS Configuration
|--------------------------------------------------------------------------
|
| This file contains the configuration options for Flux CMS.
|
*/
/*
|--------------------------------------------------------------------------
| Default Locale
|--------------------------------------------------------------------------
|
| The default locale for the CMS content.
|
*/
'default_locale' => env('FLUX_CMS_DEFAULT_LOCALE', 'de'),
/*
|--------------------------------------------------------------------------
| Available Locales
|--------------------------------------------------------------------------
|
| The available locales for the CMS content.
|
*/
'locales' => [
'de' => 'Deutsch',
'en' => 'English',
],
/*
|--------------------------------------------------------------------------
| Component Paths
|--------------------------------------------------------------------------
|
| The namespaces where the CMS will scan for components.
|
*/
'component_paths' => [
'App\\Livewire\\Components',
'FluxCms\\StarterComponents\\Components',
],
/*
|--------------------------------------------------------------------------
| Cache Configuration
|--------------------------------------------------------------------------
|
| Configuration for caching component registry and other CMS data.
|
*/
'cache' => [
'enabled' => env('FLUX_CMS_CACHE_ENABLED', true),
'ttl' => env('FLUX_CMS_CACHE_TTL', 3600), // 1 hour
'key_prefix' => 'flux_cms',
'store' => env('FLUX_CMS_CACHE_STORE', null), // null = default cache store
],
/*
|--------------------------------------------------------------------------
| Database Configuration
|--------------------------------------------------------------------------
|
| Database table configuration for Flux CMS.
|
*/
'database' => [
'table_prefix' => 'flux_cms_',
'connection' => env('FLUX_CMS_DB_CONNECTION', null), // null = default connection
],
/*
|--------------------------------------------------------------------------
| Authentication & Authorization
|--------------------------------------------------------------------------
|
| Configuration for user authentication and authorization.
|
*/
'auth' => [
'guard' => env('FLUX_CMS_AUTH_GUARD', 'web'),
'default_access' => env('FLUX_CMS_DEFAULT_ACCESS', false),
'super_admin_role' => 'admin',
'cms_role' => 'flux-cms',
'permissions' => [
'view' => 'flux-cms.view',
'edit' => 'flux-cms.edit',
'publish' => 'flux-cms.publish',
'delete' => 'flux-cms.delete',
'admin' => 'flux-cms.admin',
],
],
/*
|--------------------------------------------------------------------------
| Routes Configuration
|--------------------------------------------------------------------------
|
| Configuration for CMS routes.
|
*/
'routes' => [
'enabled' => env('FLUX_CMS_ROUTES_ENABLED', true),
'prefix' => env('FLUX_CMS_ROUTE_PREFIX', ''),
'middleware' => ['web'],
'admin_prefix' => env('FLUX_CMS_ADMIN_PREFIX', 'admin/cms'),
'admin_middleware' => ['web', 'auth'],
],
/*
|--------------------------------------------------------------------------
| SEO Configuration
|--------------------------------------------------------------------------
|
| SEO-related configuration options.
|
*/
'seo' => [
'site_name' => env('FLUX_CMS_SITE_NAME', config('app.name')),
'separator' => env('FLUX_CMS_SEO_SEPARATOR', ' - '),
'meta_keywords_limit' => 10,
'meta_description_limit' => 160,
'auto_sitemap' => true,
'auto_robots' => true,
'canonical_urls' => true,
'og_image_default' => null,
],
/*
|--------------------------------------------------------------------------
| Media Configuration
|--------------------------------------------------------------------------
|
| Configuration for media handling.
|
*/
'media' => [
'disk' => env('FLUX_CMS_MEDIA_DISK', 'public'),
'max_file_size' => env('FLUX_CMS_MAX_FILE_SIZE', 10240), // 10MB in KB
'allowed_extensions' => [
'images' => ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg'],
'documents' => ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'csv'],
'videos' => ['mp4', 'webm', 'ogg', 'avi', 'mov'],
'audio' => ['mp3', 'wav', 'ogg', 'flac'],
],
'conversions' => [
'thumb' => [
'width' => 300,
'height' => 300,
'fit' => 'crop',
],
'medium' => [
'width' => 800,
'height' => 600,
'fit' => 'contain',
],
'large' => [
'width' => 1200,
'height' => 900,
'fit' => 'contain',
],
],
],
/*
|--------------------------------------------------------------------------
| Editor Configuration
|--------------------------------------------------------------------------
|
| Configuration for WYSIWYG editors.
|
*/
'editor' => [
'default' => env('FLUX_CMS_EDITOR', 'tiptap'), // tiptap, tinymce, quill
'upload_images' => true,
'max_image_size' => 2048, // 2MB in KB
'toolbar_presets' => [
'basic' => ['bold', 'italic'],
'standard' => ['bold', 'italic', 'link', 'bulletList', 'orderedList'],
'full' => [
'bold', 'italic', 'underline', 'strike',
'heading1', 'heading2', 'heading3',
'bulletList', 'orderedList',
'link', 'image', 'table',
'code', 'codeBlock',
'quote', 'rule'
],
],
],
/*
|--------------------------------------------------------------------------
| Versioning Configuration
|--------------------------------------------------------------------------
|
| Configuration for content versioning.
|
*/
'versioning' => [
'enabled' => env('FLUX_CMS_VERSIONING_ENABLED', true),
'auto_version' => env('FLUX_CMS_AUTO_VERSION', true),
'max_versions' => env('FLUX_CMS_MAX_VERSIONS', 50),
'cleanup_old_versions' => env('FLUX_CMS_CLEANUP_VERSIONS', true),
'cleanup_after_days' => env('FLUX_CMS_CLEANUP_AFTER_DAYS', 365),
],
/*
|--------------------------------------------------------------------------
| Performance Configuration
|--------------------------------------------------------------------------
|
| Performance-related configuration options.
|
*/
'performance' => [
'eager_load_relations' => ['components', 'media'],
'pagination_size' => 20,
'component_registry_cache' => true,
'query_cache_ttl' => 300, // 5 minutes
],
/*
|--------------------------------------------------------------------------
| Development Configuration
|--------------------------------------------------------------------------
|
| Configuration options for development mode.
|
*/
'development' => [
'debug_mode' => env('FLUX_CMS_DEBUG', false),
'show_component_info' => env('FLUX_CMS_SHOW_COMPONENT_INFO', false),
'log_queries' => env('FLUX_CMS_LOG_QUERIES', false),
'hot_reload_components' => env('FLUX_CMS_HOT_RELOAD', false),
],
/*
|--------------------------------------------------------------------------
| Frontend Configuration
|--------------------------------------------------------------------------
|
| Configuration for frontend rendering.
|
*/
'frontend' => [
'layout' => env('FLUX_CMS_LAYOUT', 'layouts.app'),
'theme' => env('FLUX_CMS_THEME', 'default'),
'css_framework' => env('FLUX_CMS_CSS_FRAMEWORK', 'tailwind'), // tailwind, bootstrap
'component_wrapper' => env('FLUX_CMS_COMPONENT_WRAPPER', true),
'preview_mode' => env('FLUX_CMS_PREVIEW_MODE', true),
],
/*
|--------------------------------------------------------------------------
| API Configuration
|--------------------------------------------------------------------------
|
| Configuration for CMS API endpoints.
|
*/
'api' => [
'enabled' => env('FLUX_CMS_API_ENABLED', false),
'prefix' => env('FLUX_CMS_API_PREFIX', 'api/cms'),
'middleware' => ['api', 'auth:sanctum'],
'rate_limiting' => env('FLUX_CMS_API_RATE_LIMIT', '60,1'),
],
/*
|--------------------------------------------------------------------------
| Backup Configuration
|--------------------------------------------------------------------------
|
| Configuration for content backups.
|
*/
'backup' => [
'enabled' => env('FLUX_CMS_BACKUP_ENABLED', true),
'disk' => env('FLUX_CMS_BACKUP_DISK', 'local'),
'auto_backup' => env('FLUX_CMS_AUTO_BACKUP', true),
'backup_schedule' => env('FLUX_CMS_BACKUP_SCHEDULE', 'daily'),
'keep_backups' => env('FLUX_CMS_KEEP_BACKUPS', 30),
],
/*
|--------------------------------------------------------------------------
| Domain Configuration
|--------------------------------------------------------------------------
|
| Multi-domain support configuration.
|
*/
'domains' => [
'enabled' => env('FLUX_CMS_MULTI_DOMAIN', true),
'config_source' => 'domains', // 'domains' config key or 'database'
'default_domain' => env('FLUX_CMS_DEFAULT_DOMAIN', 'default'),
'auto_detect' => env('FLUX_CMS_AUTO_DETECT_DOMAIN', true),
],
];