Social Media Campaign
Run ID: 69cbb7c061b1021a29a8b9f82026-03-31Marketing
PantheraHive BOS
BOS Dashboard

Plan and create content for a complete social media campaign

This document outlines a comprehensive 3-week social media content calendar for your "Green Habits, Brighter Future" campaign, designed to engage your audience, educate them on sustainable living, and promote EcoLife Solutions' new line of eco-friendly home products. Each entry is crafted for immediate use, featuring headlines, body text, calls to action, and visual ideas tailored for various platforms.


Social Media Campaign: Green Habits, Brighter Future

Content Calendar – Step 1 of 2: Generate Content Calendar

Campaign Name: Green Habits, Brighter Future

Campaign Goal(s):

  • Increase brand awareness for EcoLife Solutions and its commitment to sustainability.
  • Drive traffic to the new eco-friendly home products collection on the website.
  • Educate the audience on the benefits and accessibility of sustainable living.
  • Foster community engagement and build a loyal customer base.
  • Generate leads and sales for the new product line.

Target Audience:

Eco-conscious consumers aged 25-45, interested in health, wellness, environmental impact, and seeking practical, effective solutions for sustainable living. This includes millennials and young families looking to reduce their environmental footprint without compromising on quality or convenience.

Key Message:

Sustainable living is accessible, effective, and beneficial for you and the planet. EcoLife Solutions empowers you to make a positive impact with ease, offering high-quality, eco-friendly products that truly work.

Core Hashtags:

#GreenHabitsBrighterFuture #EcoLifeSolutions #SustainableLiving #EcoFriendlyHome #GoGreen #ConsciousConsumer #PlanetOverPlastic #ZeroWasteLiving #HealthyHome #EcoInnovation

Platforms:

Instagram (Feed, Stories, Reels, Live), Facebook (Posts, Stories, Live), Twitter/X, LinkedIn (for thought leadership/brand values).


Week 1: "Kickstart Your Eco-Journey"

Theme: Awareness, education, introducing the problem and solution, setting the stage for sustainable change.

Monday: Campaign Launch & Vision

  • Platform: Instagram, Facebook, Twitter/X, LinkedIn
  • Content Type: Image (Campaign hero graphic/short video)
  • Headline/Hook: "🌱 Your Green Journey Starts Now! Introducing 'Green Habits, Brighter Future'!"
  • Body Text:

* Instagram/Facebook: "At EcoLife Solutions, we believe that every small step towards sustainability creates a ripple effect for a healthier planet. We're thrilled to launch our new campaign, 'Green Habits, Brighter Future,' dedicated to making eco-conscious living simpler, more effective, and truly rewarding! Join us as we explore innovative solutions and introduce our brand new line of eco-friendly home essentials. Let's build a brighter, greener future, together!"

* Twitter/X: "New Campaign Alert! 🚀 'Green Habits, Brighter Future' is here! Join EcoLife Solutions as we launch our new eco-friendly home line & make sustainable living easier for everyone. #GreenHabitsBrighterFuture"

* LinkedIn: "We're excited to announce the launch of our 'Green Habits, Brighter Future' campaign. At EcoLife Solutions, our commitment to sustainability is at the core of everything we do. This campaign highlights our innovative approach to eco-friendly products and our vision for a more sustainable future. We invite our community to join us on this journey."

  • Call to Action: "Follow our journey, explore our mission, and get ready to transform your home! Link in bio to learn more." / "Visit EcoLifeSolutions.com"
  • Visual/Creative Idea: A vibrant, aspirational graphic featuring diverse people interacting with nature, overlaid with the campaign slogan. Or a short, uplifting video montage.
  • Hashtags: #GreenHabitsBrighterFuture #EcoLifeSolutions #SustainableLiving #CampaignLaunch #GoGreen

Tuesday: The Wake-Up Call - Environmental Impact

  • Platform: Instagram (Carousel), Facebook, Twitter/X
  • Content Type: Infographic/Statistic Image (Carousel for Instagram)
  • Headline/Hook: "Did You Know? The Hidden Cost of Everyday Products..."
  • Body Text:

* Instagram/Facebook: "Plastic waste, harmful chemicals, energy consumption... our daily choices have a huge impact. But here's the good news: making conscious swaps is easier than you think! Swipe to learn some startling facts and discover how small changes can lead to a massive collective difference. Let's turn awareness into action!"

* Twitter/X: "Shocking stats on household waste & product impact! 🌍 But don't despair! EcoLife Solutions makes sustainable swaps simple. Learn how. #EcoFacts #SustainableChoices"

  • Call to Action: "What eco-facts surprise you the most? Share below! 👇" / "Ready to make a change? Explore our sustainable alternatives (Link in Bio)."
  • Visual/Creative Idea: A carousel post with each slide revealing a shocking environmental statistic related to household waste or product ingredients, followed by a slide with a hopeful message.
  • Hashtags: #EnvironmentalImpact #PlasticPollution #SustainableFacts #ConsciousConsumer #EcoAwareness

Wednesday: Product Tease - A Glimpse of Innovation

  • Platform: Instagram (Reel/Short Video), Facebook
  • Content Type: Short Video/GIF
  • Headline/Hook: "💧 Say Goodbye to Harsh Chemicals. Hello, Eco-Clean!"
  • Body Text:

* Instagram/Facebook: "Imagine a home sparkling clean, without a single harsh chemical in sight. ✨ Our new line of eco-friendly cleaning solutions is designed to deliver powerful results using only the best plant-based ingredients. Get ready for a clean that's good for your home, your family, and the planet. Sneak peek coming soon!"

  • Call to Action: "Tap the ❤️ if you're ready for a healthier clean! Stay tuned for the official launch!"
  • Visual/Creative Idea: A visually appealing short video showing a hand gently pouring a liquid from a sleek, minimalist EcoLife Solutions bottle into a bucket, with bubbles forming naturally. Focus on textures and a clean aesthetic.
  • Hashtags: #EcoFriendlyCleaning #PlantBased #NonToxicHome #HealthyLiving #ProductTease #CleanHome

Thursday: Simple Eco-Tip & Challenge

  • Platform: Instagram (Story/Reel), Facebook, Twitter/X
  • Content Type: Quick Tip Graphic/Video
  • Headline/Hook: "Tiny Habits, Big Impact: Your Eco-Challenge for Today!"
  • Body Text:

* Instagram/Facebook: "Want to make a difference but don't know where to start? Here's a super simple eco-tip: Switch to reusable bags for ALL your shopping trips! 🛍️ It seems small, but imagine the plastic saved. Take the challenge today! How many reusable bags do you own? Show us your eco-friendly haul!"

* Twitter/X: "Eco-Tip of the Day: Ditch single-use plastic bags! 🛍️ Grab your reusables for every shop. What's your go-to reusable bag? #EcoTip #ZeroWaste"

  • Call to Action: "Share your favorite reusable bag in your Stories and tag us @EcoLifeSolutions! Let's inspire each other!"
  • Visual/Creative Idea: A fun, brightly colored graphic with the tip, or a short video showing someone effortlessly using reusable bags at a grocery store.
  • Hashtags: #EcoTipOfTheDay #ReusableBags #PlasticFree #SmallChangesBigImpact #GoGreenChallenge

Friday: Engaging Question/Poll

  • Platform: Instagram Stories (Poll/Question Sticker), Facebook (Poll)
  • Content Type: Interactive Story/Poll
  • Headline/Hook: "Weekend Eco-Vibes: What's Your Top Sustainable Swap?"
  • Body Text:

Instagram Story: "We're curious! What's one* sustainable swap you've made that you absolutely love and can't live without? Share your wisdom with the EcoLife community! 👇"

* Facebook Poll Options: A) Reusable Water Bottle B) Zero-Waste Skincare C) Eco-Friendly Cleaning D) Thrifted Fashion E) Other (Comment Below!)

  • Call to Action: "Vote in our poll or share your answer in the comments/question box! We love hearing your eco-journey!"
  • Visual/Creative Idea: A visually appealing background with images representing different sustainable swaps, with the poll/question sticker prominently displayed.
  • Hashtags: #SustainableSwaps #CommunityLove #EcoLifeCommunity #WeekendVibes #ShareYourTips

Week 2: "Sustainable Living Made Easy"

Theme: Product spotlight, practical application, making sustainability achievable and highlighting EcoLife Solutions' offerings.

Monday: Product Deep Dive - Hero Product Launch

  • Platform: Instagram (Carousel/Reel), Facebook, LinkedIn (brief)
  • Content Type: Product Showcase (high-quality images/video)
  • Headline/Hook: "✨ Introducing Our Star: The EcoClean All-Purpose Concentrate!"
  • Body Text:

* Instagram/Facebook: "Your home's new best friend has arrived! 💚 Meet the EcoClean All-Purpose Concentrate – one bottle, endless possibilities. Crafted with powerful plant-derived ingredients, it tackles grime, cuts grease, and leaves a fresh scent, all while being kind to the planet. Refillable, effective, and truly sustainable. Say hello to a cleaner, greener home!

* Twitter/X: "It's here! 🎉 Our EcoClean All-Purpose Concentrate is now available. Powerful, plant-based, and planet-friendly. Clean smarter, not harder. #EcoClean #NewProduct"

* LinkedIn: "Innovation in sustainable home care: We're proud to launch our EcoClean All-Purpose Concentrate. This product embodies our commitment to efficacy and environmental responsibility, offering a powerful, plant-based cleaning solution designed for the modern, conscious home."

  • Call to Action: "Shop the EcoClean All-Purpose Concentrate now! Link in bio." / "Discover the power of plant-based clean at EcoLifeSolutions.com."
  • Visual/Creative Idea: A stunning product shot, a short video demonstrating its versatility (e.g., cleaning different surfaces), and infographics on its key benefits (plant-based, concentrated, refillable).
  • Hashtags: #EcoLifeSolutions #EcoClean #AllPurposeCleaner #NewProductLaunch #SustainableHome #PlantBasedCleaning #Refillable

Tuesday: Testimonial Tuesday / User-Generated Content (UGC)

  • Platform: Instagram (Post/Story), Facebook
  • Content Type: Graphic with Quote/Customer Photo
  • Headline/Hook: "Hear From Our Eco-Family! 💚"
  • Body Text:

* Instagram/Facebook: "We love hearing how EcoLife Solutions is making a difference in your homes! Today, we're featuring a wonderful review from [Customer Name/Handle]: 'Using EcoLife's products has completely transformed my cleaning routine. My home feels genuinely clean, and I love knowing I'm not exposing my family to harsh chemicals. Plus, they smell amazing!' – [Customer Name/Handle]. Thank you for being part of our green journey!"

  • Call to Action: "Have you tried our products? Share your experience using #MyEcoLifeStory for a chance to be featured!"
  • Visual/Creative Idea: A clean graphic featuring the customer's quote, potentially with their photo (if permission is granted) or a stock photo representing a happy customer using the product.
  • Hashtags: #CustomerLove #TestimonialTuesday #EcoLifeCommunity #HappyCustomers #SustainableLiving #Review

Wednesday: Behind the Scenes - Our Sustainable Practices

  • Platform: Instagram (Reel/Carousel), Facebook
  • Content Type: Video/Image Series
  • Headline/Hook: "Peek Behind the Green Curtain! How We
sharper4k Output

Social Media Campaign: Image Generation Strategy (sharper4k)

Project: Social Media Campaign

Step: Image Generation (sharper4k)

Description: Detailed plan for visual content creation to support your social media campaign.


1. Objective

The primary objective of this image generation phase is to create a compelling, cohesive, and high-quality suite of visual assets that will effectively communicate your campaign messages, engage your target audience, and drive desired actions across all relevant social media platforms. We aim to produce visuals that are on-brand, platform-optimized, and strategically aligned with your overarching campaign goals.

2. Overall Image Strategy

Our approach to visual content for this social media campaign will focus on the following pillars:

  • Brand Consistency: All visuals will adhere strictly to your brand guidelines, including color palettes, typography, logo usage, and overall aesthetic, to ensure immediate brand recognition.
  • Audience Engagement: Images will be designed to capture attention, evoke emotion, spark curiosity, and encourage interaction (likes, comments, shares, clicks).
  • Platform Optimization: Each image will be tailored to the specific technical and aesthetic requirements of the target social media platforms (e.g., aspect ratios, text overlay rules, visual trends).
  • Storytelling: Visuals will be crafted to tell a part of your brand's story, highlight product/service benefits, or convey key campaign messages in an easily digestible and impactful way.
  • Variety & Dynamism: We will utilize a diverse range of visual formats, including high-quality photography, custom graphics, illustrations, and potentially short animated elements (GIFs/stills from video concepts) to maintain audience interest and cater to different content types.
  • High Quality & Professionalism: All generated images will meet professional standards for resolution, clarity, lighting, and composition.

3. Key Image Themes & Concepts

Based on general social media campaign best practices, we propose the following thematic categories for image generation. Specific content within these themes will be developed in collaboration with you based on your campaign's unique message and target audience.

  1. Product/Service Showcase:

* Concept: Highlighting your core offering with visually appealing, professional shots.

* Examples: Hero shots, in-use scenarios, feature highlights (e.g., close-ups of unique details), benefit-oriented visuals demonstrating problem-solving.

  1. Lifestyle & Aspiration:

* Concept: Connecting your brand to the desired lifestyle or aspirations of your target audience.

* Examples: People enjoying your product/service in relevant settings, aspirational scenes that resonate with your audience's values, emotional connection points.

  1. Educational & Informative Graphics:

* Concept: Breaking down complex information or providing valuable insights in an easy-to-understand visual format.

* Examples: Infographics, data visualizations, step-by-step guides, "how-to" visuals, fact-based graphics, tip sheets.

  1. Behind-the-Scenes & Authenticity:

* Concept: Offering a glimpse into your brand's operations, values, or team to build trust and connection.

* Examples: Team photos, process shots, glimpses of your workspace, product creation journey, company culture.

  1. Community & User-Generated Content (UGC) Encouragement:

* Concept: Visuals designed to foster community, encourage interaction, and potentially feature customer content.

* Examples: "Question of the Day" graphics, poll visuals, "Tag a Friend" prompts, placeholders for future UGC features (e.g., customer spotlights).

  1. Inspirational & Motivational:

* Concept: Sharing uplifting messages or quotes that align with your brand's values, to resonate with and motivate your audience.

* Examples: Branded quote cards, scenic imagery with thoughtful captions, motivational graphics.

4. Content Pillars & Corresponding Image Types

To ensure a balanced content calendar, images will be aligned with common social media content pillars:

  • Pillar 1: Educate

* Image Types: Infographics, data charts, "Did You Know?" graphics, step-by-step guides, comparison visuals, expert tips.

  • Pillar 2: Engage

* Image Types: Poll graphics, "This or That" visuals, question prompts, challenge graphics, fill-in-the-blank images, shareable quotes.

  • Pillar 3: Promote

* Image Types: Product/service hero shots, benefit-focused visuals, call-to-action overlays, testimonial graphics, limited-time offer banners.

  • Pillar 4: Inspire

* Image Types: Aspirational lifestyle imagery, motivational quotes, success stories (visualized), brand mission/value graphics.

  • Pillar 5: Entertain

* Image Types: Humorous graphics (memes, comics), aesthetically pleasing abstract visuals, behind-the-scenes fun, "fun fact" visuals.

5. Technical Specifications & Best Practices

To ensure maximum impact and compatibility across platforms, all generated images will adhere to the following technical standards:

  • Resolution: All images will be generated in high resolution (min. 1080px on the shortest side, often higher) to ensure crispness and quality on various screen sizes.
  • File Formats:

* JPG: For photographs and images with complex color gradients.

* PNG: For graphics with transparent backgrounds, logos, or sharp lines.

* GIF (Stills/Short Loops): For simple animations or to capture a moment from a video.

  • Aspect Ratios (Optimized for Key Platforms):

* Instagram:

* Square: 1:1 (1080x1080px)

* Portrait: 4:5 (1080x1350px)

* Landscape: 1.91:1 (1080x566px)

* Facebook:

* Square: 1:1 (1080x1080px)

* Landscape: 1.91:1 (1200x628px) - for link shares

* Twitter:

* Landscape: 16:9 (1200x675px)

* Square: 1:1 (1080x1080px)

* LinkedIn:

* Landscape: 1.91:1 (1200x627px)

* Square: 1:1 (1200x1200px)

* Pinterest:

* Portrait: 2:3 (1000x1500px recommended) - for optimal visibility

  • Branding Elements:

* Logo Placement: Subtle yet consistent placement, typically in a corner or integrated naturally.

* Color Palette: Strict adherence to your brand's primary and secondary color palettes.

* Typography: Use of approved brand fonts for any text overlays.

  • Text Overlays:

* Conciseness: Keep text minimal and impactful.

* Readability: Ensure font size and contrast make text easily readable on all devices.

* Facebook Ad Rule: While less strict now, we will aim to keep text content on images below 20% of the total image area for potential future ad usage, to maximize reach and minimize costs.

  • Accessibility: We will consider implementing descriptive alt text for images to improve accessibility for visually impaired users.
  • Mobile-First Design: All visuals will be designed with mobile viewing in mind, ensuring they look great and convey their message effectively on smaller screens.

6. Next Steps & Deliverables

  1. Review & Feedback: Please review this comprehensive image generation strategy and provide any feedback or specific preferences you may have.
  2. Asset Submission: Kindly provide us with your existing brand guidelines, high-resolution logos, brand fonts, and any existing product/service photography or visual assets that should be incorporated or referenced.
  3. Content Collaboration: We will schedule a dedicated session to brainstorm specific image concepts for your campaign's content calendar, ensuring alignment with your key messages and calls to action.
  4. Initial Concepts: Following your feedback and asset submission, we will generate a set of initial image concepts for your review and approval, bringing this strategy to life.
social_media_campaign.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);}});}