Influencer Campaign Planner
Run ID: 69cb14aa42bc43f7e3be73d82026-03-31Marketing
PantheraHive BOS
BOS Dashboard

Plan an influencer marketing campaign with ideal influencer profiles, outreach templates, contract terms, content guidelines, and ROI tracking framework.

Step 1 of 3: Analyze Audience - Comprehensive Deliverable

Executive Summary

Understanding your target audience is the cornerstone of any successful marketing initiative, especially influencer campaigns. This analysis provides a deep dive into the demographic, psychographic, and behavioral characteristics of your ideal customers. By meticulously dissecting who your audience is, what drives them, and where they spend their time online, we can strategically identify the most authentic and impactful influencers, develop compelling content guidelines, and optimize campaign ROI. This detailed profile will serve as the foundational blueprint for all subsequent steps in your Influencer Campaign Planner.

1. Target Audience Profile Overview

To effectively plan an influencer campaign, we must first define our ideal customer. While specific data for your brand is still to be integrated, this section outlines a robust framework for audience analysis, presenting common archetypes and dimensions to consider.

Primary Target Segments (Illustrative Examples - To be refined with your specific brand data):

  • Segment 1: The Conscious Innovator

* Description: Early adopters, tech-savvy, value sustainability and ethical practices. Seek out innovative solutions that align with their values.

* Goal: To discover new products/services that enhance their lifestyle and reflect their principles.

  • Segment 2: The Lifestyle Seeker

* Description: Driven by experiences, personal growth, and self-expression. Actively seek inspiration for travel, fashion, wellness, and home decor.

* Goal: To find products/services that enrich their daily lives, offer convenience, or provide aspirational value.

  • Segment 3: The Practical Problem-Solver

* Description: Value efficiency, reliability, and tangible benefits. Look for products/services that simplify tasks, save time, or offer clear solutions to everyday challenges.

* Goal: To identify effective, trustworthy solutions that deliver on their promises.

2. Detailed Demographic Analysis

Understanding the basic attributes of your audience helps in platform selection, content tone, and influencer relevance.

  • Age Range:

* Insight: Typically spans 18-45 years, with core engagement concentrated in 25-34 year-olds (Young Millennials) and 18-24 year-olds (Gen Z).

* Trend: Gen Z is highly digitally native, valuing authenticity and visual content. Millennials seek convenience, value, and experiences.

* Recommendation: Campaigns should be designed to resonate across these age groups, potentially with tailored messaging or influencer tiers.

  • Gender Split:

* Insight: Often leans slightly female (e.g., 55-60% female, 40-45% male), particularly in lifestyle, beauty, fashion, and home categories. Tech or gaming may skew male.

* Trend: Increasing demand for gender-neutral messaging and diverse representation.

* Recommendation: Ensure influencer selection reflects the gender diversity of your audience and avoids stereotypes.

  • Geographic Location:

* Insight: Primarily urban and suburban areas within key target markets (e.g., North America, Western Europe, specific APAC regions). High concentration in metropolitan hubs.

* Trend: Hyper-local targeting is gaining traction, allowing for more relevant content and activations.

* Recommendation: Prioritize influencers with strong local/regional followings if geographic targeting is crucial.

  • Income Level:

* Insight: Mid to Upper-Mid income, indicating disposable income for discretionary purchases, valuing quality and brand experience.

* Trend: Value for money remains important, but willingness to pay a premium for ethical, sustainable, or high-quality products is growing.

* Recommendation: Position product value proposition clearly, whether it's premium quality, unique features, or long-term savings.

  • Education Level:

* Insight: Predominantly college-educated or pursuing higher education, indicating a propensity for research and informed decision-making.

* Recommendation: Content should be informative, engaging, and provide sufficient detail without being overly academic.

3. Detailed Psychographic Analysis

Psychographics delve into the "why" behind consumer behavior, revealing motivations, values, and lifestyle choices.

  • Interests & Hobbies:

* Insight: Health & Wellness, Sustainable Living, Technology & Gadgets, Travel & Exploration, DIY & Home Improvement, Fashion & Beauty, Personal Development, Gaming, Food & Drink.

* Trend: Niche interests are booming, fostering strong communities around specific passions.

* Recommendation: Identify influencers whose personal interests genuinely align with your brand's offerings, moving beyond superficial categories.

  • Values & Beliefs:

* Insight: Authenticity, Transparency, Sustainability, Community, Personal Growth, Social Responsibility, Innovation, Convenience, Quality.

* Trend: Consumers are increasingly aligning with brands that reflect their values; ethical consumption is paramount.

* Recommendation: Highlight how your brand embodies these values. Partner with influencers who genuinely champion similar causes or principles.

  • Pain Points & Challenges:

* Insight: Information Overload, Time Scarcity, Decision Fatigue, Desire for Simplicity, Environmental Concerns, Lack of Trust in Traditional Advertising, Difficulty Finding Authentic Recommendations.

* Recommendation: Position your product/service as a solution to these pain points. Influencers can effectively demonstrate how your offering alleviates these issues.

  • Aspirations & Goals:

* Insight: Self-Improvement, Achieving Work-Life Balance, Unique Experiences, Connecting with Like-Minded Individuals, Making a Positive Impact, Financial Freedom, Personal Expression.

* Recommendation: Frame your campaign around helping the audience achieve these aspirations, using influencers as relatable guides or aspirational figures.

  • Lifestyle:

* Insight: Active, connected, digital-first, often juggling multiple roles (career, family, personal interests). Values experiences over possessions.

* Recommendation: Content should fit seamlessly into their busy lives – easily digestible, inspiring, and accessible on mobile.

4. Behavioral & Social Media Habits

Understanding how your audience interacts online is crucial for channel selection and content format.

  • Preferred Social Media Platforms:

* Insight:

* Instagram & TikTok: Dominant for visual content, short-form video, lifestyle inspiration, and trend discovery (especially for Gen Z and young Millennials).

* YouTube: Preferred for longer-form content, tutorials, in-depth reviews, and educational material.

* Pinterest: Strong for discovery, planning, and niche interests (e.g., home decor, recipes, fashion inspiration).

* Facebook: Still relevant for older demographics and community groups, but engagement with brand content may be lower.

* LinkedIn: Professional niche; relevant for B2B or thought leadership.

* Recommendation: Focus primary efforts on Instagram, TikTok, and YouTube for broad reach and high engagement. Tailor content formats specifically for each platform.

  • Content Consumption Preferences:

* Insight: Short-form video (reels, stories, TikToks), authentic user-generated content (UGC) style, tutorials & how-tos, 'day in the life' vlogs, honest product reviews, challenges, interactive polls/Q&As.

* Trend: High demand for entertaining and educational content that feels natural, not overtly promotional.

* Recommendation: Empower influencers with creative freedom to produce content in their authentic style, focusing on storytelling and practical demonstrations.

  • Peak Engagement Times:

* Insight: Generally evenings (7 PM - 10 PM local time) and weekends, though this varies significantly by platform and audience segment. Lunch breaks (12 PM - 1 PM) can also see spikes.

* Recommendation: Schedule content releases during these peak times to maximize initial visibility and engagement.

  • Purchase Journey Influence:

* Insight: Influencers play a significant role in discovery (awareness), consideration (product education/reviews), and decision-making (social proof, trust).

* Trend: Consumers often look for multiple points of validation (e.g., seeing a product across several influencers, then checking reviews).

* Recommendation: Design campaigns to touch different stages of the customer journey, from broad awareness to specific calls-to-action.

5. Influencer Consumption & Trust Factors

What makes an influencer credible and compelling to your audience?

  • Types of Influencers They Follow:

* Insight: A mix of Micro-influencers (10K-100K followers) and Nano-influencers (1K-10K followers) for niche expertise, authenticity, and higher engagement rates. Some Macro-influencers (100K-1M followers) for broader reach and aspirational appeal.

* Trend: The shift towards micro and nano influencers continues due to higher perceived authenticity and community trust.

* Recommendation: Prioritize micro and nano influencers for deeper engagement and targeted reach. Use macro influencers strategically for brand awareness spikes.

  • Drivers of Trust & Credibility:

* Insight: Transparency (disclosing sponsorships), authenticity (genuine passion for the product), relatability, consistent messaging, expertise in their niche, and a strong, engaged community.

* Trend: Audiences are highly sensitive to inauthenticity; overt sales pitches are often ignored.

* Recommendation: Seek out influencers who genuinely use and believe in your product, and who have a track record of transparent communication with their audience.

  • Content That Resonates:

* Insight: Unboxing videos, honest reviews (pros and cons), personal testimonials, creative demonstrations, educational content, 'get ready with me' style videos, and behind-the-scenes glimpses.

* Recommendation: Encourage influencers to integrate your product seamlessly into their existing content style rather than forcing a script.

6. Key Insights & Trends for Influencer Strategy

  • Authenticity Over Perfection: Audiences prioritize genuine, relatable content over highly polished, unrealistic portrayals. Influencers who share their real experiences and opinions build stronger trust.
  • Video-First Dominance: Short-form video platforms (TikTok, Instagram Reels, YouTube Shorts) are paramount for discovery and engagement, especially among younger demographics.
  • Community-Driven Engagement: Influencers who foster strong, interactive communities often deliver higher quality engagement and more loyal followers. Look for high comment-to-like ratios.
  • Value-Driven Content: Consumers seek content that entertains, educates, inspires, or solves a problem. Purely promotional content is less effective.
  • Rise of Niche & Micro-Influencers: These influencers offer highly targeted reach, deeper engagement, and higher perceived authenticity due to their specialized audiences and direct connection.
  • Ethical & Sustainable Alignment: Brands and influencers demonstrating social responsibility and sustainable practices resonate strongly with a growing segment of the audience.

7. Recommendations for Influencer Campaign Strategy

Based on this audience analysis, here are initial strategic recommendations:

  • Influencer Selection:

* Prioritize Alignment: Focus on influencers whose personal brand, values, and audience demographics/psychographics are a strong, organic match for your brand.

* Balance Reach & Engagement: Mix micro/nano influencers (for high engagement and authenticity) with strategic macro influencers (for broader awareness).

* Portfolio Diversity: Consider a diverse range of influencers in terms of niche, background, and content style to reach different facets of your target audience.

  • Content Strategy:

* Embrace Authenticity: Encourage influencers to create content in their natural style, sharing genuine experiences and opinions. Provide creative briefs, but avoid rigid scripts.

* Video-Centric Approach: Design campaigns with a strong emphasis on short-form video (Reels, TikTok) and longer-form educational/review content (YouTube).

* Storytelling & Value: Focus on narratives that demonstrate how your product solves a problem, enhances a lifestyle, or aligns with audience values.

* Interactive Elements: Incorporate polls, Q&As, challenges, and user-generated content prompts to boost engagement.

  • Platform Strategy:

* Primary Focus: Instagram, TikTok, and YouTube should be your core platforms due to high audience presence and content consumption habits.

* Secondary Focus: Pinterest for visual discovery and inspiration; consider Facebook Groups for community engagement

gemini Output

Your Ultimate Blueprint: Mastering Influencer Marketing Campaigns

Unlock Unprecedented Growth with Strategic Influencer Partnerships

In today's dynamic digital landscape, influencer marketing is no longer an option – it's a necessity. A well-executed influencer campaign can skyrocket brand awareness, drive authentic engagement, and deliver measurable ROI. But planning one can be complex.

This comprehensive guide is your ultimate blueprint, providing a detailed, actionable framework to design, execute, and optimize your next influencer marketing campaign. From identifying the perfect partners to tracking your success, we've got you covered.


1. Campaign Overview & Strategic Foundation

Every successful campaign starts with a clear strategy. Define your objectives, understand your audience, and craft a compelling core message.

1.1 Define Your Campaign Goals

What do you want to achieve? Use the SMART framework (Specific, Measurable, Achievable, Relevant, Time-bound) to set clear objectives.

  • Examples of SMART Goals:

* Brand Awareness: Increase Instagram reach by 25% among 18-34 year olds in North America within Q3.

* Engagement: Achieve an average engagement rate of 5% across all influencer content by the end of the 8-week campaign.

* Website Traffic: Drive 5,000 unique visitors to our new product page via influencer links within 4 weeks of launch.

* Sales/Conversions: Generate 500 new product sales using unique influencer discount codes within 6 weeks.

* Lead Generation: Collect 200 new email subscribers through influencer-promoted landing pages in one month.

1.2 Identify Your Target Audience

Who are you trying to reach? Your influencers should have an audience that aligns perfectly with your ideal customer profile.

  • Key Demographics: Age, gender, location, income level, occupation.
  • Psychographics: Interests, values, lifestyle, pain points, aspirations.
  • Online Behavior: Preferred social media platforms, content consumption habits.

1.3 Craft Your Core Message & Value Proposition

What unique benefit does your product or service offer? How can influencers authentically communicate this?

  • Key Message: A concise, memorable statement about your brand or campaign.
  • Call to Action (CTA): What do you want the audience to do after seeing the content? (e.g., "Shop now," "Learn more," "Sign up," "Download the app").
  • Brand Voice & Tone: Ensure consistency with your overall brand identity.

2. Ideal Influencer Profiles: Finding Your Perfect Match

The right influencer can make or break your campaign. Go beyond follower counts to find authentic voices with engaged audiences.

2.1 Influencer Tiers & Their Value

  • Nano-Influencers (1K-10K followers): Highly niche, authentic, strong community trust, excellent engagement rates. Ideal for hyper-targeted campaigns and authentic reviews.
  • Micro-Influencers (10K-100K followers): Engaged and loyal audiences, often seen as accessible experts. Great for driving conversions and building community.
  • Macro-Influencers (100K-1M followers): Wider reach, professional content creators, good for brand awareness and driving traffic.
  • Mega-Influencers/Celebrities (1M+ followers): Massive reach, significant brand awareness, but often lower engagement rates and higher costs. Best for mass market campaigns.

2.2 Key Criteria for Influencer Selection

  • Niche & Relevance: Do their content and audience align with your brand and product?
  • Audience Demographics: Do their followers match your target audience (age, location, interests)? Request audience insights if possible.
  • Engagement Rate: A high follower count means little without engagement. Look for comments, likes, shares, saves relative to follower count (typically 2-10% is good, higher for nano/micro).
  • Authenticity & Trust: Does their content feel genuine? Do they have a real connection with their audience?
  • Content Quality: Are their photos, videos, and captions professional and appealing?
  • Brand Alignment: Do their values, past collaborations, and overall persona resonate with your brand image?
  • Presence of Red Flags:

* Suspiciously high follower growth in short periods.

* Low engagement despite high follower count (sign of bots/fake followers).

* Generic comments (e.g., "Nice pic!").

* Previous collaborations with direct competitors.

* Inconsistent posting schedule or low-quality content.

2.3 Influencer Profiling Checklist

Use this checklist to evaluate potential partners:

  • [ ] Platform(s): Primary platforms (Instagram, TikTok, YouTube, Blog, etc.)
  • [ ] Follower Count:
  • [ ] Average Likes/Comments/Shares:
  • [ ] Calculated Engagement Rate:
  • [ ] Audience Demographics (Age, Gender, Location):
  • [ ] Audience Interests:
  • [ ] Niche/Content Pillars:
  • [ ] Past Brand Collaborations: (Review quality and types of brands)
  • [ ] Content Style/Aesthetics:
  • [ ] Brand Fit Score (1-5):
  • [ ] Notes/Observations: (Authenticity, communication style, etc.)

3. Influencer Outreach & Communication Strategy

First impressions matter. Craft compelling outreach messages that highlight mutual value and foster genuine connections.

3.1 Pre-Outreach Checklist

  • [ ] Research: Thoroughly understand the influencer's content, audience, and past collaborations.
  • [ ] Personalization: Find something specific to compliment or reference from their work.
  • [ ] Value Proposition: Clearly articulate what's in it for them (payment, free product, exposure, long-term partnership).
  • [ ] Clear Ask: Be specific about what you're proposing.
  • [ ] Contact Method: Find their preferred contact method (email, DM, talent agency).

3.2 Outreach Templates

Template 1: Initial Contact - Personalized & Value-Driven

Subject: Collaboration Opportunity: [Your Brand Name] x [Influencer's Name]

Hi [Influencer's Name],

My name is [Your Name] and I'm the [Your Title] at [Your Brand Name]. I've been following your work on [Platform, e.g., Instagram] for a while now, and I particularly loved your recent [specific piece of content, e.g., "reel on sustainable fashion" or "review of the XYZ product"]. Your authentic voice and engaged community really resonate with our brand's values.

At [Your Brand Name], we create [briefly describe your product/service and its unique benefit, e.g., "eco-friendly skincare products that deliver visible results"]. We believe your audience, who values [mention specific audience interest, e.g., "conscious living and effective beauty solutions"], would genuinely connect with our mission and products.

We're looking to partner with creators like you for an upcoming campaign focused on [campaign theme/goal, e.g., "natural beauty routines"]. We'd love to explore a collaboration where you could [suggest content idea, e.g., "showcase our new serum in your daily routine"].

Would you be open to a brief chat next week to discuss this exciting opportunity further? I've attached a brief deck with more information about our brand and campaign goals for your review.

Looking forward to hearing from you!

Best,

[Your Name]

[Your Title]

[Your Brand Name]

[Website Link]

[Social Media Link]


Template 2: Follow-Up Email

Subject: Following Up: Collaboration Opportunity with [Your Brand Name]

Hi [Influencer's Name],

Just wanted to gently follow up on my email from [Date] regarding a potential collaboration with [Your Brand Name].

We're still very keen on the possibility of working together, given your amazing content and engaged audience. I understand you're busy, but I wanted to make sure our initial message didn't get lost in your inbox.

Would you have 10-15 minutes sometime this week for a quick call to discuss how we could create something truly impactful for your audience?

Thanks,

[Your Name]


Template 3: Post-Interest - Proposal/Briefing

Subject: [Your Brand Name] x [Influencer's Name] - Campaign Brief & Proposal

Hi [Influencer's Name],

Thank you for your interest in partnering with [Your Brand Name]! It was great connecting with you.

As discussed, we're thrilled about the potential to collaborate on our upcoming [Campaign Name] campaign. Below is a summary of our proposal and the campaign brief:

Campaign Goal: [Reiterate primary campaign goal, e.g., "Drive awareness and trial for our new XYZ product."]

Product/Service: [Specific product/service to be featured]

Key Message: [Core message, e.g., "Experience radiant skin with our all-natural ingredients."]

Call to Action: [Specific CTA, e.g., "Shop now at [link] and use code [YOURCODE] for 15% off!"]

Proposed Deliverables:

  • 1x Instagram Feed Post (photo or carousel)
  • 2x Instagram Stories (video or static, minimum 15 seconds each)
  • 1x TikTok Video (15-30 seconds)
  • [Any other deliverables, e.g., blog post, YouTube mention]

Content Guidelines:

  • Tone: [e.g., Authentic, inspiring, educational, fun]
  • Key Talking Points: [List 2-3 essential points to include]
  • Mandatory Hashtags: #YourBrandName #CampaignName #Ad #[RelevantNicheHashtag]
  • Mandatory Tags: @YourBrandName
  • Disclosure: Clear disclosure of sponsored content (e.g., #Ad, "Paid partnership with [Your Brand Name]").
  • Approval Process: All content drafts must be submitted for approval [X days] prior to posting.

Timeline:

  • Content Draft Submission: [Date]
  • Feedback Rounds: [Date]
  • Final Content Approval: [Date]
  • Live Posting Date: [Date]

Compensation:

We are offering a flat fee of [Amount] for the agreed-upon deliverables. We will also provide [Product/Service] as part of this collaboration. Payment terms are [e.g., 50% upfront, 50% upon content approval/posting].

Please review this brief and let us know if you have any questions or require any adjustments. We're excited about the possibility of creating something amazing together!

Best,

[Your Name]


3.3 Best Practices for Communication

  • Be Responsive: Promptly reply to emails and DMs.
  • Be Clear & Concise: Avoid jargon and get straight to the point.
  • Be Respectful: Value their time and creative input.
  • Provide All Necessary Information: Ensure they have everything they need to create great content (product samples, brand guidelines, links, codes).
  • Maintain Professionalism: Even if things get challenging, keep communication professional.

4. Contract Terms & Legal Considerations

A solid contract protects both your brand and the influencer, ensuring clarity and compliance.

4.1 Key Contract Clauses

  • Scope of Work & Deliverables: Clearly list all required content pieces, platforms, and posting dates.
  • Payment Terms: Agreed-upon compensation, payment schedule (upfront, upon approval, upon posting), and payment method.
  • Usage Rights: Specify how your brand can repurpose the influencer's content (e.g., for ads, website, other social channels) and for how long.
  • Disclosure Requirements: Mandate clear and conspicuous disclosure of sponsored content (e.g., #Ad, #Sponsored, "Paid partnership with [Brand Name]").
  • Exclusivity: If required, specify a period during which the influencer cannot promote competitor products. Be reasonable and specific (e.g., "for [Product Category] for [Duration] in [Geographic Region]").
  • Content Approval Process: Outline the submission deadlines, review rounds, and final approval process.
  • Performance Metrics & Reporting: What data will be shared, and when?
  • Confidentiality: Protect sensitive campaign details.
  • Termination Clause: Conditions under which either party can terminate the agreement.
  • Force Majeure: Protects both parties in unforeseen circumstances.
  • Indemnification: Protects against legal claims resulting from the other party's actions.
  • Governing Law: Specifies the jurisdiction whose laws will govern the contract.

4.2 Legal Compliance

  • FTC Guidelines (USA): Influencers must clearly disclose their material connection to your brand. This means using hashtags like #Ad, #Sponsored, or features like Instagram's "Paid partnership with" label. Disclosure must be "clear and conspicuous."
  • ASA (UK) / ACCC (Australia) / Other Local Regulations: Be aware of and comply with advertising standards and consumer protection laws in the influencer's and your target audience's region.
  • Data Privacy (GDPR, CCPA): Ensure any data collection through influencer campaigns is compliant.

4.3 Payment Structures

  • Flat Fee: A fixed payment for a set of deliverables. Most common.
  • Product-in-Kind: Free products or services in exchange for content. Often used with nano/micro-influencers for authentic reviews.
  • Performance-Based (Commission/Affiliate): Influencers earn a percentage of sales or leads generated through unique codes/links. Great for direct response campaigns.
  • Hybrid: A combination of a flat fee and performance-based incentives.

5. Content Guidelines & Creative Brief

Empower influencers to create authentic, engaging content while ensuring brand consistency.

5.1 Core Messaging & Brand Voice

  • Key Themes: What overarching ideas should the content convey?
  • Brand Personality: Is your brand playful, serious, educational, luxurious, adventurous?
  • Mandatory Inclusions: Specific product features, benefits, or unique selling points that must be mentioned.
  • Optional Inclusions: Suggestions for creative angles or personal anecdotes.

5.2 Content Formats & Platforms

  • Instagram: Feed posts (single image, carousel), Reels, Stories (video, static, polls, questions), IGTV.
  • TikTok: Short-form video challenges, trends, product demonstrations.
gemini Output

Influencer Campaign Planner: Optimized & Finalized Deliverable

This document outlines a comprehensive, actionable plan for your influencer marketing campaign, covering ideal influencer profiles, outreach strategies, contractual terms, content guidelines, and a robust ROI tracking framework.


1. Ideal Influencer Profiles & Discovery

Identifying the right influencers is paramount for campaign success. Our strategy focuses on a multi-tiered approach to ensure maximum reach, engagement, and authenticity.

1.1. Target Audience Alignment:

  • Demographics: Align influencer's audience with your target customer age, gender, location, income, and interests.
  • Psychographics: Ensure shared values, lifestyle, and aspirations between the influencer's audience and your brand's ethos.

1.2. Influencer Tiers & Characteristics:

| Tier | Follower Count (Approx.) | Key Characteristics |

| --- | --- | ---

influencer_campaign_planner.md
Download as Markdown
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);}});}