Files
Atomcms-edit/routes/web.php
T
root 0c6c558a59 Add radio embed widget, SSE real-time, song history, moderation panel, and Auto DJ
- Embed widget: standalone iframe player with dark/light/transparent themes, copy-paste embed code admin page
- Real-time SSE: streaming now-playing/listeners/dj events, replaces polling in radio-player and embed
- Song history: auto-records song changes to radio_song_plays table, Filament resource to view
- DJ moderation: unified panel for shouts approval, song request queue, DJ applications
- Auto DJ: playlist management with round-robin playback when no DJ is live
- Refactored radio-player Alpine component to use EventSource API with auto-reconnect
2026-05-24 14:07:32 +02:00

61 lines
2.6 KiB
PHP
Executable File

<?php
use App\Http\Controllers\Auth\LoginRedirectController;
use App\Http\Controllers\Auth\LogoutController;
use App\Http\Controllers\Miscellaneous\HomeController;
use App\Http\Controllers\Miscellaneous\InstallationController;
use App\Http\Controllers\Miscellaneous\LocaleController;
use App\Http\Controllers\Miscellaneous\MaintenanceController;
use App\Http\Controllers\User\BannedController;
use Illuminate\Support\Facades\Route;
// Radio embed (public, no auth required)
Route::get('/radio/embed', [\App\Http\Controllers\Radio\EmbedController::class, 'show'])->name('radio.embed');
// Language route
Route::get('/language/{locale}', LocaleController::class)->name('language.select');
// Installation routes
Route::prefix('installation')->controller(InstallationController::class)->group(function () {
Route::get('/', 'index')->name('installation.index');
Route::get('/step/{step}', 'showStep')->name('installation.show-step');
Route::post('/start-installation', 'storeInstallationKey')->name('installation.start-installation');
Route::post('/restart-installation', 'restartInstallation')->name('installation.restart');
Route::post('/previous-step', 'previousStep')->name('installation.previous-step');
Route::post('/save-step', 'saveStepSettings')->name('installation.save-step');
Route::post('/complete', 'completeInstallation')->name('installation.complete');
});
// All routes within this group is protected by maintenance, ban and 2FA middleware
Route::middleware(['maintenance', 'check.ban', 'force.staff.2fa'])->group(function () {
// Maintenance route
Route::get('/maintenance', MaintenanceController::class)->name('maintenance.show');
// Banned route
Route::get('/banned', BannedController::class)->name('banned.show');
// Home routes (guest only)
Route::middleware(['guest', 'throttle:60,1'])->withoutMiddleware('force.staff.2fa')->group(function () {
Route::get('/login', LoginRedirectController::class)->name('login');
Route::get('/', HomeController::class)->name('welcome');
Route::get('/home', HomeController::class)->name('home');
});
// Logout route
Route::post('/logout', LogoutController::class)->name('logout');
// Authenticated routes
Route::middleware('auth')->group(function () {
require __DIR__ . '/user.php';
require __DIR__ . '/community.php';
require __DIR__ . '/shop.php';
require __DIR__ . '/help-center.php';
require __DIR__ . '/client.php';
require __DIR__ . '/admin.php';
});
// Auth routes (mixed guest/auth)
require __DIR__ . '/auth.php';
});