'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'svg' => 'image/svg+xml', 'ico' => 'image/x-icon', 'css' => 'text/css', 'js' => 'application/javascript', 'html' => 'text/html; charset=UTF-8', ]; if (isset($mimeTypes[$extension])) { header('Content-Type: ' . $mimeTypes[$extension]); readfile($filePath); exit; } } // 2. If requesting the feasibility presentation or homepage in browser if ($uri === '/' || $uri === '/feasibility' || $uri === '/docs') { $htmlDoc = __DIR__ . '/docs/uruk_project_feasibility_and_architecture.html'; if (file_exists($htmlDoc)) { header('Content-Type: text/html; charset=UTF-8'); readfile($htmlDoc); exit; } } // 2. Dispatch all API routes and gateway endpoints to backend/public/index.php $backendIndex = __DIR__ . '/backend/public/index.php'; if (file_exists($backendIndex)) { require_once $backendIndex; exit; } http_response_code(404); echo json_encode([ 'success' => false, 'error' => 'Core Backend Engine not found.', ]);