<?php
declare(strict_types=1);

/**
 * SiteTracker V16 — front controller.
 * Only file in the webroot. Boots config + autoload, starts session, dispatches.
 */

define('ST_START', microtime(true));
define('ROOT', dirname(__DIR__));
define('DS', DIRECTORY_SEPARATOR);

require ROOT . '/vendor/autoload.php';
require ROOT . '/config/bootstrap.php';

\Core\Session::start();

$path = $_SERVER['PATH_INFO'] ?? ($_SERVER['REQUEST_URI'] ?? '/');
\Core\Router::dispatch($path);
