From 0657296c38173056d2a3485082e104aa019e845e Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 5 Jun 2026 17:24:21 +0300 Subject: [PATCH] Deploy on 2026-06-05 17:24:21 --- AI_CONTEXT.md | 64 ++++++++++++++++ INVESTMENT_CONTEXT.md | 54 +++++++++++++ METRICS_CONTEXT.md | 76 +++++++++++++++++++ PROJECTS_CONTEXT.md | 68 +++++++++++++++++ app/Services/Crawler/AiAnalyzer.php | 4 +- app/Services/Crawler/Collector.php | 34 +++++---- .../Notification/TelegramNotifier.php | 32 ++++++-- database/seeds/DatabaseSeeder.php | 1 + 8 files changed, 311 insertions(+), 22 deletions(-) create mode 100644 AI_CONTEXT.md create mode 100644 INVESTMENT_CONTEXT.md create mode 100644 METRICS_CONTEXT.md create mode 100644 PROJECTS_CONTEXT.md diff --git a/AI_CONTEXT.md b/AI_CONTEXT.md new file mode 100644 index 0000000..77474ec --- /dev/null +++ b/AI_CONTEXT.md @@ -0,0 +1,64 @@ +# AI_CONTEXT + +## Important Product Definitions + +Tripz = Egypt mobility platform. +Intaleq = Syria mobility platform. + +Do not confuse the two products. + +Musadeq = Identity Verification Platform. +Nabeeh = AI Employee and Automation Platform. +ScoutIQ = Investor Intelligence Platform. +Mapping Engine = Internal Geospatial Infrastructure. + +## Founder Skills + +- Flutter +- PHP +- Python +- Node.js +- MySQL +- Redis +- Nginx +- Linux +- Cybersecurity +- AI Integration + +## AI Instructions + +When generating: +- Business plans +- Technical architecture +- Investor documents +- Product strategy +- Marketing plans + +Assume: +- Products are real and under development. +- Technology stack exists. +- Founder is highly technical and can build internally. + +Focus on: +- Scalability +- Monetization +- Automation +- AI Integration +- Operational Efficiency + +## Official URLs + +Tripz: +https://tripz-egypt.com + +Tripz Investment: +https://tripz-egypt.com/investment/ + +Intaleq: +https://intaleqapp.com + +Intaleq Code: +https://intaleqapp.com/intaleq_code/index.html + +ScoutIQ: +https://scoutiq.intaleqapp.com diff --git a/INVESTMENT_CONTEXT.md b/INVESTMENT_CONTEXT.md new file mode 100644 index 0000000..a8a6b92 --- /dev/null +++ b/INVESTMENT_CONTEXT.md @@ -0,0 +1,54 @@ +# INVESTMENT_CONTEXT + +## Company Vision + +Build a technology ecosystem combining: +- Mobility +- AI Automation +- Identity Verification +- Geospatial Infrastructure +- Investor Intelligence + +## Current Products +- Tripz +- Intaleq +- Musadeq +- Nabeeh +- ScoutIQ +- Mapping Engine + +## Competitive Advantages +- Founder-built technology stack +- Shared infrastructure across products +- AI-first approach +- Internal automation capabilities +- Local market adaptation + +## Funding Section (Update Regularly) + +Investment Raised To Date: +[TBD] + +Current Round: +[TBD] + +Target Raise: +[TBD] + +Use Of Funds: +- Product Development +- Market Expansion +- Marketing +- Operations +- Hiring + +## Key Risks +- Capital requirements +- Market competition +- User acquisition costs +- Regulatory changes + +## Expansion Targets +- Egypt +- Syria +- MENA diff --git a/METRICS_CONTEXT.md b/METRICS_CONTEXT.md new file mode 100644 index 0000000..b16a381 --- /dev/null +++ b/METRICS_CONTEXT.md @@ -0,0 +1,76 @@ +# METRICS_CONTEXT + +Last Updated: __________ + +## Tripz + +Registered Drivers: +[TBD] + +Active Drivers: +[TBD] + +Registered Riders: +[TBD] + +Completed Trips: +[TBD] + +Monthly Trips: +[TBD] + +Monthly Revenue: +[TBD] + +Monthly Expenses: +[TBD] + +## Intaleq + +Registered Drivers: +[TBD] + +Active Drivers: +[TBD] + +Registered Riders: +[TBD] + +Completed Trips: +[TBD] + +Monthly Trips: +[TBD] + +Monthly Revenue: +[TBD] + +Monthly Expenses: +[TBD] + +## Musadeq + +Users: +0 (or update later) + +Revenue: +[TBD] + +## Nabeeh + +Users: +0 (or update later) + +Revenue: +[TBD] + +## ScoutIQ + +Tracked Investors: +[TBD] + +Tracked Accelerators: +[TBD] + +Tracked Opportunities: +[TBD] diff --git a/PROJECTS_CONTEXT.md b/PROJECTS_CONTEXT.md new file mode 100644 index 0000000..f56a02e --- /dev/null +++ b/PROJECTS_CONTEXT.md @@ -0,0 +1,68 @@ +# PROJECTS_CONTEXT + +## Founder +Hamza Ayed + +## Ecosystem Overview +This ecosystem consists of mobility, AI, verification, geospatial, and investor-intelligence products. + +## Tripz +Website: https://tripz-egypt.com +Investment Page: https://tripz-egypt.com/investment/ + +Country: Egypt +Category: Ride Hailing / Mobility + +Description: +Tripz is a ride-hailing platform focused on the Egyptian market with AI-assisted operations, driver management, wallet infrastructure, and transportation services. + +## Intaleq +Website: https://intaleqapp.com +Developer Portal: https://intaleqapp.com/intaleq_code/index.html + +Country: Syria +Category: Ride Hailing / Mobility + +Description: +Transportation platform tailored to the Syrian market. + +## Musadeq +Category: Identity Verification + +Description: +AI-powered document and identity verification platform. + +Status: +Technology developed. +No public adoption metrics available yet. + +## Nabeeh +Category: AI Employee / Automation + +Description: +AI-powered automation platform capable of onboarding, support, workflows, and ecommerce integrations. + +Status: +Technology developed. +No public adoption metrics available yet. + +## ScoutIQ +Domain: +https://scoutiq.intaleqapp.com + +Category: +Investor Intelligence Platform + +Description: +Discovers investors, accelerators, grants, partnerships, startup programs, and opportunities. + +## Mapping Engine +Category: +Geospatial Infrastructure + +Capabilities: +- Routing +- Geocoding +- Reverse Geocoding +- Driver Positioning +- Location Intelligence diff --git a/app/Services/Crawler/AiAnalyzer.php b/app/Services/Crawler/AiAnalyzer.php index 405d378..677d166 100644 --- a/app/Services/Crawler/AiAnalyzer.php +++ b/app/Services/Crawler/AiAnalyzer.php @@ -34,7 +34,7 @@ You are ScoutIQ, an investor intelligence AI. Analyze the following startup/inve - "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 of what this is +- "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 @@ -78,7 +78,7 @@ Extract organization/investor information from this text. Return JSON: - "type": one of ["vc", "angel", "accelerator", "incubator", "venture_studio", "partner", "other"] or null - "country": country name or null - "website": website URL or null -- "description": brief description max 200 chars +- "description": brief description max 200 chars in Arabic language Text: {$text} diff --git a/app/Services/Crawler/Collector.php b/app/Services/Crawler/Collector.php index 4374aab..51bfe47 100644 --- a/app/Services/Crawler/Collector.php +++ b/app/Services/Crawler/Collector.php @@ -289,21 +289,27 @@ class Collector // Trigger Telegram notification if enabled if ($this->getSetting('telegram_enabled') === '1') { - $orgName = ''; - if ($orgId) { - $orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?"); - $orgStmt->execute([$orgId]); - $orgName = $orgStmt->fetchColumn() ?: ''; + $minScore = (int)($this->getSetting('telegram_min_score') ?: 75); + $oppType = $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other'; + $importantTypes = ['vc_funding', 'accelerator', 'incubator', 'grant', 'competition']; + + if ($score >= $minScore && in_array($oppType, $importantTypes)) { + $orgName = ''; + if ($orgId) { + $orgStmt = $this->pdo->prepare("SELECT name FROM organizations WHERE id = ?"); + $orgStmt->execute([$orgId]); + $orgName = $orgStmt->fetchColumn() ?: ''; + } + $this->notifier->loadSettings(); + $this->notifier->notifyNewOpportunity([ + 'title' => $entry['title'], + 'type' => $oppType, + 'score' => $score, + 'url' => $entry['url'], + 'description' => $analysis['summary'] ?? $entry['description'], + 'org_name' => $orgName, + ]); } - $this->notifier->loadSettings(); - $this->notifier->notifyNewOpportunity([ - 'title' => $entry['title'], - 'type' => $analysis['opportunity_type'] ?? $analysis['type'] ?? 'other', - 'score' => $score, - 'url' => $entry['url'], - 'description' => $analysis['summary'] ?? $entry['description'], - 'org_name' => $orgName, - ]); } } catch (Throwable $e) { diff --git a/app/Services/Notification/TelegramNotifier.php b/app/Services/Notification/TelegramNotifier.php index 6e06564..9a814c4 100644 --- a/app/Services/Notification/TelegramNotifier.php +++ b/app/Services/Notification/TelegramNotifier.php @@ -162,14 +162,34 @@ class TelegramNotifier $type = $opportunity['type'] ?? 'other'; $score = $opportunity['score'] ?? 0; $url = $opportunity['url'] ?? ''; - $desc = mb_substr($opportunity['description'] ?? '', 0, 200); + $desc = $opportunity['description'] ?? ''; $orgName = $opportunity['org_name'] ?? ''; - $message = "*New Opportunity:* {$title}\n"; - $message .= "*Type:* {$type} | *Score:* {$score}/100\n"; - if ($orgName) $message .= "*Organization:* {$orgName}\n"; - if ($desc) $message .= "_{$desc}_\n"; - if ($url) $message .= "\n[Open Link]({$url})"; + $typeTranslations = [ + 'vc_funding' => 'تمويل رأس مال جريء (VC)', + '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 .= "▪️ *النوع:* {$translatedType}\n"; + $message .= "▪️ *درجة الأهمية:* {$score}/100\n"; + if ($orgName) { + $message .= "▪️ *الجهة:* {$orgName}\n"; + } + if ($desc) { + $message .= "\n*الملخص ونقاط القوة:*\n_{$desc}_\n"; + } + if ($url) { + $message .= "\n🔗 [رابط التقديم والتواصل]({$url})"; + } $this->send($message, 'opportunity'); } diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index e47d9d7..856bb09 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -91,6 +91,7 @@ class DatabaseSeeder ['key' => 'crawler_interval_hours', 'value' => '24', 'description' => 'Delay between crawler runs.'], ['key' => 'crawler_max_new_per_feed', 'value' => '5', 'description' => 'Maximum new opportunities to process per feed in a single run.'], ['key' => 'crawler_max_new_total', 'value' => '100', 'description' => 'Maximum total new opportunities to process in a single collector run.'], + ['key' => 'telegram_min_score', 'value' => '75', 'description' => 'Minimum opportunity score to trigger Telegram notifications.'], ]; foreach ($settings as $setting) {