Complete Phase 1: MVC, DB migrations, Auth, RBAC, Security, and Views

This commit is contained in:
Hamza-Ayed
2026-06-05 00:56:41 +03:00
parent 7ffbc8bafa
commit bed7624ae9
51 changed files with 3295 additions and 0 deletions

13
config/ai.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
return [
'gemini' => [
'api_key' => ($_ENV['GEMINI_API_KEY'] === 'null' || !$_ENV['GEMINI_API_KEY']) ? null : $_ENV['GEMINI_API_KEY'],
'model' => 'gemini-flash-lite-latest',
],
'jwt' => [
'secret' => $_ENV['JWT_SECRET'] ?? 'base64:3uFzGf9o8+D+U0mC4/3K1y4m81Qj7G6qTzS=',
'algorithm' => 'HS256',
'expires_in' => 86400 * 30, // 30 days
],
];

11
config/app.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
return [
'name' => $_ENV['APP_NAME'] ?? 'ScoutIQ',
'env' => $_ENV['APP_ENV'] ?? 'production',
'debug' => filter_var($_ENV['APP_DEBUG'] ?? false, FILTER_VALIDATE_BOOLEAN),
'url' => $_ENV['APP_URL'] ?? 'https://scoutiq.intaleqapp.com',
'key' => $_ENV['APP_KEY'] ?? 'base64:3uFzGf9o8+D+U0mC4/3K1y4m81Qj7G6qTzS=',
'timezone' => 'Asia/Riyadh',
'log_path' => __DIR__ . '/../storage/logs/app.log',
];

11
config/database.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
return [
'host' => $_ENV['DB_HOST'] ?? '127.0.0.1',
'port' => $_ENV['DB_PORT'] ?? '3306',
'database' => $_ENV['DB_DATABASE'] ?? 'scoutDb',
'username' => $_ENV['DB_USERNAME'] ?? 'scoutUser',
'password' => $_ENV['DB_PASSWORD'] ?? '',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
];

27
config/mail.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
return [
'default' => $_ENV['MAIL_MAILER'] ?? 'smtp',
'mailers' => [
'smtp' => [
'host' => $_ENV['MAIL_HOST'] ?? '127.0.0.1',
'port' => (int)($_ENV['MAIL_PORT'] ?? 2525),
'username' => ($_ENV['MAIL_USERNAME'] === 'null' || !$_ENV['MAIL_USERNAME']) ? null : $_ENV['MAIL_USERNAME'],
'password' => ($_ENV['MAIL_PASSWORD'] === 'null' || !$_ENV['MAIL_PASSWORD']) ? null : $_ENV['MAIL_PASSWORD'],
],
'resend' => [
'key' => ($_ENV['RESEND_API_KEY'] === 'null' || !$_ENV['RESEND_API_KEY']) ? null : $_ENV['RESEND_API_KEY'],
],
'ses' => [
'key' => ($_ENV['AWS_ACCESS_KEY_ID'] === 'null' || !$_ENV['AWS_ACCESS_KEY_ID']) ? null : $_ENV['AWS_ACCESS_KEY_ID'],
'secret' => ($_ENV['AWS_SECRET_ACCESS_KEY'] === 'null' || !$_ENV['AWS_SECRET_ACCESS_KEY']) ? null : $_ENV['AWS_SECRET_ACCESS_KEY'],
'region' => $_ENV['AWS_DEFAULT_REGION'] ?? 'us-east-1',
],
],
'from' => [
'address' => $_ENV['MAIL_FROM_ADDRESS'] ?? 'info@scoutiq.intaleqapp.com',
'name' => $_ENV['MAIL_FROM_NAME'] ?? 'ScoutIQ',
],
];

7
config/redis.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
return [
'host' => $_ENV['REDIS_HOST'] ?? '127.0.0.1',
'port' => (int)($_ENV['REDIS_PORT'] ?? 6379),
'password' => ($_ENV['REDIS_PASSWORD'] === 'null' || !$_ENV['REDIS_PASSWORD']) ? null : $_ENV['REDIS_PASSWORD'],
];