first commit

This commit is contained in:
Claudecio Martins
2026-06-16 10:04:10 -03:00
commit a951944997
4463 changed files with 419677 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
RewriteEngine On
# Se for arquivo ou pasta real, deixa passar
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Tudo vai pro controller
RewriteRule ^ index.php [L,QSA]
</IfModule>
+52
View File
@@ -0,0 +1,52 @@
<?php
// Importa autoload do Composer
require_once realpath(path: __DIR__ . '/../vendor/autoload.php');
use Dotenv\Dotenv;
use KrothiumAPI\KrothiumAPI;
use KrothiumAPI\Http\Router;
// Carrega variáveis de ambiente
$dotenv = Dotenv::createImmutable(paths: realpath(path: __DIR__ . '/../'));
$dotenv->load();
// ======================================
// Inicializa KrothiumAPI com configs
// ======================================
KrothiumAPI::init(config: [
'errors' => [
'error_log' => realpath(path: __DIR__ . '/../storage/Logs/php-error.log'),
],
'constants' => [
'APP_SYS_MODE' => 'DEV', // DEV | PROD
'ROOT_SYSTEM_PATH' => realpath(path: __DIR__ . "/.."),
'INI_SYSTEM_PATH' => realpath(path: __DIR__ . "/../src"),
'MODULE_PATH' => realpath(path: __DIR__ . "/../src/Module"),
'STORAGE_FOLDER_PATH' => realpath(path: __DIR__ . "/../storage"),
'ROUTER_ALLOWED_ORIGINS' => [
'*'
]
],
'system' => [
'enable_session' => true,
'default_timezone' => 'America/Fortaleza',
],
'logger' => [
'driver' => 'FILE',
'logDir' => realpath(path: __DIR__ . '/../storage/Logs')
]
]);
// Importa Rotas da v0
Router::group(
prefix: '/v0',
callback: function() {
require_once realpath(path: __DIR__ . '/../app/Module/v0/Auth/Routes/Routes.php');
require_once realpath(path: __DIR__ . '/../app/Module/v0/Contato/Routes/Routes.php');
}
);
// ============================
// Dispara o roteador
// ============================
KrothiumAPI::routerDispatch();