Add Alpine.js premium frontend dashboard and root routing

This commit is contained in:
Hamza-Ayed
2026-05-21 18:48:02 +03:00
parent 249014024d
commit 3d344cab97

View File

@@ -20,6 +20,13 @@ $router = new Router();
$router->use(\App\Middlewares\SecurityMiddleware::class);
// 4. Define API Routes
// Serve index.html dashboard on root path
$router->get('/', function ($request, $response) {
header('Content-Type: text/html; charset=utf-8');
readfile(__DIR__ . '/index.html');
exit;
});
// Health Check — no php_version or environment in production to avoid info disclosure
$router->get('/api/health', function ($request, $response) {
$response->json([