Files
fotospiel-app/bootstrap/app.php
Codex Agent 9bde8f3f32 Neue Branding-Page und Gäste-PWA reagiert nun auf Branding-Einstellungen vom event-admin. Implemented local Google Fonts pipeline and admin UI selects for branding and invites.
- Added fonts:sync-google command (uses GOOGLE_FONTS_API_KEY, generates /public/fonts/google files, manifest, CSS, cache flush) and
    exposed manifest via new GET /api/v1/tenant/fonts endpoint with fallbacks for existing local fonts.
  - Imported generated fonts CSS, added API client + font loader hook, and wired branding page font fields to searchable selects (with
    custom override) that auto-load selected fonts.
  - Invites layout editor now offers font selection per element with runtime font loading for previews/export alignment.
  - New tests cover font sync command and font manifest API.

  Tests run: php artisan test --filter=Fonts --testsuite=Feature.
  Note: repository already has other modified files (e.g., EventPublicController, SettingsStoreRequest, guest components, etc.); left
  untouched. Run php artisan fonts:sync-google after setting the API key to populate /public/fonts/google.
2025-11-25 19:31:52 +01:00

82 lines
3.6 KiB
PHP

<?php
use App\Http\Middleware\CreditCheckMiddleware;
use App\Http\Middleware\EnsureTenantAdminToken;
use App\Http\Middleware\EnsureTenantCollaboratorToken;
use App\Http\Middleware\HandleAppearance;
use App\Http\Middleware\HandleInertiaRequests;
use App\Http\Middleware\SetLocaleFromUser;
use App\Http\Middleware\TenantIsolation;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets;
use Illuminate\Http\Request;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withCommands([
\App\Console\Commands\CheckEventPackages::class,
\App\Console\Commands\ExportCouponRedemptions::class,
\App\Console\Commands\DeactivateExpiredPhotoboothAccounts::class,
\App\Console\Commands\PhotoboothIngestCommand::class,
\App\Console\Commands\MonitorStorageCommand::class,
\App\Console\Commands\DispatchStorageArchiveCommand::class,
\App\Console\Commands\CheckUploadQueuesCommand::class,
\App\Console\Commands\PurgeExpiredDataExports::class,
\App\Console\Commands\ProcessTenantRetention::class,
\App\Console\Commands\SendGuestFeedbackReminders::class,
\App\Console\Commands\SyncGoogleFonts::class,
\App\Console\Commands\SeedDemoSwitcherTenants::class,
])
->withSchedule(function (\Illuminate\Console\Scheduling\Schedule $schedule) {
$schedule->command('package:check-status')->dailyAt('06:00');
$schedule->command('photobooth:cleanup-expired')->hourly()->withoutOverlapping();
$schedule->command('photobooth:ingest')->everyFiveMinutes()->withoutOverlapping();
$schedule->command('exports:purge')->dailyAt('02:00');
$schedule->command('tenants:retention-scan')->dailyAt('03:00');
$schedule->command('guest:feedback-reminders')->dailyAt('22:00');
})
->withMiddleware(function (Middleware $middleware) {
$middleware->trustProxies(
at: array_map('trim', explode(',', (string) env('TRUSTED_PROXIES', '*'))),
headers: Request::HEADER_X_FORWARDED_FOR
| Request::HEADER_X_FORWARDED_HOST
| Request::HEADER_X_FORWARDED_PORT
| Request::HEADER_X_FORWARDED_PROTO
| Request::HEADER_X_FORWARDED_AWS_ELB,
);
$middleware->alias([
'tenant.isolation' => TenantIsolation::class,
'package.check' => \App\Http\Middleware\PackageMiddleware::class,
'locale' => \App\Http\Middleware\SetLocale::class,
'superadmin.auth' => \App\Http\Middleware\SuperAdminAuth::class,
'credit.check' => CreditCheckMiddleware::class,
'tenant.admin' => EnsureTenantAdminToken::class,
'tenant.collaborator' => EnsureTenantCollaboratorToken::class,
]);
$middleware->encryptCookies(except: ['appearance', 'sidebar_state']);
$middleware->web(append: [
\App\Http\Middleware\SetLocale::class,
SetLocaleFromUser::class,
HandleAppearance::class,
\App\Http\Middleware\ContentSecurityPolicy::class,
HandleInertiaRequests::class,
AddLinkHeadersForPreloadedAssets::class,
\App\Http\Middleware\RequestTimingMiddleware::class,
]);
$middleware->api(append: []);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();