feat: Kür-Hub mit Einladungen, Uploads und API

- PHP-App unter hub/ für rinkplanner-hub.programmschmiede.de
- MariaDB-Schema, Argon2id, Sessions, CSRF und Ratenbegrenzung
- Einladungscodes, Admin-Bereich und Kür-Pakete mit Audiodatei
- JSON-API v1 mit Bearer-Tokens für die Godot-App
- Deployment und Erstinstallation über tools/deploy_hub.sh
- Doku und Credentials-Vorlage ergänzt
This commit is contained in:
torsten 2026-11-11 13:14:26 +01:00
parent e79b477ee0
commit 055a2919c3
38 changed files with 5111 additions and 0 deletions

24
hub/web/index.php Normal file
View file

@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/**
* Rinkplanner-Hub – Front Controller.
* Apache leitet alle nicht vorhandenen Dateien über .htaccess hierher.
*/
require __DIR__ . '/app/bootstrap.php';
$uriPath = (string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH);
$basePath = rtrim((string) config('app.base_path', ''), '/');
if ($basePath !== '' && str_starts_with($uriPath, $basePath)) {
$uriPath = substr($uriPath, strlen($basePath));
}
$path = '/' . trim($uriPath, '/');
$method = request_method();
if (str_starts_with($path, '/api/')) {
api_handle($method, $path);
exit;
}
page_handle($method, $path);