<?php
require_once __DIR__.'/../../config.php';
require_once __DIR__ . '/../../engine/Kernel.php';
Kernel::handle(['auth' => false, 'public' => true]);
require_once __DIR__ . '/../../engine/Logger.php';
require_once __DIR__.'/../../engine/InvestmentEngine.php';
$status = preg_replace('/[^a-z]/','',$_GET['status']??'active');
$model  = preg_replace('/[^a-z]/','',$_GET['model']??'');
$projects = InvestmentEngine::getProjects($status,$model);
echo json_encode(['ok'=>true,'data'=>$projects], JSON_UNESCAPED_UNICODE);
