diff --git a/background.js b/background.js index 5c7aa4e..d9ddabb 100644 --- a/background.js +++ b/background.js @@ -17,7 +17,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { // ─── Core API call ─────────────────────────────────────────────────────────── -async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText', jobDescription = '', jobTitle = '', postText = '' }) { +async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText', jobDescription = '', jobTitle = '', postText = '', template = 'default' }) { // Rate limit check const canProceed = await checkRateLimit(); if (!canProceed) { @@ -47,7 +47,8 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText prompt: trimmedPrompt, jobDescription: jobDescription, jobTitle: jobTitle, - postText: postText + postText: postText, + template: template }) }); diff --git a/content.js b/content.js index 97edcd0..3a47648 100644 --- a/content.js +++ b/content.js @@ -535,7 +535,8 @@ apiKey: settings.apiKey, jobDescription: jobData.description, jobTitle: jobData.jobTitle || 'Job', - action: 'generatePdf' + action: 'generatePdf', + template: 'amman' } }, resolve); }); diff --git a/cv_market_analysis.md b/cv_market_analysis.md new file mode 100644 index 0000000..d21d2e2 --- /dev/null +++ b/cv_market_analysis.md @@ -0,0 +1,192 @@ +# تحليل سوق عمّان — استراتيجية الـ CV + +## نظرة عامة على السوق + +### شركات التكنولوجيا المحلية في عمّان (Target Companies) + +| الشركة | المجال | الـ Stack الشائع | المسمى الوظيفي المناسب | +|--------|--------|-----------------|----------------------| +| Mawdoo3 | محتوى/AI | PHP, Python, Node.js, AWS | Senior Backend Engineer / Tech Lead | +| Abwaab | EdTech | Node.js, React, PostgreSQL, AWS | Lead Backend Engineer | +| OpenSooq | Classifieds | PHP, MySQL, Redis, AWS | Senior Backend Developer | +| ArabiaWeather | GIS/Data | Python, GIS, APIs | GIS/Backend Developer | +| Liwwa | FinTech | Node.js, Python, PostgreSQL | Senior Backend Engineer | +| JoPACC | FinTech/Payments | Java, Node.js, APIs | Systems Engineer | +| ZenHR | HR Tech/SaaS | PHP, Node.js, MySQL | Senior Software Engineer | +| Atypon | Publishing | Java, Node.js, AWS | Senior Engineer | + +### ماذا تبحث عنه شركات عمّان في الـ CV؟ + +1. **التسليم والتنفيذ (Delivery over Design):** يريدون شخص يبني وينفذ، مش بس يرسم architecture diagrams +2. **الاستمرارية (Retention):** الخوف الأكبر: "هل حيتركنا ويروح عالخليج؟" +3. **العمل الجماعي (Team Player):** يريدون شخص يشتغل مع فريق، يمنتور junior developers +4. **التكلفة (Cost-Conscious):** يحبوا أرقام التوفير — $10K/month قصة قوية +5. **اللغة (Bilingual):** ثنائية اللغة ميزة تنافسية كبيرة +6. **السوق المحلي (Local Market):** فهم السوق الأردني والعربي مهم +7. **الـ Stack المطلوب:** PHP, Node.js, PostgreSQL, AWS, Docker — مش GIS ولا ride-hailing + +--- + +## المشكلة الأساسية مع الـ CV الحالي + +### ١. العنوان والـ Positioning + +**الحالي:** "Solutions Architect" — هذا عنوان شركات enterprise في الخليج وأوروبا. شركة عمّان ما بتوظف Solutions Architect. بتوظف Senior Backend Engineer أو Tech Lead. + +**المطلوب:** استبدال كل mentions الـ "Solutions Architect" بـ: `Senior Backend Engineer & Technical Lead` أو `Lead Backend Engineer — Distributed Systems` حسب الوظيفة. + +### ٢. قصة الـ Founder/CTO + +**المشكلة:** الـ CV الحالي بيحكي قصة "أنا بنيت شركتين" مش "أنا مهندس ممكن أضيف قيمة لشركتكم." + +**الحل:** إعادة صياغة التجربة كلغة delivery و engineering، مش founding: +- ❌ "CTO & Technical Architect — Intaleq" +- ✅ "Technical Lead & Backend Engineer — Intaleq" + +- ❌ "Founding Engineer & Lead Backend Architect — Tripz Egypt" +- ✅ "Lead Backend Engineer — Tripz Egypt" + +- ❌ "Co-founded and architected..." +- ✅ "Built and scaled..." + +### ٣. الـ AI Claim + +**الحالي:** عنوان "AI Solutions Architect" مع إن الـ AI experience محدود بـ LLM API integration. + +**الحل:** +- حذف "AI" من الـ positioning الأساسي +- ذكر الـ AI tools كمهارة إضافية، مش كتخصص +- إعادة تسمية: Nabih → "Automated Customer Support System" مش "AI Smart Responder" +- إعادة تسمية: Musadaq → "Document Processing Platform" مش "AI-Powered Invoice Processing" + +### ٤. الـ Stack Prioritization + +**الحالي:** OSM, GraphHopper, MapLibre, PostGIS في المقدمة — هذا stack شخص بنى ride-hailing. + +**المطلوب لعمّان:** +1. PHP (Workerman), Node.js, NestJS — أول شيء +2. PostgreSQL, MySQL, Redis +3. Docker, AWS, CI/CD +4. REST APIs, WebSockets, Microservices +5. Flutter (ثانوي) +6. GIS (في الأخير — ميزة إضافية مش أساسية) + +### ٥. السطر الـ AI-generated + +**الحذف فوراً:** +> *"I leverage my expertise..."* + +أي HR في عمّان شايف هاد السطر ١٠٠ مرة من ناس مستخدمين ChatGPT. + +### ٦. الفريلانس بدون أسماء + +**المشكلة:** "25+ production applications" بدون أسماء شركات أو صناعات. + +**الحل:** ذكر الصناعات بوضوح — healthcare, logistics, HR, sports, utilities, fintech — بدون أسماء شركات إذا ما في إذن، لكن الصناعات تبني ثقة. + +--- + +## الـ CV الجديد — الهيكل المقترح لسوق عمّان + +### Header +- الاسم: Hamza Ayed +- العنوان: `{{JOB_HEADLINE}}` — يجب أن يكون `Senior Backend Engineer & Technical Lead` أو ما يناسب الوظيفة +- التواصل: عمّان، الأردن (مش Amman, Jordan — أكد الموقع) + +### ١. Professional Summary +- التركيز على: delivery، scale، cost savings، MENA experience +- حذف ride-hailing hook الإجباري — استبداله بـ hook عن building production systems +- 3-4 أسطر: من أنا، ماذا بنيت، ماذا أقدم للشركة + +### ٢. Technical Skills (مرتبة حسب أولوية سوق عمّان) +``` +Core Focus: {{DYNAMIC_SKILLS}} ← AI-generated per job + +Backend & Architecture: PHP (Workerman), Node.js, NestJS, Python (FastAPI/Flask), REST APIs, WebSockets, Microservices +Infrastructure & Cloud: Docker, Linux, Nginx, Redis, CI/CD (GitHub Actions), AWS +Databases: PostgreSQL, MySQL, Redis, Database Design & Query Optimization +Geospatial (Supplemental): PostGIS, OpenStreetMap, GraphHopper, MapLibre GL +Mobile: Flutter/Dart, GetX, BLoC/Cubit +``` + +### ٣. Technical Impact (جديد — يركز على delivery والإنجاز) +- Built platforms serving 6,000+ active users across two markets +- Engineered proprietary mapping infrastructure replacing Google Maps — $10K+/month savings +- Designed high-concurrency WebSocket systems for real-time operations +- Delivered 25+ production applications across healthcare, logistics, fintech, and utilities +- Published open-source SDKs on pub.dev and npm + +### ٤. Professional Experience (معاد صياغته) +``` +Technical Lead & Backend Engineer — Intaleq | Jan 2024–Present | Amman, Jordan +• Built full-stack transportation platform from zero: PHP/Workerman backend, Flutter apps, WebSocket dispatcher — serving 1,800+ drivers +• Developed proprietary mapping platform (NestJS, GraphHopper, OSM, PostGIS) — $10K+/month cost reduction vs Google Maps +• Designed event-driven architecture for real-time matching and tracking + +Lead Backend Engineer — Tripz Egypt | Jan 2023–Present | Cairo / Remote +• Built complete ride-hailing system: PHP backend, Flutter apps, real-time WebSocket layer, payment integrations +• Engineered driver/rider matching system serving 4,318 drivers — $0.78 customer acquisition cost +• Integrated local payment gateways and automated payout infrastructure + +Senior Backend Engineer — Freelance | Jan 2017–Dec 2023 | Jordan / Remote +• Delivered 25+ applications for MENA clients: healthcare platforms, logistics systems, HR tools, sports apps, utility dashboards +• Built automated customer support platform (Flutter + PHP backend) +• Developed document processing system using vision models and async pipelines +``` + +### ٥. Notable Projects +- IntaleqMaps Engine (NestJS, GraphHopper, OSM, PostGIS) — proprietary mapping +- Tripz Egypt Platform — end-to-end ride-hailing +- Automated Customer Support Platform — Flutter + high-concurrency PHP +- Document Processing System — AI vision models + async pipelines +- Meta Ads Manager — multi-tenant SaaS (NestJS/React) +- WhatsApp Bridge — high-concurrency Node.js + headless Puppeteer + +### ٦. Open Source (كما هو) +### ٧. Education (كما هو) +### ٨. Languages (كما هو) + +### ٩. Availability (معدل لسوق عمّان) +``` +Based in Amman, Jordan — Available Immediately +Open to On-site, Hybrid, and Remote roles in Jordan and MENA +``` + +--- + +## تغييرات الـ Prompt المطلوبة + +### Current Prompt (generatePdf): +``` +My title MUST be aligned with 'Solutions Architect', 'Senior Backend Engineer', or 'Senior Mobile Engineer'. +The summary MUST open with exactly this hook: 'Built two production ride-hailing platforms from zero to thousands of users, on proprietary infrastructure, in high-complexity and emerging markets.' +``` + +### New Prompt (Amman market): +``` +My title MUST be aligned with 'Senior Backend Engineer', 'Technical Lead', or 'Lead Backend Engineer'. +NEVER use 'Solutions Architect' or 'AI Developer'. +The summary should open with a hook about building and scaling production systems in the MENA region. +Focus on delivery, cost optimization, and hands-on engineering — not enterprise architecture. +``` + +--- + +## ملخص التغييرات على مستوى الملفات + +| الملف | التغيير | +|-------|---------| +| `server/cv_template_amman.html` | **جديد** — قالب مخصص لسوق عمّان | +| `server/cv_template.html` | يبقى كما هو (للخليج/enterprise) | +| `server/generate_cv.php` | إضافة `template` parameter + prompt مخصص | +| `prompts.js` | تحديث `cvtips` ليعكس positioning سوق عمّان | +| `linkedin-analyzer/cv_template.html` | مزامنة مع الـ server template | + +--- + +## الخطوات التالية + +1. إنشاء `server/cv_template_amman.html` +2. تعديل `generate_cv.php` لدعم template selection +3. تعديل `prompts.js` — تحديث cvtips لسوق عمّان +4. للمستقبل: إنشاء templates إضافية لـ UAE enterprise و FinTech \ No newline at end of file diff --git a/prompts.js b/prompts.js index 88e953f..c075e2f 100644 --- a/prompts.js +++ b/prompts.js @@ -32,7 +32,7 @@ STRICT INTEGRITY RULES — VIOLATING THESE IS FORBIDDEN: ${analysisLang} Evaluate this job against my profile with brutal honesty and EXTREME brevity. DO NOT recount my history, military background, or summarize my profile. Keep it actionable and short. -CRITICAL RULE: The user is an elite Solutions Architect and Tech Lead targeting Senior/Lead engineering roles in the GCC Enterprise market. Position his 0-to-1 experience as a massive advantage for scaling systems, not as a risk. Do NOT downgrade his executive presence. +CRITICAL RULE: The user is a Senior Backend Engineer and Technical Lead who built and scaled production systems from zero. Position his 0-to-1, hands-on delivery experience as a massive advantage for any engineering team. Do NOT downgrade his technical leadership. ${STRICT_RULES} @@ -89,7 +89,7 @@ CRITICAL RULES: - NO brackets or placeholders — use ACTUAL names and data - Every sentence specific to THIS job at ${co} - Under 300 words total -- Tone MUST be highly professional, McKinsey-style, and executive. Focus on enterprise-scale impact and technical architecture. DO NOT mention military history. DO NOT use buzzwords like "sanctioned markets", "serving millions", "disruptive".`; +- Tone MUST be professional, direct, and confident. Focus on delivery, impact, and hands-on engineering. DO NOT mention military history. DO NOT use buzzwords like "sanctioned markets", "serving millions", "disruptive".`; P.cvtips = `You are a LinkedIn optimization expert and ATS specialist. IMPORTANT: Respond ENTIRELY in English regardless of the job posting language. @@ -104,10 +104,10 @@ ${ctx} Respond EXACTLY: ## LINKEDIN HEADLINE -[One headline, EXACTLY under 80 characters, ATS-optimized. Format like: Senior Backend Engineer & Systems Architect | PHP, NestJS, GIS | CTO at Intaleq] +[One headline, EXACTLY under 80 characters, ATS-optimized. Format like: Senior Backend Engineer & Technical Lead | PHP, NestJS, Docker | Building for Scale] ## PROFESSIONAL SUMMARY -[3-4 sentences tailored summary ready to paste — in English. CRITICAL: Use a McKinsey-style, executive, and highly professional tone. Focus purely on technical architecture, enterprise-scale impact, and business value. DO NOT mention military history. DO NOT use buzzwords like "sanctioned markets", "serving millions", "solo-adapted", "disruptive", "cutting-edge". DO NOT invent industries like "banking" unless they are in MY PROFILE.] +[3-4 sentences tailored summary ready to paste — in English. CRITICAL: Focus on delivery, cost optimization, and hands-on engineering. Use a professional, direct, no-fluff tone. Emphasize impact: what you built, numbers you achieved, problems you solved. DO NOT use academic or AI-generated phrases like 'I leverage my expertise'. DO NOT invent industries like 'banking' unless they are in MY PROFILE.] ## ATS KEYWORDS TO ADD - [10-15 specific keywords from this job that MUST appear in CV] diff --git a/server/cv_template_amman.html b/server/cv_template_amman.html new file mode 100644 index 0000000..f69e05f --- /dev/null +++ b/server/cv_template_amman.html @@ -0,0 +1,200 @@ + + +
+ + + + + +{{TAILORED_SUMMARY}}
+ +Core Focus: {{DYNAMIC_SKILLS}}
+Backend & Architecture: PHP (Workerman), Node.js, NestJS, Python (FastAPI/Flask), REST APIs, WebSockets, Microservices
+Infrastructure & Cloud: Docker, Linux, Nginx, Redis, CI/CD (GitHub Actions), AWS
+Databases: PostgreSQL, MySQL, Redis, Database Design & Query Optimization
+Geospatial (Supplemental): PostGIS, OpenStreetMap (OSM), GraphHopper, MapLibre GL, Spatial Queries
+Mobile: Flutter/Dart, GetX, BLoC/Cubit
+ +Arabic: Native | English: Professional Working Proficiency | Turkish: Limited Working Proficiency
+ ++ Based in Amman, Jordan — Available Immediately | Open to On-site, Hybrid & Remote Roles in Jordan & MENA +
+ + + \ No newline at end of file diff --git a/server/generate_cv.php b/server/generate_cv.php index 7054c8c..5b57d49 100644 --- a/server/generate_cv.php +++ b/server/generate_cv.php @@ -57,8 +57,29 @@ $geminiUrl = "https://generativelanguage.googleapis.com/v1beta/models/{$model}:g // ========================================== if ($action === 'generatePdf') { $jobDescription = $data['jobDescription'] ?? ''; - - $prompt = "You are an expert ATS CV tailor. Read the following job description and generate tailored content for my CV to maximize my chances of getting an interview. + $template = $data['template'] ?? 'default'; // 'amman' or 'default' + + // --- Amman Market Prompt (Senior Backend Engineer & Technical Lead) --- + if ($template === 'amman') { + $prompt = "You are an expert ATS CV tailor for the Jordan/Amman local tech market. Read the following job description and generate tailored content. + +STRICT INTEGRITY RULES: +1. NEVER invent skills I do not have. My TRUE technical stack is: PHP (Workerman), Node.js, NestJS, Python (FastAPI/Flask), PostgreSQL/PostGIS, Docker, Flutter, GetX, BLoC, WebSockets, OpenStreetMap. +2. Do NOT add data science skills like TensorFlow, PyTorch, Scikit-learn, Hadoop, or MLOps. +3. My title MUST be aligned with 'Senior Backend Engineer', 'Technical Lead', or 'Lead Backend Engineer'. NEVER use 'Solutions Architect', 'AI Developer', or 'CTO'. + +Return ONLY a valid JSON object with EXACTLY three keys: 'headline', 'summary', and 'skills'. +The 'headline' should be a clean, confident title based on my TRUE skills — matching Amman market expectations (Senior/Lead Backend Engineer). +The 'summary' should open with a hook about building and scaling production systems in the MENA region, emphasizing delivery, cost optimization, and hands-on engineering. Connect my real achievements to the job requirements. Keep it professional and direct — NO academic fluff, NO 'I leverage my expertise' phrases. +The 'skills' should be a comma-separated list of 10 highly relevant ATS keywords from MY ACTUAL SKILLS that match the job. Prioritize backend, API, database, and infrastructure skills over GIS. +Do NOT use markdown blocks like ```json, just return raw JSON text. + +Job Description: +" . substr($jobDescription, 0, 4000); + } + // --- Default Prompt (Current — Enterprise/GCC) --- + else { + $prompt = "You are an expert ATS CV tailor. Read the following job description and generate tailored content for my CV to maximize my chances of getting an interview. STRICT INTEGRITY RULES: 1. NEVER invent skills I do not have. My TRUE technical stack is: PHP (Workerman), Node.js, NestJS, Python (FastAPI/Flask), PostgreSQL/PostGIS, Docker, Flutter, GetX, BLoC, WebSockets, OpenStreetMap. @@ -73,6 +94,7 @@ Do NOT use markdown blocks like ```json, just return raw JSON text. Job Description: " . substr($jobDescription, 0, 4000); + } $payload = json_encode([ "contents" => [["parts" => [["text" => $prompt]]]], @@ -99,12 +121,17 @@ Job Description: $aiText = str_replace(['```json', '```'], '', $aiText); $parsedJson = json_decode(trim($aiText), true); - $headline = $parsedJson['headline'] ?? "Solutions Architect & Technical Leader"; + $defaultHeadline = ($template === 'amman') + ? "Senior Backend Engineer & Technical Lead" + : "Solutions Architect & Technical Leader"; + $headline = $parsedJson['headline'] ?? $defaultHeadline; $summary = $parsedJson['summary'] ?? "Experienced professional with a strong background in software engineering."; $skills = $parsedJson['skills'] ?? "Architecture, APIs, Cloud, Backend Systems, System Design"; - $templatePath = __DIR__ . '/cv_template.html'; - $html = file_get_contents($templatePath); + $templateFile = ($template === 'amman') + ? __DIR__ . '/cv_template_amman.html' + : __DIR__ . '/cv_template.html'; + $html = file_get_contents($templateFile); $html = str_replace('{{JOB_HEADLINE}}', htmlspecialchars($headline), $html); $html = str_replace('{{TAILORED_SUMMARY}}', htmlspecialchars($summary), $html); $html = str_replace('{{DYNAMIC_SKILLS}}', htmlspecialchars($skills), $html);