fix: Strict env enforcement, rock-solid Alpine portal rendering, and Nabeh/Redis test diagnostics

This commit is contained in:
Hamza-Ayed
2026-08-26 22:25:35 +03:00
parent 388944cbff
commit 1f024d0c30
10 changed files with 990 additions and 702 deletions
+3 -1
View File
@@ -36,7 +36,7 @@ $router->get('/teacher', function ($request, $response) {
$response->html(\App\Views\TeacherPortal::render());
});
// Health Check
// Health & Diagnostic Routes
$router->get('/api/health', function ($request, $response) {
$response->json([
'status' => 'success',
@@ -45,6 +45,8 @@ $router->get('/api/health', function ($request, $response) {
'time' => date('Y-m-d H:i:s')
]);
});
$router->get('/api/test/nabeh', [\App\Controllers\TestController::class, 'testNabeh']);
$router->get('/api/test/system', [\App\Controllers\TestController::class, 'testSystem']);
// OTP Authentication Routes (WhatsApp via Nabeh Gateway + Device Fingerprinting)
$router->post('/api/auth/otp/request', [\App\Controllers\AuthController::class, 'requestOtp'], [\App\Middlewares\RateLimitMiddleware::class]);