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

Professional Cover Letter Generation: Your Tailored Introduction

This deliverable focuses on generating a compelling and customized cover letter, a crucial companion to your professional resume. A well-crafted cover letter serves as your personal introduction, allowing you to elaborate on your qualifications, express genuine interest, and demonstrate how your unique skills and experiences align perfectly with the target role and company culture.


1. The Power of a Tailored Cover Letter

Your resume provides a factual overview of your career, but a cover letter brings your application to life. It's your opportunity to:

Crucially, a generic cover letter is often worse than no cover letter at all. Customization is paramount for success.


2. Essential Components of a Professional Cover Letter

Every effective cover letter should include the following sections, presented in a clear and professional format:

* Your Full Name

* Your Phone Number

* Your Email Address

* Your LinkedIn Profile URL (optional but recommended)

* Your City, State (optional)

* Current date (e.g., October 26, 2023)

* Hiring Manager Name (if known, e.g., Ms. Jane Doe)

* Hiring Manager Title (e.g., Head of Marketing)

* Company Name

* Company Address (Street, City, State, Zip Code)

If the hiring manager's name is unknown, use the department head or "Hiring Team at [Company Name]".*

* Formal and personalized (e.g., "Dear Ms. Doe," or "Dear Hiring Manager,"). Avoid "To Whom It May Concern."

* State the position you are applying for.

* Mention where you saw the job posting (e.g., LinkedIn, company website).

* Briefly express your enthusiasm and a key reason why you are a strong fit.

* Paragraph 1: Why You? Highlight 2-3 of your most relevant skills, experiences, or achievements that directly align with the job description. Provide specific examples and, wherever possible, quantify your impact. Connect your past successes to the potential value you can bring to this specific role.

Paragraph 2: Why Them? Demonstrate your understanding of the company's mission, values, recent achievements, or industry standing. Explain why you are particularly interested in this company and this* role, beyond just the job title. Show that you've done your research.

* Reiterate your strong interest in the position and the company.

* Express confidence in your ability to contribute.

* Politely request an interview to discuss your qualifications further.

* Thank the hiring manager for their time and consideration.

* "Sincerely," "Best regards," or "Respectfully,"

* Your typed full name.

* (Optional: Leave space for a handwritten signature if submitting a physical copy).


3. Step-by-Step Guide to Generating Your Tailored Cover Letter

Follow these steps to create a highly effective and customized cover letter:

  1. Analyze the Job Description (JD):

* Read the JD carefully, highlighting keywords, required skills, responsibilities, and desired qualifications.

* Understand the company's mission, values, and culture from their website, LinkedIn, and recent news.

  1. Identify Key Alignment Points:

* Brainstorm 2-3 of your most relevant experiences, achievements, or skills that directly match the core requirements of the JD.

* Think about specific stories or projects where you demonstrated these competencies.

  1. Research the Company and Role:

* Visit the company's "About Us" page, "Careers" section, and recent press releases.

* Look for specific projects, products, or values that resonate with you.

* Try to find the hiring manager's name through LinkedIn or the company website. If not, use a specific departmental title (e.g., "Hiring Manager, Marketing Department").

  1. Draft Your Opening Paragraph:

* Clearly state the position you're applying for and where you found it.

* Immediately grab attention by stating your core qualification or enthusiasm.

Example: "I am writing to express my enthusiastic interest in the Senior Marketing Manager position at [Company Name], which I discovered on [Platform]. With over 8 years of experience driving successful digital campaigns and a proven track record of exceeding KPIs, I am confident I possess the strategic vision and execution skills to significantly contribute to your team."*

  1. Develop Your Body Paragraphs (Why You & Why Them):

* Why You: For each key alignment point (from step 2), write a concise sentence or two explaining how your experience directly addresses a JD requirement. Use action verbs and quantify results where possible.

Example: "In my previous role at [Previous Company], I spearheaded a content strategy that increased organic traffic by 40% and generated 25% more qualified leads within 12 months."*

Why Them: Articulate why you want to work for this specific company and this specific role*. Reference something particular about the company (e.g., "Your innovative approach to sustainable product development deeply aligns with my passion for eco-conscious brands.")

  1. Craft Your Closing Paragraph:

* Reiterate your excitement and suitability.

* Clearly state your desire for an interview.

* Thank them for their time and consideration.

  1. Proofread and Refine:

* Critical Step: Carefully proofread for any typos, grammatical errors, or awkward phrasing. Read it aloud to catch mistakes.

* Ensure the tone is professional, confident, and enthusiastic.

* Check that it flows logically and is concise (ideally 3-4 paragraphs, no more than one page).

* Verify all names, company names, and job titles are spelled correctly.


4. Cover Letter Template

Use this structure as a guide to build your personalized cover letter:

text • 2,866 chars
[Your Full 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, e.g., Ms. Jane Doe)]
[Hiring Manager Title (If known, e.g., Head of Human Resources)]
[Company Name]
[Company Street Address]
[Company City, State, Zip Code]

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

**[Opening Paragraph: State the position you are applying for, where you saw it, and a brief, compelling statement of your fit.]**
I am writing to express my profound interest in the [Job Title] position at [Company Name], as advertised on [Platform where you found the job]. With [Number] years of experience in [Your Industry/Relevant Field] and a proven track record in [Key Skill/Achievement], I am confident that my skills and passion align perfectly with the requirements of this role and your company’s mission.

**[Body Paragraph 1: Focus on "Why You." Highlight 2-3 specific skills, experiences, or achievements from your background that directly address the job description's requirements. Use action verbs and quantify results.]**
In my previous role as [Your Previous Title] at [Previous Company], I was responsible for [Key Responsibility 1], where I successfully [Quantifiable Achievement 1, e.g., "increased X by Y%"]. Furthermore, my expertise in [Key Skill 2] allowed me to [Specific Action/Result 2, e.g., "streamline processes, leading to a Z% efficiency gain"]. These experiences have equipped me with strong [Relevant Competency, e.g., "problem-solving and strategic planning abilities"] that I believe are critical for this role at [Company Name].

**[Body Paragraph 2 (Optional, but recommended): Focus on "Why Them." Demonstrate your research and genuine interest in the company. Connect your values/goals with theirs.]**
I am particularly drawn to [Company Name]'s commitment to [Specific Company Value or Initiative, e.g., "innovation in sustainable technology" or "its community outreach programs"]. Your recent success with [Specific Company Project or Product] truly resonates with my own professional goals of [Your Professional Goal/Value]. I am eager to contribute my skills to an organization that [Positive Trait of Company, e.g., "fosters a collaborative environment and prioritifies impactful solutions"].

**[Closing Paragraph: Reiterate your interest, express confidence, and include a clear call to action.]**
I am enthusiastic about the opportunity to bring my [Key Skill 1] and [Key Skill 2] to [Company Name] and am confident I can make immediate and significant contributions to your team. Thank you for your time and consideration. I have attached my resume for your review and welcome the opportunity to discuss my qualifications further in an interview.

Sincerely,
[Your Typed Full Name]
Sandboxed live preview

This deliverable provides a comprehensive, tailored professional resume for a candidate whose profile aligns with the expertise of a "Professional Resume Builder." This includes roles such as a Senior Career Consultant, Resume Writer, or Talent Acquisition Specialist, demonstrating a strong foundation in career development, recruitment, and crafting impactful professional documents.


Professional Resume: Career Development & Resume Optimization Specialist

[Your Name]

[Your Phone Number] | [Your Email Address] | [Your LinkedIn Profile URL] | [Your Professional Portfolio/Website (Optional)]


Professional Summary

Highly accomplished and results-driven Career Development & Resume Optimization Specialist with over 10 years of experience empowering professionals to achieve their career goals. Proven expertise in crafting compelling, ATS-optimized resumes, cover letters, and LinkedIn profiles that secure interviews and drive career advancement. Adept at coaching diverse clientele across various industries, providing strategic guidance on job search strategies, personal branding, and interview preparation. Passionate about leveraging deep market insights and recruitment best practices to unlock client potential and foster professional growth.


Experience

Senior Career Consultant & Resume Specialist | Career Catalyst Solutions | New York, NY

January 2019 – Present

  • Lead a portfolio of 150+ diverse clients annually, delivering personalized career coaching, resume writing, and job search strategy development, resulting in a 90% client satisfaction rate.
  • Design and deliver over 50 workshops and webinars on resume optimization, interview techniques, and personal branding to groups of up to 100 participants, enhancing employability skills across various career stages.
  • Develop and implement custom, ATS-friendly resumes and cover letters, increasing client interview rates by an average of 40% within 60 days of service engagement.
  • Conduct in-depth career assessments and market research to identify optimal career paths and target industries for clients, providing actionable insights for professional transitions.
  • Optimize LinkedIn profiles for maximum visibility and networking potential, leading to a 35% increase in recruiter outreach for coached clients.
  • Mentor junior career consultants, providing training on best practices in client management, resume strategy, and industry-specific job market trends.
  • Successfully navigated clients through complex career changes, promotions, and re-entry into the workforce, consistently exceeding placement targets.

Talent Acquisition Specialist | InnovateTech Solutions Inc. | San Francisco, CA

June 2014 – December 2018

  • Managed full-cycle recruitment for technical and non-technical roles, from entry-level to senior management, reducing time-to-hire by 25% across multiple departments.
  • Screened and interviewed an average of 50+ candidates weekly, utilizing advanced behavioral interviewing techniques to assess cultural fit and technical competencies.
  • Collaborated with hiring managers to develop accurate job descriptions, identify key qualifications, and create effective interview processes.
  • Leveraged various sourcing strategies, including LinkedIn Recruiter, Indeed, and professional networks, to build robust talent pipelines for hard-to-fill positions.
  • Provided constructive feedback and guidance to candidates on resume optimization and interview preparation, enhancing their success rate in the hiring process.
  • Implemented and managed an applicant tracking system (ATS), ensuring data integrity and streamlined recruitment workflows.
  • Participated in university career fairs and industry networking events to promote employer brand and attract top talent.

Education

Master of Science in Human Resources Management | Cornell University | Ithaca, NY

Graduated: May 2014

Bachelor of Arts in Communications | University of California, Berkeley | Berkeley, CA

Graduated: May 2012


Skills

Core Competencies:

  • Professional Resume Writing & Editing
  • ATS Optimization
  • Career Coaching & Counseling
  • Talent Acquisition & Recruitment
  • LinkedIn Profile Optimization
  • Interview Preparation & Mock Interviews
  • Personal Branding
  • Job Search Strategy Development
  • Client Relationship Management
  • Workshop Facilitation
  • Market Research & Analysis
  • Negotiation & Offer Management

Technical Skills:

  • Applicant Tracking Systems (ATS): Greenhouse, Workday, Taleo
  • CRM Software: Salesforce
  • Microsoft Office Suite (Word, Excel, PowerPoint)
  • Google Workspace
  • Professional Networking Platforms: LinkedIn Recruiter, Handshake
  • Project Management Tools: Asana, Trello

Soft Skills:

  • Exceptional Written & Verbal Communication
  • Active Listening
  • Empathy & Interpersonal Skills
  • Critical Thinking & Problem Solving
  • Time Management & Organization
  • Adaptability & Flexibility
  • Client-Centric Approach
  • Public Speaking

Certifications & Professional Development

  • Certified Professional Resume Writer (CPRW) | Professional Association of Resume Writers & Career Coaches (PARW/CC) | 2019
  • Certified Career Coach (CCC) | International Coaching Federation (ICF) | 2017
  • LinkedIn Learning Certificates: "Recruiting Foundations," "Advanced LinkedIn Recruiter," "Developing Your Personal Brand" | 2020-2022


5. Pro-Tips for Cover Letter Success

  • Keep it Concise: Aim for one page, 3-4 paragraphs. Hiring managers are busy.
  • Match Tone to Company Culture: If the company is known for being innovative and less formal, your tone can reflect that (while remaining professional).
  • Proofread Relentlessly: Errors reflect poorly on attention to detail. Use grammar checkers, but also read it yourself multiple times.
  • Save as PDF: Always submit your cover letter as a PDF unless explicitly asked for a different format. This preserves formatting.
  • Follow Instructions: If the job posting asks for specific information in the cover letter (e.g., salary expectations), be sure to include it.
  • Keywords Matter: Incorporate keywords from the job description naturally into your letter to help pass Applicant Tracking Systems (ATS).

6. Next Steps

With your tailored resume (from the previous step) and this comprehensive guide, you are now equipped to generate a highly effective cover letter that will significantly enhance your job application.

  1. Utilize the Template: Fill in the template above with your specific details, ensuring thorough customization for your target role and company.
  2. Review and Refine: Use the "Step-by-Step Guide" and "Pro-Tips" to optimize your draft.
  3. Final Check: Before sending, ensure your cover letter complements your resume and presents a consistent, professional narrative.

Good luck with your application!

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);}});}