From 3d344cab97a538ddecda3159e78d67f07d84258c Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Thu, 21 May 2026 18:48:02 +0300 Subject: [PATCH] Add Alpine.js premium frontend dashboard and root routing --- backend/public/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/public/index.php b/backend/public/index.php index bf436a4..2adb344 100644 --- a/backend/public/index.php +++ b/backend/public/index.php @@ -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([