Backlink Outreach Campaign
Run ID: 69c94f26a17964d77e86d8972026-03-29SEO
PantheraHive BOS
BOS Dashboard

Generate a full backlink outreach campaign with prospect lists, email templates, and follow-up sequences.

Backlink Outreach Campaign: AI Content Marketing Platform

This document outlines a comprehensive backlink outreach campaign designed to secure high-quality backlinks for an "AI-powered content marketing platform." The goal is to enhance organic search visibility, drive referral traffic, and establish brand authority within the digital marketing and AI technology space.


1. Campaign Strategy Overview

Goal: To acquire a minimum of 10-15 high-authority, relevant backlinks per month, leading to improved search engine rankings for target keywords, increased organic traffic, and enhanced domain authority for [Your Company/Product Name].

Target Audience (Prospects):

  • Digital Marketing Blogs & Publications: Websites covering SEO, content marketing, social media, PPC, and overall digital strategy.
  • AI & Technology Blogs: Sites focused on artificial intelligence, machine learning, SaaS, and emerging tech.
  • Business & Entrepreneurship Blogs: Publications catering to small business owners, startups, and entrepreneurs looking for efficiency tools.
  • Industry Resource Pages: Curated lists of tools, resources, and guides relevant to content creation, marketing, or AI.
  • Competitor Backlink Profiles: Websites linking to competitors, indicating an interest in our niche.

Key Value Proposition: Our AI-powered content marketing platform helps businesses create high-quality, engaging content faster and more efficiently, saving time and resources while improving marketing ROI. We offer unique insights, data-driven content suggestions, and automation capabilities that differentiate us from traditional solutions.

Types of Backlinks Targeted:

  • Guest Posts: High-quality, original content published on relevant blogs, including a contextual link back to [Your Website].
  • Resource Page Inclusions: Getting our platform or relevant content listed on existing "best tools," "resources," or "guides" pages.
  • Broken Link Building: Identifying broken links on authoritative websites and suggesting our relevant content as a replacement.
  • Skyscraper Technique: Creating superior content on a popular topic and reaching out to sites linking to inferior content, suggesting our piece instead.
  • Expert Quotes/Mentions: Offering expert insights or data for articles, leading to a mention and link.
  • Partnerships/Collaborations: Exploring co-marketing opportunities, webinars, or joint content creation.

2. Prospect List Generation Strategies

Effective prospecting is crucial. Here's how to build a robust list of potential backlink opportunities.

Identifying Target Websites:

  • Google Search Operators:

* "write for us" + "content marketing"

* "guest post" + "AI tools"

* "submit guest post" + "digital marketing"

* "inurl:resources" + "AI content"

* "best [niche] tools" (e.g., "best content writing AI tools")

* "intitle:links" + "marketing"

* "competitor name" + "reviews"

  • Competitor Backlink Analysis: Use tools like Ahrefs, SEMrush, or Moz Link Explorer to identify websites linking to your direct competitors. These sites are already interested in your niche.
  • Niche-Specific Directories & Curated Lists: Look for websites that compile lists of industry tools, blogs, or resources.
  • "Powered By" Footers: Many blogs and websites use specific tools (like HubSpot, WordPress themes, etc.). Analyzing these can sometimes reveal relevant sites.
  • Social Media & Forums: Monitor industry hashtags, LinkedIn groups, and Reddit communities for popular content and influential voices.

Tools for Prospecting:

  • SEO Tools (Ahrefs, SEMrush, Moz Link Explorer): Essential for competitor analysis, broken link checking, and identifying high-DA (Domain Authority)/DR (Domain Rating) sites.
  • Hunter.io / Snov.io / Apollo.io: For finding email addresses of decision-makers (editors, content managers, marketing directors).
  • Scraping Tools (e.g., Screaming Frog SEO Spider): Can be used to crawl websites for broken links or specific page types.
  • Google Sheets/Excel: For organizing and tracking prospects.

Filtering Criteria for Prospects:

  • Domain Authority (DA) / Domain Rating (DR): Aim for sites with a DA/DR of 30+ (or higher, depending on your niche and current DA).
  • Relevance: The website's content must be highly relevant to digital marketing, AI, SaaS, or business growth.
  • Traffic: Websites with decent organic traffic indicate active readership and authority.
  • Content Quality: Assess the quality of existing content. Is it well-written, informative, and engaging?
  • Outreach History (Optional): Check if they link out to other relevant resources frequently.
  • No-Follow vs. Do-Follow: Prioritize "do-follow" links, but "no-follow" from high-authority sites can still drive referral traffic and brand awareness.

Types of Outreach Opportunities & Corresponding Content:

  • Guest Post: Offer unique, in-depth articles that provide value to their audience (e.g., "5 AI Strategies to Boost Your Content ROI," "The Future of Content Creation: Human-AI Collaboration").
  • Resource Page: Suggest our platform or a specific guide/tool page as a valuable addition to their existing resource lists.
  • Broken Link Building: Identify a broken link on their site and offer our relevant, live content as a replacement.
  • Skyscraper Technique: Create a definitive guide (e.g., "The Ultimate Guide to AI Content Marketing Platforms") that is significantly better than existing content, then promote it.
  • Expert Quote: Provide a unique insight or data point related to AI/content marketing for their upcoming articles.

3. Example Prospect Lists (for "AI Content Marketing Platform")

Hypothetical Product: "ContentGenius AI" - an AI-powered platform for generating blog posts, social media copy, and ad creatives.

A. Guest Post Opportunities:

| Website Name | Website URL | DA/DR | Contact Person (Hypothetical) | Email (Hypothetical) | Potential Topic Idea | Notes |

| :--------------------- | :----------------------------------------- | :---- | :---------------------------- | :--------------------- | :--------------------------------------------------------------------------------- | :---------------------------------------------------- |

| MarketingProfs Blog | marketingprofs.com | 89/85 | Ann Handley | ann@marketingprofs.com | "Beyond Automation: How AI is Redefining Content Strategy" | High authority, focus on actionable marketing insights |

| Search Engine Journal | searchenginejournal.com | 90/89 | Loren Baker | loren@searchenginejournal.com | "AI-Powered SEO: Boosting Rankings with Intelligent Content Creation" | SEO-focused, technical audience |

| HubSpot Blog | blog.hubspot.com | 93/92 | Meghan Keaney Anderson | meghan@hubspot.com | "The Content Creator's Guide to Leveraging AI for Efficiency & Creativity" | Inbound marketing focus, broad appeal |

| AI Trends | aitrends.com | 70/65 | John P. Desmond | john@aitrends.com | "Ethical AI in Content: Ensuring Quality and Authenticity with ContentGenius AI" | Niche AI audience |

| Social Media Examiner | socialmediaexaminer.com | 87/84 | Michael Stelzner | michael@socialmediaexaminer.com | "Crafting Engaging Social Media Content with AI: A Step-by-Step Guide" | Focus on practical social media tips |

B. Resource Page Opportunities:

| Website Name | Website URL | DA/DR | Contact Person (Hypothetical) | Email (Hypothetical) | Relevant Resource Page URL (Hypothetical) | Notes |

| :---------------------------- | :------------------------------------------------- | :---- | :---------------------------- | :------------------------- | :----------------------------------------------------------------------- | :-------------------------------------------------------- |

| G2 Learning Hub | learn.g2.com | 88/86 | Content Team | content@g2.com | learn.g2.com/best-content-creation-tools | Review site, frequently updates "best of" lists |

| Capterra Blog | blog.capterra.com | 86/84 | Editor | editor@capterra.com | blog.capterra.com/top-ai-writing-software/ | Software review site, similar to G2 |

| Marketing Insider Group | marketinginsidergroup.com | 65/60 | Michael Brenner | michael@marketinginsidergroup.com | marketinginsidergroup.com/content-marketing-resources/ | Curated list of marketing tools and resources |

| Founder Institute | fi.co | 75/70 | Partnerships | partnerships@fi.co | fi.co/resources/startup-marketing-tools | Startup-focused resources, good for early-stage companies |

C. Broken Link Building Opportunities (Hypothetical - requires live analysis):

| Website Name | Website URL | DA/DR | Contact Person (Hypothetical) | Email (Hypothetical) | Broken Link URL (Example) | Suggested Replacement Content (Your URL) | Notes |

| :--------------------- | :----------------------------------------- | :---- | :---------------------------- | :------------------------ | :---------------------------------------- | :--------------------------------------------------------------------------- | :------------------------------------------------------- |

| Content Marketing Inst | contentmarketinginstitute.com | 90/88 | Editor | editor@cmi.com | cmi.com/blog/ai-content-trends-2022 (404) | [Your Website]/blog/ai-content-marketing-trends-2024-report | High authority, likely has outdated/broken content. |

| TechCrunch | techcrunch.com | 95/94 | News Editor | news@techcrunch.com | techcrunch.com/ai-writing-tool-review (404) | [Your Website]/blog/comprehensive-review-contentgenius-ai-platform | Very high authority, but harder to get their attention. |

D. Competitor Backlink Analysis (Hypothetical - requires live analysis of competitor backlinks):

  • Competitor: Jasper.ai
  • Action: Use Ahrefs/SEMrush to find all websites linking to jasper.ai. Filter for relevance and DA/DR.
  • Strategy: For each linking site, identify the context of the link.

* If they linked to a "Jasper.ai review," consider reaching out with our own platform's unique selling points for a comparison or inclusion.

* If they linked to a "Jasper.ai tutorial," consider offering a guest post on "How to Achieve X with AI Content Tools (featuring ContentGenius AI)."


4. Email Templates

These templates are designed to be concise, personalized, and value-driven. Always customize them to the specific prospect and opportunity.

General Personalization Tips:

  • Mention a specific article or page on their site you enjoyed.
  • Explain why their audience would benefit from your content/tool.
  • Keep it brief and to the point.
  • Always include a clear call to action.

Template Set 1: Guest Post Outreach

Initial Email:

Subject: Guest Post Idea for [Recipient's Blog Name] - AI Content Marketing Strategies

Hi [Recipient Name],

My name is [Your Name], and I'm the [Your Title] at [Your Company/Product Name], an AI-powered platform helping businesses streamline their content creation.

I'm a big admirer of [Recipient's Blog Name], especially your recent article on "[Specific Article Title you liked]". Your insights on [mention a specific point from their article] were particularly valuable.

I noticed your blog frequently covers [mention relevant topics like "content marketing trends," "AI tools," or "SEO best practices"]. I believe your audience would greatly benefit from a unique, in-depth article on:

"Beyond the Buzzwords: Actionable AI Strategies for 10x Content ROI"

This piece would delve into practical applications of AI for content strategy, including [mention 2-3 specific sub-points, e.g., "identifying high-performing topics," "automating first drafts," and "optimizing for search intent"], drawing on our internal data and expertise. I'd ensure it's original, well-researched, and aligns perfectly with your editorial guidelines.

Would you be open to considering a guest post from me on this topic, or perhaps another idea that better suits your current content calendar? I'm happy to share a few more ideas or an outline.

Thanks for your time,

[Your Name]

[Your Title]

[Your Company/Product Name]

[Your Website]


Follow-up 1 (5-7 days later):

Subject: Following Up: Guest Post Idea for [Recipient's Blog Name]

Hi [Recipient Name],

Just wanted to gently follow up on my email from [Date of previous email] regarding a guest post for [Recipient's Blog Name].

I proposed "Beyond the Buzzwords: Actionable AI Strategies for 10x Content ROI," which I believe would resonate well with your readers interested in [mention their niche, e.g., "cutting-edge content marketing tactics"].

No worries if now isn't the right time, but I'd love to hear if this is something you might be interested in, or if there's another topic related to AI and content creation that's on your radar.

Best regards,

[Your Name]

[Your Title]


Follow-up 2 (7-10 days after Follow-up 1 - Optional, if no response):

Subject: Quick follow-up: Guest Post for [Recipient's Blog Name]

Hi [Recipient Name],

One last follow-up on my guest post idea for [Recipient's Blog Name].

I understand you're busy, so if you're not interested, no problem at all! Just wanted to make sure my email didn't get lost in

gemini Output

Backlink Outreach Campaign: Comprehensive Plan & Deliverables

This document outlines a detailed, actionable backlink outreach campaign designed to secure high-quality backlinks, enhance your domain authority, improve search engine rankings, and drive referral traffic. It includes strategies for prospect identification, qualification, tailored email templates for various outreach types, and a structured follow-up sequence.


1. Campaign Overview & Strategic Principles

Goal: To acquire relevant, high-authority backlinks by providing value to target websites and their audiences.

Key Principles:

  1. Value-First Approach: Always lead with how your content/resource benefits the recipient or their audience.
  2. Personalization: Generic emails are ignored. Customize every outreach to demonstrate you've researched their site.
  3. Relevance: Target websites genuinely relevant to your niche and content.
  4. Clarity & Conciseness: Get straight to the point. Respect the recipient's time.
  5. Persistence (with Grace): Follow-ups are crucial, but avoid being pushy or annoying.
  6. Quality over Quantity: Focus on securing a few high-quality links rather than many low-quality ones.

2. Prospect Identification & Qualification

Identifying and qualifying prospects is the foundation of a successful campaign. This section details common strategies, essential tools, and critical qualification criteria.

2.1. Outreach Strategies for Prospect Identification

  • Broken Link Building:

* Method: Find relevant websites in your niche with broken outbound links on their pages. Offer your high-quality, relevant content as a replacement for the broken link.

* Why it works: You're providing a service (fixing a broken link) while also offering valuable content.

* Tools: Ahrefs, SEMrush, Moz Link Explorer, Check My Links (Chrome Extension), Screaming Frog.

  • Resource Page Outreach:

* Method: Identify "best resources," "useful links," or "recommended reading" pages on authoritative sites. Pitch your exceptional content for inclusion.

* Why it works: You're offering a valuable addition to a curated list, benefiting their audience.

* Google Search Operators: intitle:resources "your niche", inurl:links "your niche", "best [your niche] articles".

  • Guest Posting:

* Method: Offer to write a unique, high-quality article for a target website in exchange for a backlink to your site within the content or author bio.

* Why it works: You're providing free, valuable content to their site, which saves them time and resources.

* Google Search Operators: "write for us" "your niche", "guest post" "your niche", "submit article" "your niche", "contribute" "your niche".

  • Skyscraper Technique:

* Method: Find popular content with many backlinks in your niche. Create a superior, more comprehensive, or updated version of that content. Then, reach out to sites linking to the original, suggesting they link to your improved version instead.

* Why it works: You're offering an upgrade to their audience, linking to the best available resource.

* Tools: Ahrefs, SEMrush (for competitor backlink analysis).

  • Competitor Backlink Analysis:

* Method: Analyze your competitors' backlink profiles to identify sites linking to them. These sites are already open to linking to content in your niche.

* Why it works: It's a proven method to find relevant, link-worthy domains.

* Tools: Ahrefs, SEMrush, Moz Link Explorer.

  • Unlinked Brand Mentions:

* Method: Find instances where your brand, product, or key personnel are mentioned online without a hyperlink back to your site.

* Why it works: The site already knows and trusts your brand; a simple request to add a link is often successful.

* Tools: Google Alerts, Awario, Mention, Brandwatch.

2.2. Essential Tools for Prospecting

  • Ahrefs / SEMrush / Moz: For competitor backlink analysis, broken link checking, domain authority/rating (DR/DA) metrics, and content gap analysis.
  • Hunter.io / Skrapp.io / Clearbit Connect: For finding email addresses of contacts at target organizations.
  • Google Search Operators: For highly targeted searches (e.g., site:example.com intitle:"resources").
  • LinkedIn Sales Navigator: For finding specific individuals and their roles within companies.
  • Spreadsheet (Google Sheets/Excel) or CRM: For organizing and tracking prospects (see next section).

2.3. Prospect Qualification Criteria

Before reaching out, qualify each prospect to ensure your efforts are well-spent.

  • Relevance: Is the website's content and audience genuinely relevant to your niche and the content you're promoting? (High priority)
  • Domain Authority (DA) / Domain Rating (DR): Target sites with a higher DA/DR than yours, but don't aim too high if your site is new. A good range is often DR 30-70. (High priority)
  • Organic Traffic: Does the website receive a decent amount of organic search traffic? This indicates active readership and search engine visibility.
  • Content Quality: Does the site publish well-written, valuable, and regularly updated content? This suggests they care about quality.
  • Do-follow vs. No-follow: Prioritize sites that typically offer "do-follow" links, as these pass SEO value. While "no-follow" links can drive referral traffic, their direct SEO impact is minimal.
  • Contactability: Can you find a valid email address for the appropriate person (editor, content manager, webmaster)?
  • No Obvious Red Flags: Avoid sites with excessive ads, spammy content, or a history of selling links.

2.4. Prospect List Structure (CRM/Spreadsheet Example)

A well-organized prospect list is crucial for managing your campaign.

| Column Header | Example Data | Description |

| :------------------ | :---------------------------------------------- | :------------------------------------------------------------------- |

| Website URL | https://www.example.com | The target website's main URL. |

| Target Page URL | https://www.example.com/resources/best-tools | The specific page where you want a link (if applicable). |

| Contact Name | Jane Doe | The name of the person you're contacting (Editor, Content Manager). |

| Contact Email | jane.doe@example.com | Their email address. |

| Your Content URL| https://www.yourdomain.com/ultimate-guide | The URL of your content you're suggesting. |

| Outreach Type | Resource Page | e.g., Broken Link, Resource Page, Guest Post, Skyscraper. |

| DR / DA | 65 | Domain Rating (Ahrefs) or Domain Authority (Moz). |

| Specific Issue | Broken link found on "Best Tools" page (link X) | Details for personalization (e.g., specific broken link, old content).|

| Notes | Mentioned our new study on AI trends. | Any additional context for personalization. |

| Outreach Status | Emailed (Day 0) | Not Contacted, Emailed (Day X), Replied (Positive/Negative), Link Acquired, Not Interested, Do Not Contact. |

| Date Emailed | 2023-10-26 | Date of initial outreach. |

| Follow-up Dates | 2023-10-29, 2023-11-02, 2023-11-09 | Planned follow-up dates. |

| Link Status | Pending / Live / Rejected | Whether the link was acquired and is live. |

| Live Link URL | https://www.example.com/resources/best-tools#yourlink | The exact URL where your link is now live. |


3. Email Templates for Initial Outreach

These templates are designed to be personalized. Never send them verbatim. Adapt them to your specific content, the target website, and the contact person.

3.1. General Best Practices for Email Outreach

  • Personalize the Subject Line: Include their site name, article title, or a specific issue.
  • Personalize the Opening: Address them by name and reference something specific about their site/content.
  • Be Concise: Get to the point quickly.
  • Highlight Value: Clearly state what's in it for them or their audience.
  • Clear Call to Action (CTA): What do you want them to do next? (e.g., "take a look," "let me know your thoughts").
  • Professional Signature: Include your name, title, and company.
  • Proofread: Check for typos and grammatical errors.

Template 1: Broken Link Building Outreach

Subject: Broken link on your "[Page Title]" page

Body:

Hi [Name],

I was just browsing your excellent article, "[Page Title]" ([Link to their article]), and noticed a small issue you might want to fix.

It looks like the link to "[Anchor Text of Broken Link]" (currently pointing to [Broken Link URL]) is broken. This can be a bit frustrating for readers looking for that information.

I recently published a comprehensive guide on "[Your Content Topic]" ([Your Content URL]) that covers [briefly explain what your content covers, highlighting its value]. It would be a perfect, up-to-date replacement for that broken link.

No worries if it's not a fit, but I thought you'd appreciate the heads-up.

Thanks for your time!

Best,

[Your Name]

[Your Title]

[Your Company/Website]


Template 2: Resource Page Outreach

Subject: Suggestion for your "[Resource Page Name]" resource page

Body:

Hi [Name],

I'm a big fan of [Website Name] and especially appreciate your "[Resource Page Name]" page ([Link to their resource page]). It's a fantastic collection of resources for anyone interested in [Your Niche/Topic].

I recently developed a resource that I believe would be

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