Professional Resume Builder
Run ID: 69cbc5d961b1021a29a8c1f52026-03-31Career
PantheraHive BOS
BOS Dashboard

Professional Resume Builder: Step 2 of 2 - Generate Tailored Cover Letter

This deliverable provides you with a comprehensive, tailored cover letter template designed to complement your professional resume. A well-crafted cover letter is your opportunity to introduce yourself, highlight your most relevant qualifications, and express genuine interest in the specific role and company. It acts as a persuasive narrative that bridges the gap between your resume's bullet points and the employer's needs.


1. Introduction to Your Tailored Cover Letter

Your cover letter is a crucial component of your job application, serving as a personalized introduction that elaborates on your resume and showcases your unique value proposition. This step provides a robust template, complete with guidance, to help you craft a compelling letter that resonates with hiring managers.

Key Objectives of Your Cover Letter:


2. Your Tailored Cover Letter Template

Below is a professional, adaptable cover letter template. Please fill in the bracketed [PLACEHOLDERS] with your specific information, tailoring each section to the job you are applying for.

text • 2,658 chars
[Your Name]
[Your Street Address]
[Your City, State, Zip Code]
[Your Phone Number]
[Your Email Address]
[Your LinkedIn Profile URL (Optional)]

[Date]

[Hiring Manager Name (if known, otherwise use title)]
[Hiring Manager Title]
[Company Name]
[Company Street Address]
[Company City, State, Zip Code]

**Subject: Application for [Job Title] - [Your Name]**

Dear [Mr./Ms./Mx. Last Name of Hiring Manager or "Hiring Team"],

I am writing to express my enthusiastic interest in the **[Job Title]** position at **[Company Name]**, as advertised on [Platform where you saw the advertisement, e.g., LinkedIn, company website, Indeed]. With my proven track record in [mention 1-2 key areas from your resume relevant to the job], I am confident that my skills and experience align perfectly with the requirements outlined in your job description and will allow me to make significant contributions to your team.

During my [Number] years of experience at [Previous Company Name/Relevant Experience], I successfully [Quantifiable achievement 1 directly relevant to the target job description, e.g., "led a team of 5 to increase sales by 20% over two quarters"]. I am particularly adept at [Skill 1, e.g., "strategic project management"] and [Skill 2, e.g., "cross-functional team collaboration"], which I understand are critical for success in this role at [Company Name]. My ability to [briefly explain how you apply a key skill, e.g., "translate complex data into actionable insights"] consistently resulted in [positive outcome, e.g., "streamlined operations and improved decision-making"].

Furthermore, I am deeply impressed by [Company Name]'s commitment to [mention a specific company value, project, or recent achievement, e.g., "innovation in sustainable technology" or "its community outreach initiatives"]. My professional philosophy strongly aligns with [Company Name]'s mission to [briefly state company's mission or a value you connect with], and I am eager to contribute my [specific skill or quality, e.g., "problem-solving abilities" or "passion for customer success"] to such a forward-thinking organization. I am confident that my [relevant personal quality, e.g., "proactive approach"] and [another relevant personal quality, e.g., "adaptability"] would make me a valuable asset to your [Department Name] team.

Thank you for your time and consideration. I have attached my resume for your review, which provides further detail on my qualifications. I am very eager to learn more about this opportunity and discuss how my expertise can benefit [Company Name]. I look forward to the possibility of an interview.

Sincerely,
[Your Typed Full Name]
Sandboxed live preview

As part of the "Professional Resume Builder" workflow, we are now executing Step 1 of 2: Generate Your Tailored Professional Resume.

This crucial step focuses on transforming your professional profile and the specifics of your target job into a compelling, ATS-friendly, and highly customized resume.


Step 1 of 2: Generating Your Tailored Professional Resume

1. Purpose of This Step

The primary objective of this step is to meticulously craft an initial draft of your resume that is specifically tailored to your desired job role and industry. We leverage your detailed professional history and the requirements of your target job description to create a document that not only showcases your qualifications but also resonates with hiring managers and passes through Applicant Tracking Systems (ATS).

This phase focuses on:

  • Strategic Keyword Integration: Identifying and incorporating key terms from your target job description.
  • Highlighting Relevant Experience: Emphasizing skills and achievements most pertinent to the role.
  • Professional Structuring: Ensuring a clear, concise, and industry-standard format.
  • Quantifying Achievements: Transforming responsibilities into measurable accomplishments that demonstrate impact.

2. Key Information Required for Generation

To ensure the highest quality and most effective resume, the following detailed information is essential:

  • Target Job Details:

* Full Job Title: The exact title of the position you are applying for.

* Company Name: The organization you are targeting.

* Complete Job Description: A copy of the full job posting, including responsibilities, required skills, and qualifications. This is critical for keyword analysis and tailoring.

  • Your Professional Profile:

* Contact Information: Full name, phone number, professional email address, LinkedIn profile URL (if applicable), and optionally, a portfolio/personal website link.

* Professional Summary/Objective: A brief, compelling overview of your career goals and key qualifications.

* Work Experience: For each role:

* Company Name, Location, Job Title, Employment Dates (Month/Year to Month/Year).

3-5 detailed bullet points describing your responsibilities and, crucially, your achievements* using action verbs and quantifiable results (e.g., "Increased sales by 15%," "Managed a team of 5," "Reduced project costs by $10K").

* Education: For each degree/certification:

* Institution Name, Location, Degree/Program Title, Major/Minor, Graduation Date (or expected date).

* Relevant coursework, honors, awards, or GPA (if exceptional).

* Skills: A comprehensive list of your technical skills (e.g., software, programming languages, tools), soft skills (e.g., communication, leadership, problem-solving), and languages.

* Projects/Portfolios (if applicable): Descriptions of significant projects, including your role, technologies used, and outcomes.

* Certifications/Licenses: Relevant professional certifications or licenses.

* Awards & Recognition: Any notable professional accolades.

* Volunteer Experience (Optional): If relevant to the target role.

3. Our Resume Generation Process

Our sophisticated process combines AI-driven analysis with best practices in resume writing to produce your tailored draft:

  1. Job Description Analysis: We first deconstruct your provided job description to identify core responsibilities, essential skills, required qualifications, and frequently used keywords.
  2. Profile-to-Job Matching: Your professional data is then meticulously mapped against the job requirements. We identify areas of strongest alignment and prioritize content that directly addresses the employer's needs.
  3. Keyword Optimization: Strategic keywords from the job description are seamlessly integrated into your resume's summary, experience, and skills sections to enhance ATS compatibility and recruiter visibility.
  4. Achievement-Oriented Language: We transform generic responsibilities into powerful, quantifiable achievements using strong action verbs to showcase your impact and value.
  5. Professional Formatting & Structure: Your resume is formatted using an industry-standard, clean, and ATS-friendly layout. This ensures readability, logical flow, and effective presentation of your qualifications.
  6. Conciseness and Clarity: We aim for a concise yet comprehensive document, typically 1-2 pages, ensuring every word adds value and clarity.
  7. Customization for Impact: Each section is carefully curated to highlight the experiences, skills, and accomplishments most relevant to the target role and the specific company culture, maximizing your appeal.

4. Expected Deliverable: Your Draft Tailored Resume

Upon completion of this step, you will receive:

  • A comprehensive draft of your professional resume, specifically tailored to the target job description you provided.
  • Format: Typically delivered in both Microsoft Word (.docx) for easy editing and PDF (.pdf) for final submission.
  • Content will include:

* Customized Professional Summary/Objective: Aligned with the target role.

* Tailored Work Experience: With achievement-focused bullet points and keyword integration.

* Relevant Skills Section: Clearly categorized and optimized.

* Education, Projects, Certifications, etc.: Presented in a clear and professional manner.

  • Key Characteristics:

* ATS-Optimized: Designed to pass through Applicant Tracking Systems effectively.

* Targeted: Specifically aligned with the provided job description's requirements.

* Professional: Polished, well-formatted, and free of grammatical errors or typos.

* Actionable: Ready for your review, feedback, and further refinement in the next step.

5. What's Next? (Step 2 Preview)

This generated draft is your foundation. In Step 2 of 2: Review and Refine Your Resume, you will have the opportunity to thoroughly review this initial output. You can provide feedback, request adjustments, and collaborate with us to fine-tune every detail, ensuring the final resume perfectly reflects your aspirations and maximizes your chances of securing interviews.


3. Customization Guide & Best Practices

To maximize the impact of your cover letter, follow these guidelines for effective customization:

3.1. Research the Company and Role Thoroughly

  • Company Website: Understand their mission, values, recent news, and projects.
  • Job Description: Identify keywords, required skills, responsibilities, and desired qualifications. Highlight what the company emphasizes.
  • LinkedIn: Look up the hiring manager (if known) or others in similar roles at the company to understand their backgrounds and the team structure.

3.2. Tailor Every Section

  • Recipient Name: Always try to find the hiring manager's name. A personalized salutation (e.g., "Dear Ms. Smith") is far more impactful than "To Whom It May Concern" or "Dear Hiring Manager." If you absolutely cannot find a name, use a specific title like "Dear [Department Name] Hiring Team."
  • Opening Paragraph: Clearly state the exact job title you're applying for and where you saw the advertisement. Express genuine excitement.
  • Body Paragraphs: This is where you connect your experience directly to the job requirements.

* "Show, Don't Tell": Instead of saying "I have strong leadership skills," provide an example: "I led a team of 5 engineers, resulting in a 15% increase in project delivery efficiency."

* Quantify Achievements: Use numbers, percentages, and metrics whenever possible to demonstrate the scope and impact of your work.

* Match Keywords: Incorporate 3-5 keywords or phrases directly from the job description into your letter.

* Focus on Employer Needs: Frame your skills and experiences in terms of how they will benefit the company, not just what you've done.

  • Closing Paragraph: Reiterate your interest, mention your attached resume, and include a clear call to action (e.g., "I look forward to discussing my qualifications further in an interview").

3.3. Content & Tone

  • Conciseness: Keep your cover letter to one page, ideally 3-4 paragraphs. Hiring managers often skim.
  • Professional Tone: Maintain a formal yet enthusiastic and confident voice. Avoid overly casual language or jargon.
  • Unique Value Proposition: What makes you stand out? Briefly touch upon a unique skill, perspective, or passion that aligns with the role.
  • Avoid Repetition: While you'll touch on resume points, don't just copy-paste. Elaborate and provide context that your resume might not.

3.4. Formatting and Proofreading

  • Professional Formatting: Use a clean, readable font (e.g., Calibri, Arial, Times New Roman) between 10-12 points. Maintain consistent margins (typically 1 inch on all sides).
  • Consistency: Ensure your contact information matches your resume.
  • Proofread Meticulously: Typos, grammatical errors, or incorrect company names are immediate red flags. Read it aloud, use grammar checkers, and ask a trusted friend or colleague to review it.

4. Next Steps

  1. Gather Information: Collect the specific job description, company details, and (if possible) the hiring manager's name for the role you're targeting.
  2. Fill in Placeholders: Methodically go through the provided template and replace all [PLACEHOLDERS] with your tailored content.
  3. Review and Refine: Use the "Customization Guide & Best Practices" section to critically evaluate and enhance your cover letter. Ensure it's compelling, concise, and error-free.
  4. Save as PDF: Always save and submit your cover letter as a PDF file unless otherwise specified, to preserve formatting.
  5. Submit with Resume: Attach your completed cover letter along with your professional resume to your application.

By following this detailed guidance, you will create a powerful cover letter that significantly strengthens your job application and makes a memorable impression.

professional_resume_builder.txt
Download source file
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}