Deploy on 2026-06-06 12:04:41

This commit is contained in:
Hamza-Ayed
2026-06-06 12:04:41 +03:00
parent f468227019
commit ed60fa3ce2
5 changed files with 110 additions and 35 deletions

10
COMPANY_PROFILE.md Normal file
View File

@@ -0,0 +1,10 @@
# ملف الشركة الناشئة
* **الاسم**: Tripz
* **القطاع**: Mobility (التنقل)، تقنيات النقل، السفر
* **المرحلة**: Pre-seed
* **الدولة**: مصر (تستهدف التوسع في الشرق الأوسط وشمال أفريقيا)
* **الإيرادات**: في مرحلة مبكرة / بناء منتج عامل (MVP)
* **نوع التمويل المطلوب**: رأس مال جريء (VC)، منح (Grants)، مسرعات أعمال (Accelerators)
هذا الملف يستخدم لتحليل الفرص الاستثمارية وتحديد مدى توافقها (Fit Score) مع الشركة.

22
INVESTOR_PITCH_AR.md Normal file
View File

@@ -0,0 +1,22 @@
<div dir="rtl" lang="ar">
# منصة ScoutIQ: ذكاء استثماري متطور
**ScoutIQ** هي منصة متقدمة لذكاء المستثمرين (Investor Intelligence Platform) مصممة خصيصاً لسوق منطقة الشرق الأوسط وشمال أفريقيا (MENA).
### ما هي ScoutIQ؟
هي أداة تعتمد على الذكاء الاصطناعي لجمع وتحليل الفرص الاستثمارية بشكل آلي. تهدف المنصة إلى تزويد المستثمرين برؤى دقيقة ومدعومة بالبيانات لاتخاذ قرارات استثمارية مدروسة بسرعة وكفاءة عالية.
### لماذا ScoutIQ؟
1. **الذكاء الاصطناعي في صميم العمل:** نستخدم خوارزميات متطورة لتحليل السوق وتحديد الفرص الواعدة.
2. **الأتمتة والفعالية:** تقليل الوقت والجهد في البحث والتحليل اليدوي.
3. **جزء من منظومة متكاملة:** ScoutIQ ليست منتجاً معزولاً، بل هي جزء من منظومة تقنية شاملة تشمل منصات التنقل (Tripz, Intaleq)، ومنصة التحقق من الهوية (Musadeq)، ومنصة الأتمتة والذكاء الاصطناعي (Nabeeh).
4. **التوسع:** نركز على أسواق واعدة مثل مصر، سوريا، ومنطقة الشرق الأوسط عموماً.
### الرؤية الاستثمارية
نحن نبني بنية تحتية تقنية تمكن المستثمرين من استغلال البيانات لاتخاذ قرارات حاسمة في أسواق سريعة النمو.
---
**للمزيد من المعلومات والتواصل حول فرص الاستثمار، يرجى مراسلتنا عبر تليجرام.**
</div>

View File

@@ -23,24 +23,41 @@ class AiAnalyzer
*/ */
public function analyze(string $title, string $description): array public function analyze(string $title, string $description): array
{ {
$companyProfile = '';
$profilePath = __DIR__ . '/../../../COMPANY_PROFILE.md';
if (file_exists($profilePath)) {
$companyProfile = file_get_contents($profilePath);
}
if (!$this->apiKey) { if (!$this->apiKey) {
return $this->fallbackAnalysis($title, $description); return $this->fallbackAnalysis($title, $description);
} }
$prompt = <<<PROMPT $prompt = <<<PROMPT
You are ScoutIQ, an investor intelligence AI. Analyze the following startup/investment content and return a JSON object with: You are ScoutIQ, an investor intelligence AI. Analyze the following startup/investment content and evaluate its fit for our startup based on the provided company profile.
- "type": one of ["grant", "competition", "demo_day", "event", "partnership", "investment", "news", "other"]
- "opportunity_type": one of ["vc_funding", "accelerator", "incubator", "grant", "competition", "demo_day", "event", "partnership", "other"]
- "score": integer 0-100 (relevance to startups seeking funding)
- "tags": array of relevant tags (max 5)
- "is_opportunity": boolean (true if it's a funding/investment opportunity)
- "summary": 1-2 sentence summary in Arabic language of what this is, highlighting key strengths and contact/application info if present
- "organization_name": extracted organization name if any, or null
- "country": extracted country if any, or null
Company Profile:
{$companyProfile}
Content to Analyze:
Title: {$title} Title: {$title}
Description: {$description} Description: {$description}
Return a JSON object with EXACTLY these fields:
- "type": one of ["grant", "competition", "demo_day", "event", "partnership", "investment", "news", "other"]
- "opportunity_type": one of ["vc_funding", "accelerator", "incubator", "grant", "competition", "demo_day", "event", "partnership", "other"]
- "fit_score": integer 0-100 (Match score based on how well this opportunity fits the Company Profile: sector, stage, country, etc.)
- "tags": array of relevant tags (max 5)
- "is_opportunity": boolean (true if it's a funding/investment opportunity that is relevant to our profile)
- "summary": 1-2 sentence summary in Arabic of what this is
- "organization_name": extracted organization name if any, or null
- "country": extracted country if any, or null
- "why_it_matters": array of strings in Arabic (2-3 bullet points of why this is a good fit and why we should care)
- "requirements": array of strings in Arabic (2-3 bullet points of the most important requirements or eligibility criteria)
- "deadline": string (extracted deadline date, or null if not found)
- "effort": string (one of ["عالي", "متوسط", "منخفض"] depending on the effort required to apply)
- "potential_return": string (one of ["عالي", "متوسط", "منخفض"] depending on the value it brings)
Respond ONLY with valid JSON, no markdown, no code fences. Respond ONLY with valid JSON, no markdown, no code fences.
PROMPT; PROMPT;
@@ -264,12 +281,17 @@ PROMPT;
return [ return [
'type' => $type, 'type' => $type,
'opportunity_type' => $opportunityType, 'opportunity_type' => $opportunityType,
'score' => $score, 'fit_score' => $score,
'tags' => $tags, 'tags' => $tags,
'is_opportunity' => $isOpportunity, 'is_opportunity' => $isOpportunity,
'summary' => substr($description, 0, 200), 'summary' => substr($description, 0, 200),
'organization_name' => $orgName, 'organization_name' => $orgName,
'country' => $country, 'country' => $country,
'why_it_matters' => ['فرصة عامة'],
'requirements' => ['غير محدد'],
'deadline' => null,
'effort' => 'متوسط',
'potential_return' => 'متوسط',
]; ];
} }
} }

View File

@@ -250,7 +250,7 @@ class Collector
private function createOpportunity(array $entry, array $analysis, ?int $orgId, array $source): void private function createOpportunity(array $entry, array $analysis, ?int $orgId, array $source): void
{ {
try { try {
$score = min(100, max(0, $analysis['score'] ?? 10)); $score = min(100, max(0, $analysis['fit_score'] ?? $analysis['score'] ?? 10));
$stmt = $this->pdo->prepare( $stmt = $this->pdo->prepare(
"INSERT INTO opportunities (title, description, type, organization_id, url, status, score, raw_data) "INSERT INTO opportunities (title, description, type, organization_id, url, status, score, raw_data)
@@ -293,7 +293,7 @@ class Collector
$oppType = $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other'; $oppType = $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other';
$importantTypes = ['vc_funding', 'accelerator', 'incubator', 'grant', 'competition']; $importantTypes = ['vc_funding', 'accelerator', 'incubator', 'grant', 'competition'];
if ($score >= $minScore && in_array($oppType, $importantTypes)) { if ($score >= $minScore && in_array($oppType, $importantTypes) && !empty($analysis['is_opportunity'])) {
$orgName = ''; $orgName = '';
if ($orgId) { if ($orgId) {
$orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?"); $orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?");
@@ -304,10 +304,15 @@ class Collector
$this->notifier->notifyNewOpportunity([ $this->notifier->notifyNewOpportunity([
'title' => $entry['title'], 'title' => $entry['title'],
'type' => $oppType, 'type' => $oppType,
'score' => $score, 'fit_score' => $score,
'url' => $entry['url'], 'url' => $entry['url'],
'description' => $analysis['summary'] ?? $entry['description'], 'description' => $analysis['summary'] ?? $entry['description'],
'org_name' => $orgName, 'org_name' => $orgName,
'why_it_matters' => $analysis['why_it_matters'] ?? [],
'requirements' => $analysis['requirements'] ?? [],
'deadline' => $analysis['deadline'] ?? null,
'effort' => $analysis['effort'] ?? 'متوسط',
'potential_return' => $analysis['potential_return'] ?? 'متوسط',
]); ]);
} }
} }

View File

@@ -159,36 +159,52 @@ class TelegramNotifier
public function notifyNewOpportunity(array $opportunity): void public function notifyNewOpportunity(array $opportunity): void
{ {
$title = $opportunity['title'] ?? 'Untitled'; $title = $opportunity['title'] ?? 'Untitled';
$type = $opportunity['type'] ?? 'other'; $fitScore = $opportunity['fit_score'] ?? 0;
$score = $opportunity['score'] ?? 0;
$url = $opportunity['url'] ?? ''; $url = $opportunity['url'] ?? '';
$desc = $opportunity['description'] ?? '';
$orgName = $opportunity['org_name'] ?? ''; $orgName = $opportunity['org_name'] ?? '';
$whyItMatters = $opportunity['why_it_matters'] ?? [];
$requirements = $opportunity['requirements'] ?? [];
$deadline = $opportunity['deadline'] ?? null;
$effort = $opportunity['effort'] ?? 'متوسط';
$potentialReturn = $opportunity['potential_return'] ?? 'متوسط';
$typeTranslations = [ $effortEmoji = (str_contains($effort, 'عالي') || str_contains(strtolower($effort), 'high')) ? '🔴' : ((str_contains($effort, 'متوسط') || str_contains(strtolower($effort), 'medium')) ? '🟡' : '🟢');
'vc_funding' => 'تمويل رأس مال جريء (VC)', $returnEmoji = (str_contains($potentialReturn, 'عالي') || str_contains(strtolower($potentialReturn), 'high')) ? '🟢' : ((str_contains($potentialReturn, 'متوسط') || str_contains(strtolower($potentialReturn), 'medium')) ? '🟡' : '🔴');
'accelerator' => 'مسرعة أعمال (Accelerator)',
'incubator' => 'حاضنة أعمال (Incubator)',
'grant' => 'منحة (Grant)',
'competition' => 'مسابقة (Competition)',
'demo_day' => 'يوم عرض المشاريع (Demo Day)',
'event' => 'فعالية (Event)',
'partnership' => 'شراكة (Partnership)',
'other' => 'أخرى',
];
$translatedType = $typeTranslations[$type] ?? $type;
$message = "💡 *فرصة استثمارية جديدة:* {$title}\n\n"; $message = "💡 *ScoutIQ*\n\n";
$message .= "▪️ *النوع:* {$translatedType}\n"; $message .= "*{$title}*";
$message .= "▪️ *درجة الأهمية:* {$score}/100\n";
if ($orgName) { if ($orgName) {
$message .= "▪️ *الجهة:* {$orgName}\n"; $message .= " {$orgName}";
} }
if ($desc) {
$message .= "\n*الملخص ونقاط القوة:*\n_{$desc}_\n"; $message .= "\n\n🔥 *Match Score:* {$fitScore}/100\n";
if (!empty($whyItMatters)) {
$message .= "\n*لماذا تهمك؟*\n";
foreach ((array)$whyItMatters as $why) {
$message .= "{$why}\n";
} }
}
if (!empty($requirements)) {
$message .= "\n*المتطلبات:*\n";
foreach ((array)$requirements as $req) {
$message .= "{$req}\n";
}
}
if ($deadline) {
$message .= "\n*الموعد النهائي:*\n{$deadline}\n";
}
$message .= "\n*الجهد المطلوب:*\n{$effortEmoji} {$effort}\n";
$message .= "\n*العائد المحتمل:*\n{$returnEmoji} {$potentialReturn}\n";
$message .= "\n*الإجراء:*\n";
if ($url) { if ($url) {
$message .= "\n🔗 [رابط التقديم والتواصل]({$url})"; $message .= "[قدم الآن]({$url})";
} else {
$message .= "لا يوجد رابط متاح";
} }
$this->send($message, 'opportunity'); $this->send($message, 'opportunity');