Complete MVP implementation including: - PHP 8.4 backend with Front Controller pattern (80+ API endpoints) - Multi-tenant architecture with organization_id isolation - JWT authentication (HS256, 2h access + 7d refresh tokens) - 14 controllers: Auth, Organization, Assessment, Dashboard, Risk, Incident, Policy, SupplyChain, Training, Asset, Audit, Admin - AI Service integration (Anthropic Claude API) for gap analysis, risk suggestions, policy generation, incident classification - NIS2 gap analysis questionnaire (~80 questions, 10 categories) - MySQL schema (20 tables) with NIS2 Art. 21 compliance controls - NIS2 Art. 23 incident reporting workflow (24h/72h/30d) - Frontend: login, register, dashboard, assessment wizard, org setup - Docker configuration (PHP-FPM + Nginx + MySQL) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
690 B
PHP
30 lines
690 B
PHP
<?php
|
|
/**
|
|
* NIS2 Agile - Health Check
|
|
*/
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
$status = [
|
|
'status' => 'ok',
|
|
'app' => 'NIS2 Agile',
|
|
'version' => '1.0.0',
|
|
'timestamp' => date('c'),
|
|
'checks' => [],
|
|
];
|
|
|
|
// Database check
|
|
try {
|
|
require_once __DIR__ . '/../application/config/config.php';
|
|
require_once __DIR__ . '/../application/config/database.php';
|
|
|
|
Database::fetchOne('SELECT 1');
|
|
$status['checks']['database'] = 'ok';
|
|
} catch (Throwable $e) {
|
|
$status['checks']['database'] = 'error';
|
|
$status['status'] = 'degraded';
|
|
}
|
|
|
|
http_response_code($status['status'] === 'ok' ? 200 : 503);
|
|
echo json_encode($status, JSON_PRETTY_PRINT);
|