402604b4cc
Phase 1 implementation includes: Database: - schema.sql with tables for tenants, domains, settings, branding, streams, users, subscriptions, plans, invoices, viewer_stats Core Classes (src/Core/): - Database.php: PDO wrapper with singleton pattern - TenantResolver.php: Domain-to-tenant resolution with fallback Tenant Classes (src/Tenant/): - TenantManager.php: CRUD operations for tenants - TenantSettingsManager.php: DB-based settings per tenant Configuration: - config.example.php: Template for database/stripe/mail config - bootstrap.php: Initializes multi-tenant environment - .gitignore: Excludes config.php and cache files Integration: - SettingsManager.php: Added saas_features toggles (all off by default) - index.php: Uses getSiteConfig() from bootstrap when multi-tenant enabled, falls back to legacy hardcoded domains when disabled All SaaS features are disabled by default (saas_features.multi_tenant_enabled = false), ensuring zero breaking changes to existing installations.
60 lines
1.4 KiB
PHP
60 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Aurora Livecam - Konfigurationsdatei
|
|
*
|
|
* Kopiere diese Datei zu config.php und passe die Werte an.
|
|
* WICHTIG: config.php niemals in Git committen!
|
|
*/
|
|
|
|
return [
|
|
// Datenbank-Konfiguration
|
|
'database' => [
|
|
'host' => 'localhost',
|
|
'port' => 3306,
|
|
'database' => 'aurora_livecam',
|
|
'username' => 'root',
|
|
'password' => '',
|
|
'charset' => 'utf8mb4',
|
|
],
|
|
|
|
// Anwendungs-Einstellungen
|
|
'app' => [
|
|
'name' => 'Aurora Livecam',
|
|
'url' => 'https://aurora-weather-livecam.com',
|
|
'debug' => false,
|
|
'timezone' => 'Europe/Zurich',
|
|
],
|
|
|
|
// Multi-Tenant Einstellungen
|
|
'tenant' => [
|
|
'default_subdomain_suffix' => '.aurora-livecam.com',
|
|
'allow_custom_domains' => true,
|
|
'trial_days' => 14,
|
|
],
|
|
|
|
// Stripe (für Billing)
|
|
'stripe' => [
|
|
'public_key' => '',
|
|
'secret_key' => '',
|
|
'webhook_secret' => '',
|
|
'currency' => 'chf',
|
|
],
|
|
|
|
// E-Mail Einstellungen (für Onboarding)
|
|
'mail' => [
|
|
'host' => 'smtp.example.com',
|
|
'port' => 587,
|
|
'username' => '',
|
|
'password' => '',
|
|
'from_address' => 'noreply@aurora-livecam.com',
|
|
'from_name' => 'Aurora Livecam',
|
|
],
|
|
|
|
// Sicherheit
|
|
'security' => [
|
|
'session_lifetime' => 7200, // 2 Stunden
|
|
'remember_me_days' => 30,
|
|
'password_min_length' => 8,
|
|
],
|
|
];
|