<?php

declare(strict_types=1);

/*
 * MagnoTracker admin front controller. Served only on ADMIN_HOST (nginx + Application host check).
 * Tracking traffic never reaches this file: tracking hosts use public/tracker.php.
 */

use App\Core\Application;

$root = dirname(__DIR__);
$autoload = $root . '/vendor/autoload.php';
if (!is_file($autoload)) {
    http_response_code(503);
    header('Content-Type: text/plain; charset=utf-8');
    echo "MagnoTracker is not installed: run `composer install --no-dev` in the repository root.\n";
    exit;
}
require $autoload;

Application::boot($root)->run();
