Deploy on 2026-06-05 17:32:29

This commit is contained in:
Hamza-Ayed
2026-06-05 17:32:29 +03:00
parent 0657296c38
commit e5074451af
6 changed files with 25 additions and 119 deletions

View File

@@ -25,7 +25,7 @@ abstract class Controller
}
// Automatically inject current language, translation array, and authenticated user
$lang = $this->session->get('lang', 'en');
$lang = 'ar';
$langFile = __DIR__ . "/../../resources/lang/{$lang}.php";
$t = file_exists($langFile) ? require $langFile : [];
$user = \App\Core\App::$app->request->routeParam('_authenticated_user');

View File

@@ -1,95 +0,0 @@
<?php
return [
'dashboard' => 'Dashboard',
'organizations' => 'Organizations',
'contacts' => 'Contacts',
'opportunities' => 'Opportunities',
'sources' => 'Data Sources',
'settings' => 'Settings',
'logout' => 'Logout',
'welcome' => 'Welcome',
'add' => 'Add',
'edit' => 'Edit',
'delete' => 'Delete',
'save' => 'Save',
'cancel' => 'Cancel',
'search' => 'Search',
'filter' => 'Filter',
'name' => 'Name',
'type' => 'Type',
'status' => 'Status',
'country' => 'Country',
'city' => 'City',
'url' => 'URL',
'description' => 'Description',
'score' => 'Score',
'created' => 'Created',
'updated' => 'Updated',
'actions' => 'Actions',
'no_data' => 'No data',
'total_organizations' => 'Total Organizations',
'total_opportunities' => 'Total Opportunities',
'total_contacts' => 'Total Contacts',
'active_sources' => 'Active Sources',
'today_opportunities' => "Today's Opportunities",
'vc_funds' => 'VC Funds',
'accelerators' => 'Accelerators',
'recent_opportunities' => 'Recent Opportunities',
'recent_activities' => 'Recent Activities',
'view_all' => 'View All',
'run_collector' => 'Run Collector',
'last_collected' => 'Last Collected',
'platform_mode' => 'Platform Mode',
'local' => 'Local',
'production' => 'Production',
'email' => 'Email',
'phone' => 'Phone',
'position' => 'Position',
'notes' => 'Notes',
'interactions' => 'Interactions',
'add_interaction' => 'Add Interaction',
'log_interaction' => 'Log Interaction',
'call' => 'Call',
'meeting' => 'Meeting',
'applications' => 'Applications',
'tags' => 'Tags',
'deadline' => 'Deadline',
'amount' => 'Amount',
'funding_stage' => 'Funding Stage',
'crm_status' => 'CRM Status',
'domain' => 'Domain',
'website' => 'Website',
'run' => 'Run',
'save_source' => 'Save Source',
'add_source' => 'Add Source',
'telegram_notifications' => 'Telegram Notifications',
'telegram_bot_token' => 'Bot Token',
'telegram_chat_id' => 'Chat ID',
'telegram_enabled' => 'Enable Notifications',
'test_notification' => 'Send Test',
'language' => 'Language',
'arabic' => 'العربية',
'english' => 'English',
'title' => 'Title',
'grant' => 'Grants',
'competition' => 'Competitions',
'demo_day' => 'Demo Days',
'event' => 'Events',
'partnership' => 'Partnerships',
'investment' => 'Investments',
'other' => 'Other',
'ingested_opportunities' => 'Ingested Opportunities',
'interactions_logged' => 'Interactions Logged',
'today_contacts' => 'Contacts Added Today',
'today_orgs' => 'new organizations',
'telegram_chat_id_hint' => 'Note: If sending to a Telegram channel or group, you must add the bot as an Administrator with message post permissions.',
'recent_activities' => 'Recent Activities',
'recent_opportunities' => 'Recent Opportunities',
'platform_intro_title' => 'ScoutIQ - AI-Powered Investor Intelligence',
'platform_intro_desc' => 'ScoutIQ is an automated intelligence platform designed to discover, track, and score early-stage startups, venture capital funds, and accelerators. The system collects data from feeds, analyzes them using Gemini AI, and updates your CRM pipeline.',
'desc_organizations' => 'Track VC funds, accelerator cohorts, and angel investor profiles with deep metadata.',
'desc_opportunities' => 'AI-discovered investment programs, funding grants, competitions, and startup events.',
'desc_crm' => 'Manage contact profiles, schedule meetings, log email interactions, and track deals.',
'desc_sources' => 'Configure RSS and API feeds to automatically scan ecosystems for early signals.',
];

View File

@@ -1,19 +1,19 @@
<div class="glass-panel" style="width: 100%; max-width: 440px; padding: 40px; display: flex; flex-direction: column; gap: 30px;">
<div style="text-align: center; display: flex; flex-direction: column; gap: 10px;">
<h1 style="font-size: 2.2rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">ScoutIQ</h1>
<p style="color: var(--text-muted); font-size: 0.95rem;">AI-powered Investor Intelligence</p>
<p style="color: var(--text-muted); font-size: 0.95rem;">الاستكشاف الذكي للمستثمرين بالذكاء الاصطناعي</p>
</div>
<?php if ($flashError = $this->session->getFlash('error')): ?>
<div class="alert alert-error">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 10px;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-left: 10px;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
<span><?= $this->escape($flashError) ?></span>
</div>
<?php endif; ?>
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
<div class="alert alert-success">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 10px;"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-left: 10px;"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
<span><?= $this->escape($flashSuccess) ?></span>
</div>
<?php endif; ?>
@@ -22,19 +22,19 @@
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
<div class="form-group">
<label class="form-label" for="email">Email Address</label>
<label class="form-label" for="email">البريد الإلكتروني</label>
<input type="email" name="email" id="email" class="form-control" placeholder="name@domain.com" required autocomplete="username">
</div>
<div class="form-group">
<label class="form-label" for="password">Password</label>
<label class="form-label" for="password">كلمة المرور</label>
<input type="password" name="password" id="password" class="form-control" placeholder="••••••••" required autocomplete="current-password">
</div>
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 10px;">Sign In</button>
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 10px;">تسجيل الدخول</button>
</form>
<div style="text-align: center; font-size: 0.9rem; color: var(--text-muted);">
Don't have an account? <a href="/register" style="font-weight: 600;">Sign Up</a>
ليس لديك حساب؟ <a href="/register" style="font-weight: 600;">إنشاء حساب</a>
</div>
</div>

View File

@@ -1,12 +1,12 @@
<div class="glass-panel" style="width: 100%; max-width: 440px; padding: 40px; display: flex; flex-direction: column; gap: 30px;">
<div style="text-align: center; display: flex; flex-direction: column; gap: 10px;">
<h1 style="font-size: 2.2rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">Create Account</h1>
<p style="color: var(--text-muted); font-size: 0.95rem;">Join ScoutIQ Investor Platform</p>
<h1 style="font-size: 2.2rem; font-weight: 800; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">إنشاء حساب</h1>
<p style="color: var(--text-muted); font-size: 0.95rem;">انضم إلى منصة استخبارات المستثمرين ScoutIQ</p>
</div>
<?php if ($flashError = $this->session->getFlash('error')): ?>
<div class="alert alert-error">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 10px;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-left: 10px;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
<span><?= $this->escape($flashError) ?></span>
</div>
<?php endif; ?>
@@ -15,24 +15,24 @@
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
<div class="form-group">
<label class="form-label" for="name">Full Name</label>
<label class="form-label" for="name">الاسم الكامل</label>
<input type="text" name="name" id="name" class="form-control" placeholder="John Doe" required autocomplete="name">
</div>
<div class="form-group">
<label class="form-label" for="email">Email Address</label>
<label class="form-label" for="email">البريد الإلكتروني</label>
<input type="email" name="email" id="email" class="form-control" placeholder="name@domain.com" required autocomplete="username">
</div>
<div class="form-group">
<label class="form-label" for="password">Password</label>
<label class="form-label" for="password">كلمة المرور</label>
<input type="password" name="password" id="password" class="form-control" placeholder="••••••••" required autocomplete="new-password">
</div>
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 10px;">Create Account</button>
<button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 10px;">إنشاء حساب</button>
</form>
<div style="text-align: center; font-size: 0.9rem; color: var(--text-muted);">
Already have an account? <a href="/login" style="font-weight: 600;">Sign In</a>
لديك حساب بالفعل؟ <a href="/login" style="font-weight: 600;">تسجيل الدخول</a>
</div>
</div>

View File

@@ -86,13 +86,6 @@
</nav>
<div class="nav-menu">
<!-- Language Toggle -->
<li class="nav-item">
<a href="/admin/lang/<?= ($lang ?? 'en') === 'ar' ? 'en' : 'ar' ?>" style="color: var(--accent);">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
<span><?= ($lang ?? 'en') === 'ar' ? 'English' : 'العربية' ?></span>
</a>
</li>
<li class="nav-item">
<a href="/logout" style="color: var(--error);">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>

View File

@@ -1,10 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $this->escape($title ?? 'Auth') ?> - ScoutIQ</title>
<link rel="stylesheet" href="/assets/css/app.css">
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap" rel="stylesheet">
<style>
body { font-family: 'Tajawal', sans-serif; text-align: right; }
.form-group { text-align: right; }
.form-label { text-align: right; display: block; }
.form-control { text-align: right; }
.alert { text-align: right; flex-direction: row-reverse; }
</style>
</head>
<body>
<div style="flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px;">