Health & Diagnostics API
Spesifikasi endpoint /api/health dan /api/ai/health untuk liveness & readiness checks.
Status: Stablev1.0.0Source Verified: Yes
Source:
src/app/api/health/route.ts, src/app/api/ai/health/route.tsTests: tests/unit/aiHealth.test.tsHealth & Diagnostics API#
Endpoint diagnostik digunakan oleh load balancer, monitoring tool, dan antarmuka administrator untuk memeriksa kesiapan setiap komponen sistem.
1. GET /api/health#
Endpoint agregator kesehatan utama sistem OrthoBreath yang memeriksa ketersediaan Firebase Admin, AI Backend, dan Storage.
HTTP Request#
http
http
1GET /api/health HTTP/1.12Host: orthobreath.vercel.app3Accept: application/json
Response 200 OK:#
json
json
1{2 "status": "ok",3 "version": "1.0.0",4 "mode": "standard",5 "scope": "early-screening-not-diagnosis",6 "pwa": {7 "installable": true,8 "offlineClinicalData": false,9 "serviceWorker": "/sw.js"10 },11 "services": {12 "firebase": { "status": "ok" },13 "ai": { "status": "ok", "detail": "Model 1.0.0 siap" },14 "storage": { "status": "cloud_provider" }15 },16 "timestamp": "2026-08-19T05:45:00.000Z"17}
2. GET /api/ai/health#
Endpoint khusus untuk memeriksa status koneksi ke Render FastAPI Inference Service.
Response 200 OK:#
json
json
1{2 "status": "healthy",3 "aiEngine": {4 "status": "ok",5 "modelVersion": "1.0.0",6 "expectedFeatures": 26244,7 "modelLoaded": true,8 "scalerLoaded": true9 }10}