Social Media Campaign
Run ID: 69cb00decc13ab0c3c373b382026-03-30Marketing
PantheraHive BOS
BOS Dashboard

Plan and create content for a complete social media campaign

Social Media Campaign: Content Calendar & Strategy

This document outlines a comprehensive 4-week content calendar and strategy for your social media campaign, designed to elevate brand awareness, drive engagement, and convert interest into action. This plan is tailored for a hypothetical product: "EcoSense Pro Smart Thermostat", an innovative, eco-friendly device designed to optimize home comfort and energy efficiency.


1. Campaign Overview

  • Campaign Goal: To successfully launch the EcoSense Pro Smart Thermostat, generate significant brand awareness, educate the target audience on its unique benefits (energy savings, comfort, sustainability), drive website traffic, and ultimately increase pre-orders/sales.
  • Target Audience: Environmentally conscious homeowners (25-55) seeking modern, efficient, and smart home solutions; tech enthusiasts; individuals looking to reduce utility bills and minimize their carbon footprint.
  • Key Message: "Experience unparalleled comfort, significant energy savings, and a greener lifestyle with EcoSense Pro – the smart thermostat that thinks for you and for the planet."
  • Campaign Duration: 4 Weeks

2. Content Pillars

Our content strategy will revolve around the following key pillars to ensure a diverse, engaging, and informative feed:

  1. Innovation & Technology: Highlighting the smart features, AI integration, ease of use, and advanced engineering behind EcoSense Pro.
  2. Eco-Friendliness & Sustainability: Emphasizing energy savings, reduced carbon footprint, and the positive environmental impact of choosing EcoSense Pro.
  3. Comfort & Lifestyle: Showcasing how EcoSense Pro seamlessly integrates into daily life, providing personalized comfort and peace of mind.
  4. Value & Savings: Quantifying the financial benefits and return on investment for users through reduced energy bills.
  5. Community & Engagement: Fostering interaction, answering questions, and building a community around smart, sustainable living.

3. Social Media Platform Strategy

Each platform will be utilized strategically to maximize reach and engagement based on its unique audience and content capabilities:

  • Instagram: Visual storytelling, lifestyle imagery, short videos (Reels, Stories), product showcases, behind-the-scenes, polls, and interactive content. Focus on aesthetic appeal and aspirational living.
  • Facebook: Community building, longer-form content, educational videos, customer testimonials, event promotion (e.g., Q&A sessions), link sharing to blog posts or product pages.
  • Twitter (X): Real-time updates, quick tips, industry news, engaging questions, customer service interactions, concise announcements, and trending hashtags.
  • LinkedIn: Professional insights, company news, sustainability reports, technology deep dives, thought leadership, team highlights, and partnership announcements.

4. 4-Week Content Calendar (Detailed)

Below is a detailed content calendar, providing specific content ideas, draft copy, and calls to action for each platform.


Week 1: Launch & Awareness - "Meet EcoSense Pro"

Theme: Introducing the EcoSense Pro, highlighting its core purpose, and building initial excitement.

  • Day 1 (Monday): The Grand Reveal

* Platform: Instagram, Facebook, Twitter, LinkedIn

* Content Type: Image Post (High-quality product shot) / Short Video (Product Teaser)

* Theme/Pillar: Innovation & Technology, Comfort & Lifestyle

* Headline: "Introducing EcoSense Pro: The Future of Home Comfort is Here!"

* Body Text:

* Instagram/Facebook: "Revolutionize your home comfort and energy savings with the all-new EcoSense Pro smart thermostat. Designed for efficiency, engineered for intelligence, and styled for your modern living. Get ready to experience comfort that truly cares for you and the planet. #EcoSensePro #SmartHome #EcoLiving"

* Twitter: "Say hello to EcoSense Pro! 🌿 Smart comfort, effortless savings. Your home, smarter & greener. #EcoSensePro #SmartThermostat"

* LinkedIn: "We're thrilled to unveil our latest innovation: EcoSense Pro. A smart thermostat engineered to deliver unparalleled comfort, significant energy savings, and a commitment to sustainability. Discover how we're redefining smart living. #Innovation #SustainableTech"

* Call to Action: "Learn more about EcoSense Pro – Link in Bio!" (IG/FB) / "Discover EcoSense Pro: [Link]" (Twitter/LinkedIn)

* Visual/Media Idea: A sleek, hero shot of the EcoSense Pro thermostat glowing in a modern, well-lit home interior. Or a 15-second teaser video with dynamic shots of the device and subtle nature sounds.

* Hashtags: #EcoSensePro #SmartHome #EcoLiving #EnergyEfficiency #SustainableTech #Innovation #HomeComfort #TechLaunch

  • Day 3 (Wednesday): Problem-Solution Focus

* Platform: Facebook, Instagram (Carousel)

* Content Type: Carousel Post (Before & After/Problem & Solution slides)

* Theme/Pillar: Value & Savings, Eco-Friendliness

* Headline: "Tired of High Energy Bills? EcoSense Pro Has Your Solution!"

Body Text: "Are fluctuating temperatures and sky-high energy bills a constant headache? 🤯 EcoSense Pro is here to change that. Swipe to see how our intelligent thermostat adapts to your* life, saving you money and reducing your carbon footprint effortlessly. #EnergySavings #SmartSolutions #GoGreen"

* Call to Action: "Stop wasting energy! Explore EcoSense Pro's features: [Link to product page]"

* Visual/Media Idea:

* Slide 1: Image of a frustrated homeowner looking at a high bill. Text: "High Energy Bills?"

* Slide 2: Image of a traditional thermostat. Text: "Inconsistent Temperatures?"

* Slide 3: Image of EcoSense Pro. Text: "EcoSense Pro: Intelligent Comfort, Guaranteed Savings."

* Slide 4: Infographic showing potential savings.

* Hashtags: #EcoSensePro #SmartHome #EnergyEfficiency #SaveMoney #SustainableLiving #HomeUpgrade #ProblemSolved

  • Day 5 (Friday): Weekend Teaser / Engagement

* Platform: Instagram Stories/Reel, Twitter

* Content Type: Poll/Question Sticker (IG Story), Engaging Question (Twitter)

* Theme/Pillar: Community & Engagement

* Headline: "What's Your Weekend Vibe?" (IG) / "Smart Home Dream Feature?" (Twitter)

* Body Text:

* Instagram Story: "Getting ready for a cozy weekend? 🛋️ What's your ideal home temperature? Let EcoSense Pro handle it! (Poll: 'Warm & Snug' vs. 'Cool & Crisp')"

* Twitter: "If you could have ONE smart feature in your home that saves you money and helps the planet, what would it be? 🤔 We think EcoSense Pro ticks both boxes! #SmartHomeGoals #WeekendVibes"

* Call to Action: "Vote in our poll!" (IG) / "Reply below!" (Twitter)

* Visual/Media Idea: Cozy living room scene with a subtle EcoSense Pro in the background (IG Story). Simple text-based tweet.

* Hashtags: #EcoSensePro #WeekendReady #SmartLiving #HomeComfort #Poll #Engage #SmartHomeGoals


Week 2: Education & Benefits - "How EcoSense Pro Works"

Theme: Deep diving into features, benefits, and user experience.

  • Day 8 (Monday): Feature Spotlight - AI Learning

* Platform: Instagram (Reel/Video), Facebook

* Content Type: Short Explainer Video (30-60 sec)

* Theme/Pillar: Innovation & Technology, Comfort & Lifestyle

* Headline: "Meet the Brains Behind Your Comfort: EcoSense Pro's AI!"

Body Text: "Ever wished your thermostat could just know* what you need? EcoSense Pro's advanced AI learns your preferences, adapts to your schedule, and optimizes energy usage – all without you lifting a finger! See it in action. #AIPowered #SmartTech #EffortlessComfort"

* Call to Action: "Watch how EcoSense Pro learns and saves: [Link to demo video/product page]"

* Visual/Media Idea: Animated infographic video showing the AI learning process, user interface, and real-time adjustments.

* Hashtags: #EcoSensePro #SmartThermostat #AI #MachineLearning #HomeAutomation #EnergySavings #ComfortMadeSmart

  • Day 10 (Wednesday): Environmental Impact

* Platform: LinkedIn, Facebook (Infographic)

* Content Type: Infographic Post

* Theme/Pillar: Eco-Friendliness & Sustainability, Value & Savings

* Headline: "Your Home, Your Planet: The EcoSense Pro Impact"

* Body Text:

* LinkedIn: "Beyond personal comfort, EcoSense Pro contributes significantly to a greener planet. Our latest infographic breaks down the environmental benefits and potential carbon footprint reduction for an average household. Join us in making a difference. #Sustainability #GreenTech #CSR"

* Facebook: "Did you know switching to a smart thermostat like EcoSense Pro can drastically cut your household's carbon emissions? Every degree counts! See the numbers and join the movement for a healthier planet. 🌎📊 #GoGreen #EcoFriendlyHome"

* Call to Action: "Download our full sustainability report: [Link]" (LinkedIn) / "Learn more about our mission: [Link]" (Facebook)

* Visual/Media Idea: A clear, engaging infographic showcasing statistics on energy waste, carbon reduction, and financial savings achieved with EcoSense Pro.

* Hashtags: #EcoSensePro #Sustainability #GreenLiving #CarbonFootprint #EnergyConservation #EcoFriendly #ImpactInvesting #SmartHome

  • Day 12 (Friday): User Testimonial / Early Adopter Spotlight

* Platform: Instagram, Facebook

* Content Type: Quote Card Image / Short Video Testimonial

* Theme/Pillar: Community & Engagement, Value & Savings

* Headline: "Hear From Our Early Adopters: Real Comfort, Real Savings!"

* Body Text: "⭐️ 'EcoSense Pro has transformed my home! My energy bills are down, and I've never been more comfortable.' – Sarah M. We love hearing how EcoSense Pro makes a difference in your lives. Ready to share your story? #CustomerLove #Testimonial #HappyHome"

* Call to Action: "Ready for your own EcoSense Pro experience? Shop now: [Link]"

* Visual/Media Idea: High-quality image of Sarah M. (stock photo if no real customer yet) with her quote overlaid, or a short, authentic video testimonial.

* Hashtags: #EcoSensePro #SmartHome #CustomerFeedback #RealSavings #HomeUpgrade #HappyCustomer #Testimonial


Week 3: Lifestyle & Integration - "Live Smarter, Not Harder"

Theme: Showcasing seamless integration into daily life, aesthetic appeal, and broader smart home compatibility.

  • Day 15 (Monday): Seamless Integration

* Platform: Instagram (Carousel), Facebook

* Content Type: Lifestyle Photos (Multiple rooms)

* Theme/Pillar: Comfort & Lifestyle, Innovation & Technology

* Headline: "EcoSense Pro: Designed to Fit Your Life, Flawlessly."

* Body Text: "From your morning routine to winding down your day, EcoSense Pro blends seamlessly into every corner of your home. Its sleek design complements any decor, while its smart features work quietly in the background, ensuring perfect comfort. Swipe to see it in different settings! #SmartHomeDesign #ModernLiving #HomeIntegration"

* Call to Action: "Explore our gallery and envision EcoSense Pro in your home: [Link]"

* Visual/Media Idea: A carousel of beautifully styled photos showing EcoSense Pro in a living room, bedroom, and kitchen – showcasing its aesthetic versatility.

* Hashtags: #EcoSensePro #SmartHomeDecor #InteriorDesign #HomeAutomation #SeamlessTech #ModernHome #LifestyleTech

  • Day 17 (Wednesday): Smart Home Ecosystem

* Platform: LinkedIn, Twitter

* Content Type: Text Post with Image / Short Graphic

* Theme/Pillar: Innovation & Technology

* Headline: "Beyond the Thermostat: EcoSense Pro in Your Smart Ecosystem"

* Body Text:

* LinkedIn: "In today's connected world, interoperability is key. EcoSense Pro is designed to integrate effortlessly with major smart home platforms (e.g., Google Home, Amazon Alexa), creating a truly unified and intelligent living experience. What's your favorite smart home device? #SmartHomeEcosystem #IoT #ConnectedLiving"

* Twitter: "Did you know EcoSense Pro plays well with others? 😉 Seamlessly integrate with your favorite smart home platforms for ultimate control. #SmartHome #IoT #Alexa #GoogleHome"

sharper4k Output

As part of your "Social Media Campaign" workflow, this deliverable outlines the comprehensive image generation specifications for a series of high-impact social media posts. The goal is to create stunning, professional, and consistent visuals that resonate with your target audience and effectively communicate your campaign message.


Social Media Campaign: Image Generation Specifications

Workflow Step: sharper4k → generate_image

Objective: To generate a suite of high-resolution, visually compelling images tailored for various stages and objectives of a social media campaign, ensuring brand consistency and maximum engagement.


1. Campaign Context & Visual Strategy

This phase focuses on defining the visual identity and core messaging for your social media campaign. We aim to create a cohesive visual narrative that captures attention and drives action across all platforms.

  • Campaign Focus (Hypothetical Example): Launch of "ZenithFlow - Smart Water Bottle with Purity Sensor."
  • Core Message: Hydration meets innovation, purity guaranteed, eco-conscious living.
  • Target Audience: Health-conscious individuals, tech enthusiasts, environmentally aware consumers, active lifestyle seekers.
  • Overall Visual Mood: Modern, clean, sophisticated, refreshing, aspirational, trustworthy.

2. Core Visual Guidelines & Brand Integration

To ensure consistency and reinforce your brand identity, all generated images will adhere to the following guidelines:

  • Resolution: All images will be generated in sharper4k (minimum 3840x2160 pixels) to ensure crispness and adaptability across various platforms and future uses.
  • Color Palette: Predominantly cool tones (blues, greens, whites) with metallic accents (silver, matte black) and subtle natural elements (wood, stone, plants). Avoid overly saturated or jarring colors.
  • Lighting: Soft, natural, or studio-quality lighting. Emphasize product features through strategic highlights and shadows. Avoid harsh shadows or overexposure.
  • Style: Minimalist, modern, clean lines, professional photography aesthetic. Avoid clutter.
  • Branding: Subtle integration of brand elements (e.g., product logo visible, consistent color scheme). Ensure space for potential text overlays or campaign hashtags.
  • Authenticity: Where applicable, images should feel relatable and genuine, even if studio-produced.

3. Detailed Image Specifications for Campaign Posts

Below are detailed specifications for various types of social media posts. Each description is designed to be a direct prompt for image generation, ensuring high quality and relevance.

3.1. Post Type 1: Campaign Launch & Announcement

  • Purpose: To introduce the product/campaign with a high-impact, premium visual that immediately captures attention and conveys sophistication.
  • Image Description:

"A high-resolution, studio-quality shot of the ZenithFlow smart water bottle. The bottle is a sleek, matte obsidian black, minimalist in design, with a subtle, soft blue glow emanating from its touch-sensitive LED display showing 100% PURE. It's positioned on a pristine, polished white marble surface. In the blurred background, a few healthy, vibrant green monstera or fiddle-leaf fig leaves are visible, suggesting freshness and nature. The lighting is soft and diffused, creating subtle reflections on the bottle's surface and emphasizing its premium contours. The overall mood is sophisticated and clean. Aspect ratio: 1:1 (Instagram) and 16:9 (Facebook/LinkedIn)."

  • Keywords/Themes: Innovation, Purity, Launch, Premium, Sleek, Modern, Tech, Nature.
  • Recommended Aspect Ratios: 1:1, 4:5, 16:9.

3.2. Post Type 2: Feature Highlight & Benefit Showcase

  • Purpose: To visually demonstrate a key feature or benefit of the product in an engaging and lifestyle-oriented manner.
  • Image Description:

"A dynamic, candid-style shot of a diverse, active individual (e.g., a woman in athletic wear, mid-run in a park, or a professional at a desk) holding the ZenithFlow smart water bottle. The bottle's LED display is clearly visible, showing a hydration progress bar or a specific purity reading. The background is slightly blurred but indicative of an active or productive environment (e.g., a sunny park path, a modern minimalist office). The person's expression is one of satisfaction or focus. Sunlight filters through, creating a natural, energetic feel. The focus is on how the product integrates seamlessly into a healthy, modern lifestyle. Aspect ratio: 4:5 (Instagram) and 16:9 (Stories/Reels)."

  • Keywords/Themes: Lifestyle, Health, Hydration, Convenience, Smart Tech, Active, Everyday Use.
  • Recommended Aspect Ratios: 4:5, 9:16.

3.3. Post Type 3: Engagement & Question-Based Post

  • Purpose: To encourage interaction and conversation around a relatable topic, with the product subtly integrated.
  • Image Description:

"A serene, flat-lay composition featuring the ZenithFlow smart water bottle alongside natural elements. The bottle is placed next to a small, aesthetically pleasing glass of clear water with ice and a lemon slice, a few loose, fresh berries (e.g., blueberries, raspberries), and a small, open journal with a pen. The background is a light, textured wooden table or a crisp white linen. The lighting is bright and airy, creating soft shadows. There's ample negative space at the top or bottom for text overlay (e.g., 'How do you stay hydrated throughout your day?'). The mood is calm, inviting, and thoughtful. Aspect ratio: 1:1."

  • Keywords/Themes: Hydration Habits, Wellness, Reflection, Purity, Self-Care, Community.
  • Recommended Aspect Ratios: 1:1.

3.4. Post Type 4: Call-to-Action & Conversion Focus

  • Purpose: To drive specific actions (e.g., "Shop Now," "Learn More") with a clear, direct visual.
  • Image Description:

"A striking, slightly elevated shot of the ZenithFlow smart water bottle prominently displayed. The bottle is positioned centrally, slightly angled to show its elegant form and the brand logo. A subtle, ethereal glow surrounds the bottle, drawing the eye directly to it. The background is a smooth, gradient transition from a dark teal to a light sky blue, creating depth without distraction. Below the bottle, there's a minimalist 'call to action' button graphic placeholder (e.g., a clean white box) where text like 'Shop ZenithFlow Now' can be overlaid. The image should exude urgency and desire. Aspect ratio: 1:1 and 16:9."

  • Keywords/Themes: Shop Now, Limited Time, Exclusive, Buy, Call to Action, Premium Offer.
  • Recommended Aspect Ratios: 1:1, 16:9.

3.5. Post Type 5: Educational / Infographic Style

  • Purpose: To convey simple, digestible information or facts related to the product or its benefits, using a clean visual style.
  • Image Description:

"A clean, minimalist graphic image designed for easy information consumption. The ZenithFlow smart water bottle is placed in the bottom corner, partially visible, acting as a brand anchor. The main area of the image features three distinct, clean boxes or circles, each containing a simple icon (e.g., a droplet for purity, a battery for long life, a leaf for eco-friendly) and a short, concise fact about the product or hydration (e.g., 'Sensor checks purity in seconds,' '2-day battery life,' 'BPA-free & sustainable materials'). The background is a soft, light grey or white. The text within the boxes uses a modern, sans-serif font. The overall impression is informative and trustworthy. Aspect ratio: 1:1 or 4:5."

  • Keywords/Themes: Facts, Education, Benefits, Purity, Technology, Sustainability, Information.
  • Recommended Aspect Ratios: 1:1, 4:5.

4. Technical Specifications & Best Practices

  • File Format: PNG for graphics and transparency, JPEG (high quality, minimal compression) for photographic content.
  • Color Profile: sRGB for web and social media compatibility.
  • File Naming Convention: CampaignName_PostType_ImageNumber_AspectRatio.ext (e.g., ZenithFlow_Launch_01_1x1.png).
  • Accessibility: Consider generating images with sufficient contrast for text overlays and ensure visual clarity for all users.
  • Adaptability: Ensure key elements are centrally located or within "safe zones" to allow for cropping on different platforms without losing critical information.

5. Next Steps & Usage

Upon generation, these high-resolution images will be delivered to you, ready for immediate deployment across your chosen social media platforms.

  • Review & Selection: Please review the generated images for adherence to specifications and overall campaign fit.
  • Text Overlay Integration: Utilize the designated negative space for campaign-specific text, calls to action, and hashtags.
  • A/B Testing: Consider A/B testing different image variations (if multiple are generated for a single purpose) to optimize engagement.
  • Scheduling: Integrate these visuals into your social media scheduling tool, aligning them with your content calendar.

This detailed image generation plan ensures that your social media campaign will be visually stunning, professionally executed, and strategically aligned with your marketing objectives.

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