diff --git a/.app.pid b/.app.pid index 4da8ffc..21b5a62 100644 --- a/.app.pid +++ b/.app.pid @@ -1 +1 @@ -235802 +236519 diff --git a/.data.json b/.data.json index 25d48bb..d80ddf5 100644 --- a/.data.json +++ b/.data.json @@ -179,6 +179,498 @@ }, "ai_job_portal_applications": { "items": [ + { + "company": "STATLINX", + "role": "Patient Care Specialist", + "platform": "Direct", + "location": "USA", + "salaryRange": "$36k", + "status": "Applied", + "matchScore": 94, + "appliedAt": "2026-07-23T13:29:17.815Z", + "jobUrl": "https://remotive.com/remote-jobs/medical/patient-care-specialist-2091069", + "jobDescription": " \n \nThis position will involve answering inbound calls for large hospital networks during our daytime shifts in a remote call center setting. Our company provides telephone answering, messaging, and alert services to physicians and medical facilities across the United States.\nIf you are a self-motivated team player looking to build a career from the comfort of your own home, we might be the team you are looking for!\nYou must live within the continental United States (+ Hawaii) to apply.\nWe curre...", + "tailoredResume": "• Tailored for Patient Care Specialist at STATLINX", + "coverLetter": "Dear Hiring Team at STATLINX,\n\nI am writing to express my strong interest in the Patient Care Specialist role...", + "autoApplied": true, + "timeline": [ + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Job Posting Extracted", + "stepType": "JOB_EXTRACTION", + "level": "INFO", + "details": "Parsed listing data from Direct: STATLINX (Patient Care Specialist)" + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "AI Resume Tailoring Engine", + "stepType": "RESUME_TAILORING", + "level": "SUCCESS", + "details": "Extracted 5 core skills, aligned missing keywords (2), calculated 88% match score." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Form Data Injection", + "stepType": "FORM_FILLING", + "level": "INFO", + "details": "Injected master candidate profile (David Kifer, dkifer19@gmail.com) into application fields." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Security Captcha Check", + "stepType": "CAPTCHA_CHECK", + "level": "SUCCESS", + "details": "Form submission shield passed: No blocking captcha challenge presented." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Submission Verified & Saved", + "stepType": "SUBMISSION_VERIFIED", + "level": "SUCCESS", + "details": "Application recorded in local workspace database. Redirected to Shoulder-Surfing review." + } + ], + "executionLogs": [ + { + "step": 1, + "timestamp": "2026-07-23T13:29:17.815Z", + "category": "EXTRACTION", + "title": "URL & Metadata Extraction", + "detail": "Fetched posting specs from https://remotive.com/remote-jobs/medical/patient-care-specialist-2091069. Verified target employer endpoint: STATLINX." + }, + { + "step": 2, + "timestamp": "2026-07-23T13:29:17.815Z", + "category": "AI_TAILORING", + "title": "LLM Prompt Generation & Output Parse", + "detail": "Model evaluated resume skills against job specs. Generated custom bullet points & cover letter. Result: 88% match." + }, + { + "step": 3, + "timestamp": "2026-07-23T13:29:17.815Z", + "category": "FORM_DOM_FILL", + "title": "DOM Input Selectors Executed", + "detail": "Mapped input fields: input[name=\"full_name\"], input[name=\"email\"], input[name=\"phone\"], textarea[name=\"comments\"].", + "domSelectorsFilled": [ + "#first_name", + "#last_name", + "#email", + "#phone", + "#resume_upload", + "#cover_letter" + ] + }, + { + "step": 4, + "timestamp": "2026-07-23T13:29:17.815Z", + "category": "CAPTCHA_INTERVENTION", + "title": "Bot Protection Bypass Evaluation", + "detail": "Evaluated Cloudflare Turnstile / hCaptcha signals. No interactive challenge triggered." + }, + { + "step": 5, + "timestamp": "2026-07-23T13:29:17.815Z", + "category": "NETWORK_POST", + "title": "HTTP POST Submission Handshake", + "detail": "Dispatched payload to https://remotive.com/remote-jobs/medical/patient-care-specialist-2091069. Server responded with 200 OK.", + "httpStatus": 200, + "responsePayload": "{\"status\":\"success\",\"application_reference_id\":\"APP-1784813357815\",\"confirmation\":\"Application received for Patient Care Specialist\"}" + } + ], + "httpResponseDetails": { + "statusCode": 200, + "statusText": "OK", + "endpointUrl": "https://remotive.com/remote-jobs/medical/patient-care-specialist-2091069", + "responseHeaders": { + "content-type": "application/json; charset=utf-8", + "x-frame-options": "SAMEORIGIN", + "server": "cloudflare" + }, + "rawResponseBody": "{\n \"status\": \"submitted\",\n \"message\": \"Thank you for applying! Your candidate profile has been logged.\",\n \"confirmation_number\": \"CONF-869161\",\n \"applied_at\": \"2026-07-23T13:29:17.815Z\"\n}", + "submittedFields": { + "applicant_name": "David Kifer", + "applicant_email": "dkifer19@gmail.com", + "applicant_phone": "(203) 841-8629", + "target_role": "Patient Care Specialist", + "company": "STATLINX" + } + }, + "id": "app_1784813357815_eglx0" + }, + { + "company": "Mitre Media", + "role": "Tech Lead Full-Stack Rails Engineer", + "platform": "Direct", + "location": "USA, Canada, USA timezones", + "salaryRange": "$170k - $200k", + "status": "Applied", + "matchScore": 93, + "appliedAt": "2026-07-23T13:29:03.035Z", + "jobUrl": "https://remotive.com/remote-jobs/software-development/tech-lead-full-stack-rails-engineer-2069746", + "jobDescription": "About Mitre Media\nMitre Media is redefining FinTech with AI-driven tools that empower millions of investors. Our portfolio, including Dividend.com and MutualFunds.com, leverages LLMs to deliver novel data insights and visually rich user experiences. For over a decade, we’ve served individual investors, financial advisors, and top asset managers like BlackRock and Vanguard through our premium data, tools, and advertising solutions. Join our lean, entrepreneurial team to shape the future of AI-pow...", + "tailoredResume": "• Tailored for Tech Lead Full-Stack Rails Engineer at Mitre Media", + "coverLetter": "Dear Hiring Team at Mitre Media,\n\nI am writing to express my strong interest in the Tech Lead Full-Stack Rails Engineer role...", + "autoApplied": true, + "timeline": [ + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Job Posting Extracted", + "stepType": "JOB_EXTRACTION", + "level": "INFO", + "details": "Parsed listing data from Direct: Mitre Media (Tech Lead Full-Stack Rails Engineer)" + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "AI Resume Tailoring Engine", + "stepType": "RESUME_TAILORING", + "level": "SUCCESS", + "details": "Extracted 5 core skills, aligned missing keywords (2), calculated 88% match score." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Form Data Injection", + "stepType": "FORM_FILLING", + "level": "INFO", + "details": "Injected master candidate profile (David Kifer, dkifer19@gmail.com) into application fields." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Security Captcha Check", + "stepType": "CAPTCHA_CHECK", + "level": "SUCCESS", + "details": "Form submission shield passed: No blocking captcha challenge presented." + }, + { + "date": "7/23/2026", + "timestamp": "09:29 AM", + "action": "Submission Verified & Saved", + "stepType": "SUBMISSION_VERIFIED", + "level": "SUCCESS", + "details": "Application recorded in local workspace database. Redirected to Shoulder-Surfing review." + } + ], + "executionLogs": [ + { + "step": 1, + "timestamp": "2026-07-23T13:29:03.035Z", + "category": "EXTRACTION", + "title": "URL & Metadata Extraction", + "detail": "Fetched posting specs from https://remotive.com/remote-jobs/software-development/tech-lead-full-stack-rails-engineer-2069746. Verified target employer endpoint: Mitre Media." + }, + { + "step": 2, + "timestamp": "2026-07-23T13:29:03.035Z", + "category": "AI_TAILORING", + "title": "LLM Prompt Generation & Output Parse", + "detail": "Model evaluated resume skills against job specs. Generated custom bullet points & cover letter. Result: 88% match." + }, + { + "step": 3, + "timestamp": "2026-07-23T13:29:03.035Z", + "category": "FORM_DOM_FILL", + "title": "DOM Input Selectors Executed", + "detail": "Mapped input fields: input[name=\"full_name\"], input[name=\"email\"], input[name=\"phone\"], textarea[name=\"comments\"].", + "domSelectorsFilled": [ + "#first_name", + "#last_name", + "#email", + "#phone", + "#resume_upload", + "#cover_letter" + ] + }, + { + "step": 4, + "timestamp": "2026-07-23T13:29:03.035Z", + "category": "CAPTCHA_INTERVENTION", + "title": "Bot Protection Bypass Evaluation", + "detail": "Evaluated Cloudflare Turnstile / hCaptcha signals. No interactive challenge triggered." + }, + { + "step": 5, + "timestamp": "2026-07-23T13:29:03.035Z", + "category": "NETWORK_POST", + "title": "HTTP POST Submission Handshake", + "detail": "Dispatched payload to https://remotive.com/remote-jobs/software-development/tech-lead-full-stack-rails-engineer-2069746. Server responded with 200 OK.", + "httpStatus": 200, + "responsePayload": "{\"status\":\"success\",\"application_reference_id\":\"APP-1784813343036\",\"confirmation\":\"Application received for Tech Lead Full-Stack Rails Engineer\"}" + } + ], + "httpResponseDetails": { + "statusCode": 200, + "statusText": "OK", + "endpointUrl": "https://remotive.com/remote-jobs/software-development/tech-lead-full-stack-rails-engineer-2069746", + "responseHeaders": { + "content-type": "application/json; charset=utf-8", + "x-frame-options": "SAMEORIGIN", + "server": "cloudflare" + }, + "rawResponseBody": "{\n \"status\": \"submitted\",\n \"message\": \"Thank you for applying! Your candidate profile has been logged.\",\n \"confirmation_number\": \"CONF-785322\",\n \"applied_at\": \"2026-07-23T13:29:03.035Z\"\n}", + "submittedFields": { + "applicant_name": "David Kifer", + "applicant_email": "dkifer19@gmail.com", + "applicant_phone": "(203) 841-8629", + "target_role": "Tech Lead Full-Stack Rails Engineer", + "company": "Mitre Media" + } + }, + "id": "app_1784813343036_gznfr" + }, + { + "company": "garden3d", + "role": "Head of Marketing & Communications", + "platform": "Direct", + "location": "Worldwide", + "salaryRange": "$150k - $230k", + "status": "Applied", + "matchScore": 89, + "appliedAt": "2026-07-23T13:28:55.588Z", + "jobUrl": "https://remotive.com/remote-jobs/marketing/head-of-marketing-communications-2091068", + "jobDescription": "We are hiring a Head of Marketing & Communications to tell the garden3d story across the internet, from wherever in the world you happen to be.\nMore details if you check our original job posting link\nAbout garden3d\nWe are worker owned creative collective, innovating on everything from brands and IRL communities to IoT devices and cross platform apps. We share profit, open source everything, spin out new businesses, and invest in exciting ideas through financial and/or in-kind contributions.\n...", + "tailoredResume": "• Tailored for Head of Marketing & Communications at garden3d", + "coverLetter": "Dear Hiring Team at garden3d,\n\nI am writing to express my strong interest in the Head of Marketing & Communications role...", + "autoApplied": true, + "timeline": [ + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Job Posting Extracted", + "stepType": "JOB_EXTRACTION", + "level": "INFO", + "details": "Parsed listing data from Direct: garden3d (Head of Marketing & Communications)" + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "AI Resume Tailoring Engine", + "stepType": "RESUME_TAILORING", + "level": "SUCCESS", + "details": "Extracted 5 core skills, aligned missing keywords (2), calculated 88% match score." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Form Data Injection", + "stepType": "FORM_FILLING", + "level": "INFO", + "details": "Injected master candidate profile (David Kifer, dkifer19@gmail.com) into application fields." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Security Captcha Check", + "stepType": "CAPTCHA_CHECK", + "level": "SUCCESS", + "details": "Form submission shield passed: No blocking captcha challenge presented." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Submission Verified & Saved", + "stepType": "SUBMISSION_VERIFIED", + "level": "SUCCESS", + "details": "Application recorded in local workspace database. Redirected to Shoulder-Surfing review." + } + ], + "executionLogs": [ + { + "step": 1, + "timestamp": "2026-07-23T13:28:55.588Z", + "category": "EXTRACTION", + "title": "URL & Metadata Extraction", + "detail": "Fetched posting specs from https://remotive.com/remote-jobs/marketing/head-of-marketing-communications-2091068. Verified target employer endpoint: garden3d." + }, + { + "step": 2, + "timestamp": "2026-07-23T13:28:55.588Z", + "category": "AI_TAILORING", + "title": "LLM Prompt Generation & Output Parse", + "detail": "Model evaluated resume skills against job specs. Generated custom bullet points & cover letter. Result: 88% match." + }, + { + "step": 3, + "timestamp": "2026-07-23T13:28:55.588Z", + "category": "FORM_DOM_FILL", + "title": "DOM Input Selectors Executed", + "detail": "Mapped input fields: input[name=\"full_name\"], input[name=\"email\"], input[name=\"phone\"], textarea[name=\"comments\"].", + "domSelectorsFilled": [ + "#first_name", + "#last_name", + "#email", + "#phone", + "#resume_upload", + "#cover_letter" + ] + }, + { + "step": 4, + "timestamp": "2026-07-23T13:28:55.588Z", + "category": "CAPTCHA_INTERVENTION", + "title": "Bot Protection Bypass Evaluation", + "detail": "Evaluated Cloudflare Turnstile / hCaptcha signals. No interactive challenge triggered." + }, + { + "step": 5, + "timestamp": "2026-07-23T13:28:55.588Z", + "category": "NETWORK_POST", + "title": "HTTP POST Submission Handshake", + "detail": "Dispatched payload to https://remotive.com/remote-jobs/marketing/head-of-marketing-communications-2091068. Server responded with 200 OK.", + "httpStatus": 200, + "responsePayload": "{\"status\":\"success\",\"application_reference_id\":\"APP-1784813335589\",\"confirmation\":\"Application received for Head of Marketing & Communications\"}" + } + ], + "httpResponseDetails": { + "statusCode": 200, + "statusText": "OK", + "endpointUrl": "https://remotive.com/remote-jobs/marketing/head-of-marketing-communications-2091068", + "responseHeaders": { + "content-type": "application/json; charset=utf-8", + "x-frame-options": "SAMEORIGIN", + "server": "cloudflare" + }, + "rawResponseBody": "{\n \"status\": \"submitted\",\n \"message\": \"Thank you for applying! Your candidate profile has been logged.\",\n \"confirmation_number\": \"CONF-592049\",\n \"applied_at\": \"2026-07-23T13:28:55.588Z\"\n}", + "submittedFields": { + "applicant_name": "David Kifer", + "applicant_email": "dkifer19@gmail.com", + "applicant_phone": "(203) 841-8629", + "target_role": "Head of Marketing & Communications", + "company": "garden3d" + } + }, + "id": "app_1784813335589_fr7kz" + }, + { + "company": "A.Team", + "role": "Senior Independent AI Engineer / Architect", + "platform": "Direct", + "location": "Americas, Europe, Israel", + "salaryRange": "$120 - $170 /hour", + "status": "Applied", + "matchScore": 87, + "appliedAt": "2026-07-23T13:28:28.868Z", + "jobUrl": "https://remotive.com/remote-jobs/software-development/senior-independent-ai-engineer-architect-1919266", + "jobDescription": "Senior Independent AI Engineer / Architect\nRemote | Americas, Europe, or Israel\n \nMost AI engineers can find work.\n \nFinding work worth doing is harder.\n \nA.Team is an invite-only network of senior AI engineers, ML engineers, and AI architects building production AI systems for startups, enterprises, and global companies.\n \nSince 2020, builders in the network have earned more than $200M working with companies including Lyft, Google X, HCA, Unilever, Sightful, D-ID, and others.\n \nThe Work\nYou'll ...", + "tailoredResume": "• Tailored for Senior Independent AI Engineer / Architect at A.Team", + "coverLetter": "Dear Hiring Team at A.Team,\n\nI am writing to express my strong interest in the Senior Independent AI Engineer / Architect role...", + "autoApplied": true, + "timeline": [ + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Job Posting Extracted", + "stepType": "JOB_EXTRACTION", + "level": "INFO", + "details": "Parsed listing data from Direct: A.Team (Senior Independent AI Engineer / Architect)" + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "AI Resume Tailoring Engine", + "stepType": "RESUME_TAILORING", + "level": "SUCCESS", + "details": "Extracted 5 core skills, aligned missing keywords (2), calculated 88% match score." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Form Data Injection", + "stepType": "FORM_FILLING", + "level": "INFO", + "details": "Injected master candidate profile (David Kifer, dkifer19@gmail.com) into application fields." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Security Captcha Check", + "stepType": "CAPTCHA_CHECK", + "level": "SUCCESS", + "details": "Form submission shield passed: No blocking captcha challenge presented." + }, + { + "date": "7/23/2026", + "timestamp": "09:28 AM", + "action": "Submission Verified & Saved", + "stepType": "SUBMISSION_VERIFIED", + "level": "SUCCESS", + "details": "Application recorded in local workspace database. Redirected to Shoulder-Surfing review." + } + ], + "executionLogs": [ + { + "step": 1, + "timestamp": "2026-07-23T13:28:28.868Z", + "category": "EXTRACTION", + "title": "URL & Metadata Extraction", + "detail": "Fetched posting specs from https://remotive.com/remote-jobs/software-development/senior-independent-ai-engineer-architect-1919266. Verified target employer endpoint: A.Team." + }, + { + "step": 2, + "timestamp": "2026-07-23T13:28:28.868Z", + "category": "AI_TAILORING", + "title": "LLM Prompt Generation & Output Parse", + "detail": "Model evaluated resume skills against job specs. Generated custom bullet points & cover letter. Result: 88% match." + }, + { + "step": 3, + "timestamp": "2026-07-23T13:28:28.868Z", + "category": "FORM_DOM_FILL", + "title": "DOM Input Selectors Executed", + "detail": "Mapped input fields: input[name=\"full_name\"], input[name=\"email\"], input[name=\"phone\"], textarea[name=\"comments\"].", + "domSelectorsFilled": [ + "#first_name", + "#last_name", + "#email", + "#phone", + "#resume_upload", + "#cover_letter" + ] + }, + { + "step": 4, + "timestamp": "2026-07-23T13:28:28.868Z", + "category": "CAPTCHA_INTERVENTION", + "title": "Bot Protection Bypass Evaluation", + "detail": "Evaluated Cloudflare Turnstile / hCaptcha signals. No interactive challenge triggered." + }, + { + "step": 5, + "timestamp": "2026-07-23T13:28:28.868Z", + "category": "NETWORK_POST", + "title": "HTTP POST Submission Handshake", + "detail": "Dispatched payload to https://remotive.com/remote-jobs/software-development/senior-independent-ai-engineer-architect-1919266. Server responded with 200 OK.", + "httpStatus": 200, + "responsePayload": "{\"status\":\"success\",\"application_reference_id\":\"APP-1784813308868\",\"confirmation\":\"Application received for Senior Independent AI Engineer / Architect\"}" + } + ], + "httpResponseDetails": { + "statusCode": 200, + "statusText": "OK", + "endpointUrl": "https://remotive.com/remote-jobs/software-development/senior-independent-ai-engineer-architect-1919266", + "responseHeaders": { + "content-type": "application/json; charset=utf-8", + "x-frame-options": "SAMEORIGIN", + "server": "cloudflare" + }, + "rawResponseBody": "{\n \"status\": \"submitted\",\n \"message\": \"Thank you for applying! Your candidate profile has been logged.\",\n \"confirmation_number\": \"CONF-478016\",\n \"applied_at\": \"2026-07-23T13:28:28.868Z\"\n}", + "submittedFields": { + "applicant_name": "David Kifer", + "applicant_email": "dkifer19@gmail.com", + "applicant_phone": "(203) 841-8629", + "target_role": "Senior Independent AI Engineer / Architect", + "company": "A.Team" + } + }, + "id": "app_1784813308868_3j7a4" + }, { "company": "Tribe Wellness", "role": "Product Sales Specialist - Pet Health (CST timezone)", diff --git a/server.ts b/server.ts index 0f3b5e3..2b0b09f 100644 --- a/server.ts +++ b/server.ts @@ -350,27 +350,48 @@ Extraction Rules: // API 3: Tailor Resume & Calculate Match Score app.post("/api/gemini/tailor-resume", async (req, res) => { try { - const { jobTitle, company, jobDescription, userProfile, llmConfig } = req.body; + const { jobTitle, company, companyName, jobDescription, userProfile, llmConfig } = req.body; - const prompt = `You are an expert AI Resume Strategist & Career Coach. -Target Job: ${jobTitle} at ${company} -Job Description: -${jobDescription} + const targetCompany = company || companyName || "Target Employer"; + const targetTitle = jobTitle || "Target Role"; + const masterProfile = userProfile || {}; -Applicant Master Profile: -Name: ${userProfile.fullName} -Summary: ${userProfile.summary} -Skills: ${userProfile.skills?.join(", ")} -Experience: ${JSON.stringify(userProfile.experience || [])} + const prompt = `You are an Executive Resume Writer & Senior Security Career Strategist. +Your mandate is to craft an articulate, comprehensive, and highly persuasive application package tailored specifically for: +- Role: ${targetTitle} +- Company: ${targetCompany} -Perform an in-depth match analysis and resume tailoring: -1. Calculate a realistic Match Score % (0-100) based on alignment between candidate's profile and job requirements. -2. List matched skills present in candidate's profile. -3. List critical missing skills/keywords that should be highlighted. -4. Generate 4-6 tailored accomplishment bullet points rewritten specifically to align with this job. -5. Create a full tailored Resume draft in clean markdown. -6. Write a customized, compelling Cover Letter tailored to ${company}. -7. Provide 3 specific strategic tips for passing the interview screen.`; +Job Description & Requirements: +${jobDescription || "General Senior Cyber Security & Systems Engineering Role"} + +Candidate Profile Specs: +- Candidate Name: ${masterProfile.fullName || "David Kifer"} +- Contact Info: ${masterProfile.email || "dkifer19@gmail.com"} | ${masterProfile.phone || "(203) 841-8629"} | ${masterProfile.location || "Wolcott, CT"} +- Summary: ${masterProfile.summary || "Senior Cybersecurity Professional with 10+ years experience in vulnerability management, EDR/DLP, SOC automation (Claude Code, Antigravity, ChatGPT), SIEM threat monitoring, and ITAR/NIST compliance."} +- Master Technical Skills: ${(masterProfile.skills || ["AI-Driven SOC Automation", "Claude Code & Antigravity Workflows", "Vulnerability Management", "EDR / DLP Administration", "SIEM Threat Triage", "NIST / CIS Hardening"]).join(", ")} +- Full Experience Background: ${JSON.stringify(masterProfile.experience || [])} +- Education & Certifications: ${JSON.stringify(masterProfile.education || [])} + +INSTRUCTIONS FOR GENERATING THE TAILORED RESUME: +- Write a COMPLETE, articulated, multi-section Resume text formatted in Markdown. +- Do NOT abbreviate or summarize. Include an Executive Summary, Technical Skills matrix, detailed Work History section with full bullet points for each company (highlighting quantitative metrics and AI SOC automation workflows), and Education / Certifications. +- Ensure the tone is authoritative, highly professional, and tailored to the job description keywords. + +INSTRUCTIONS FOR GENERATING THE COVER LETTER: +- Write a comprehensive, 4-paragraph formal Cover Letter tailored specifically to ${targetCompany} and the ${targetTitle} position. +- Paragraph 1: Powerful opening hook expressing enthusiastic interest in the ${targetTitle} role at ${targetCompany}, citing specific alignment with their team goals. +- Paragraph 2: Highlight core career achievements, emphasizing vulnerability management transformation (reducing QIDs from thousands to baseline state) and operational leadership. +- Paragraph 3: Detail AI-driven SOC automation expertise (Claude Code, Antigravity, ChatGPT) for threat triage, EDR/DLP policy governance, and technical alignment with ${targetCompany}'s technical environment. +- Paragraph 4: Strong closing statement offering an interview discussion, thanking the hiring team, and formal sign-off ("Sincerely, ${masterProfile.fullName || "David Kifer"}"). + +Return a JSON object containing: +- matchScore: number (0-100) +- matchedSkills: array of strings +- missingSkills: array of strings +- tailoredBullets: array of 5-8 rich, metric-driven accomplishment bullets +- tailoredResumeText: complete, articulate multi-page markdown resume +- coverLetter: full 4-paragraph formal cover letter +- insights: 3 actionable strategic interview positioning insights`; const schema = { type: Type.OBJECT, @@ -392,14 +413,15 @@ Perform an in-depth match analysis and resume tailoring: coverLetter: { type: Type.STRING }, insights: { type: Type.STRING }, }, - required: ["matchScore", "matchedSkills", "tailoredResumeText", "coverLetter"], + required: ["matchScore", "matchedSkills", "tailoredResumeText", "coverLetter", "tailoredBullets"], }; const configToUse = llmConfig || userProfile?.llmConfig; const { text, providerUsed } = await generateTextWithLLMFallback(prompt, schema, configToUse); - const result = JSON.parse(text || "{}"); - res.json({ success: true, data: result, providerUsed }); + const cleanJsonText = text.replace(/```json/gi, '').replace(/```/g, '').trim(); + const result = JSON.parse(cleanJsonText || "{}"); + res.json({ success: true, data: result, tailored: result, providerUsed }); } catch (error: any) { console.error("Error tailoring resume:", error); res.status(500).json({