Investor Update Email
Run ID: 69cc41e06beabe319cec8fc82026-03-31Business
PantheraHive BOS
BOS Dashboard

Craft polished monthly/quarterly investor update emails with KPI highlights, milestones, challenges, asks, and financial snapshot.

Step 1 of 3: Analyze Audience for Investor Update Email

1. Introduction and Purpose

This document provides a comprehensive analysis of the target audience for your investor update emails. Understanding your investors – their motivations, priorities, and preferred communication styles – is crucial for crafting updates that are impactful, build trust, and effectively convey your company's progress and needs. The goal of this analysis is to ensure your investor communications are not just informative, but also strategic, fostering strong relationships and maintaining confidence in your venture.

2. Core Investor Segments and Their Drivers

Investors are not a monolithic group. Tailoring your message requires understanding the different types of investors on your cap table. While there can be nuances, most fall into these primary categories:

  • Venture Capital (VC) Firms:

* Drivers: Seeking significant, often exponential, returns (e.g., 10x+ on their investment) within a specific fund lifecycle (typically 7-10 years). Focused on market disruption, scalable business models, competitive advantage, and clear exit pathways (acquisition or IPO). They are highly analytical, data-driven, and often have a portfolio of companies.

* Key Interest: Growth metrics, market penetration, product-market fit validation, competitive landscape, path to profitability/sustainability, next funding round strategy.

  • Angel Investors / High Net Worth Individuals (HNWIs):

* Drivers: Often driven by a mix of financial return, passion for the industry/founder, and a desire to support innovation. They may have a longer investment horizon than VCs and are sometimes more emotionally invested. Some may be strategic angels providing mentorship or connections.

* Key Interest: Overall progress, founder's vision and execution, major milestones, personal connection, potential for a good return, challenges and how they are being overcome.

  • Limited Partners (LPs) in a Fund (if you're a fund manager):

* Drivers: Focused on the overall fund performance, diversification, and adherence to the fund's investment thesis. They want to see consistent, professional management and a clear understanding of the fund's strategy and risks.

* Key Interest: Fund-level performance (IRR, TVPI, DPI), significant portfolio company updates (especially outliers), capital calls/distributions, market outlook, fund strategy adjustments.

  • Strategic Investors / Corporate VCs (CVCs):

* Drivers: Beyond financial return, they often seek strategic alignment, access to new technologies, market intelligence, potential acquisition targets, or partnership opportunities that benefit their core business.

* Key Interest: Product development relevant to their industry, market trends, partnership potential, competitive advantages, and how your company fits into the broader ecosystem.

  • Family Offices:

* Drivers: Often similar to HNWIs but with a more institutional approach to wealth management. They prioritize wealth preservation, long-term growth, and often have specific ethical or impact investment mandates.

* Key Interest: Sustainable growth, risk management, capital efficiency, long-term vision, and alignment with their broader investment objectives.

3. Key Information Priorities by Investor Type

While some information is universally important, the emphasis can shift:

| Information Category | VC Firms | Angel Investors | Strategic Investors |

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

| KPI Highlights | Growth metrics (CAC, LTV, churn, MRR/ARR), unit economics, burn multiple, capital efficiency. | Revenue, user growth, key product engagement, operational efficiency. | Product adoption, partnership metrics, market share in target segment, tech integration. |

| Milestones | Funding rounds, key hires, major product launches, significant partnerships, market expansion. | Product launches, customer wins, team growth, media mentions, awards. | Strategic partnerships, successful pilots, major feature releases, M&A potential. |

| Challenges | Market shifts, competitive threats, regulatory hurdles, scaling issues, fundraising outlook. | Operational roadblocks, team challenges, unexpected market changes, funding needs. | Integration challenges, competitive response, intellectual property risks, regulatory changes. |

| Asks | Introductions to follow-on investors, strategic hires, M&A advisors, market insights. | Introductions for sales/partnerships, specific talent recruitment, advice on operational issues. | Introductions to potential partners, feedback on product strategy, industry insights. |

| Financial Snapshot | Detailed burn rate, runway, cash position, revenue projections, key expense categories. | High-level revenue, cash in bank, runway, key spend areas, profitability outlook. | Revenue relevant to their sector, specific R&D spend, potential for joint ventures. |

4. Preferred Communication Style & Frequency

  • Tone: Professional, confident, transparent, and realistic. Avoid overly promotional language but maintain optimism. Be direct and concise.
  • Frequency:

* Monthly: Ideal for early-stage companies (Seed-Series A) with rapid developments and higher burn rates.

* Quarterly: Standard for more mature startups (Series B+) with established operations and longer development cycles.

* Ad-hoc: Major news (e.g., new funding, significant partnership, crisis) warrants an immediate update.

  • Length: Concise and to the point. Most investors will scan. Provide enough detail to be informative, but avoid excessive prose. An executive summary is critical.
  • Format:

* Email Body: Use for the executive summary and key highlights.

* Attached Document (PDF): For detailed financials, appendices, and deeper dives into specific metrics or initiatives. This allows investors to dig in if they wish, without cluttering the email.

* Visuals: Charts, graphs, and infographics are highly effective for presenting data quickly and clearly.

  • Transparency: Be honest about challenges. Investors appreciate founders who can identify problems and articulate their plan to overcome them, rather than sugarcoating issues.

5. Common Investor Concerns & How to Address Them Proactively

Investors are always assessing risk. Proactively addressing potential concerns builds confidence:

  • Burn Rate & Runway: "How much cash do you have and how long will it last?"

* Address: Clearly state cash position, monthly burn, and estimated runway. Explain significant changes in burn or any initiatives to extend runway.

  • Next Funding Round: "Are you on track for your next raise? What's the plan?"

* Address: Provide updates on milestones relevant to the next round, market conditions, and your current fundraising strategy (if applicable).

  • Competitive Landscape: "Are you losing ground to competitors?"

* Address: Acknowledge key competitors and explain your differentiated strategy, competitive advantages, or market positioning.

  • Market Shifts: "Is the market still viable? Are there new threats or opportunities?"

* Address: Briefly discuss relevant market trends, how they impact your business, and any adjustments to your strategy.

  • Team Stability & Performance: "Are you retaining key talent? Is the team executing effectively?"

* Address: Highlight key hires, team achievements, and address any significant departures with a plan for succession.

  • Product-Market Fit: "Is the product still resonating with customers?"

* Address: Share customer feedback, engagement metrics, and product roadmap updates to show continued validation.

6. Data Insights & Trends in Investor Communications

  • Brevity is King: Investors are time-poor. The most effective updates are concise, scannable, and get straight to the point.
  • Data-Driven Narrative: Back up claims with clear, consistent data. Visualizations (charts, graphs) improve comprehension and retention.
  • Transparency Builds Trust: Openness about challenges, coupled with proactive solutions, is highly valued. It signals maturity and resilience.
  • Personalization: While a mass email is common, consider adding a personalized opening line or a specific note to key investors who have provided support or expressed particular interest.
  • Forward-Looking: Beyond reporting on the past, investors want to understand what's next. Include a section on upcoming goals and priorities.
  • The "Ask": Don't be afraid to clearly state what you need. Investors want to help, but they need to know how.

7. Actionable Recommendations for Tailoring the Email

Based on this analysis, here are specific recommendations:

  1. Segment Your Investor List (If Applicable): If you have a diverse investor base (e.g., VCs and Angels), consider creating slightly different versions or adding personalized notes.
  2. Start with an Executive Summary: Always begin with 3-5 bullet points summarizing the most critical updates (good and bad) and key metrics. This caters to time-constrained investors.
  3. Prioritize KPIs: Select 3-5 most important metrics that reflect your current stage and strategic focus. Present them consistently month-over-month or quarter-over-quarter.
  4. Balance Wins and Challenges: Dedicate sections to both. For challenges, clearly state the problem, the impact, and the steps you are taking to mitigate or overcome it.
  5. Clearly State the "Ask": Make it easy for investors to help. Be specific (e.g., "We're looking for an introduction to X at Y company," "Seeking recommendations for a VP of Marketing").
  6. Maintain Consistent Structure: Use the same headings and order in every update. This makes it easier for investors to quickly find the information they need and track progress over time.
  7. Leverage Visuals: Embed simple, clear charts for financial highlights, growth metrics, and key trends directly in the email or within a linked document.
  8. Provide a Detailed Appendix (PDF): Keep the email concise, but offer a comprehensive attachment for those who want to dive deeper into financials, detailed operational metrics, or specific project updates.
  9. Proofread Meticulously: Errors undermine professionalism.

8. Next Steps for Content Generation (Step 2)

To move forward with crafting the actual investor update email, we will need the following information:

  • Reporting Period: Is this a monthly or quarterly update? What are the start and end dates of the period?
  • Key Performance Indicators (KPIs): List the 3-5 most critical KPIs you track, along with their values for the current period and the previous period (or relevant comparison).
  • Major Milestones Achieved: What significant accomplishments occurred during the reporting period? (e.g., product launches, customer wins, key hires, partnerships, funding news).
  • Top 1-2 Challenges/Learnings: What significant obstacles did you encounter, and what steps are you taking to address them?
  • Specific "Asks" for Investors: What concrete support or introductions are you seeking?
  • Financial Snapshot Data:

* Cash in bank (start and end of period)

* Monthly Burn Rate

* Estimated Runway

* Revenue (if applicable)

* Any other critical financial highlights.

  • Upcoming Goals/Priorities: What are the 1-3 most important objectives for the next reporting period?
  • Company Name and Logo: For branding.
  • Founder/CEO Name and Title: For the closing.

Once this information is provided, we can proceed to Step 2: Generate Content for your investor update email.

gemini Output

Investor Update Email: [Month/Quarter] [Year] - [Company Name] Performance & Progress

This document provides a comprehensive, detailed, and professional template for your monthly or quarterly investor update email. It is designed to be ready for publishing, with placeholders for specific data and achievements. Please customize the bracketed [ ] sections with your company's actual information.


Subject Line Options:

  • [Company Name] Investor Update: [Month/Quarter] [Year] - Strong Growth & Key Milestones
  • [Company Name] Investor Briefing: [Month/Quarter] [Year] Performance & Strategic Progress
  • [Month/Quarter] [Year] Investor Update: [Company Name] - Focus on [Key Achievement/Metric]

Email Body Content:

Subject: [Company Name] Investor Update: [Month/Quarter] [Year] - Strong Growth & Key Milestones

Dear Investors,

We hope this email finds you well.

We are pleased to share our latest update on [Company Name]'s performance and strategic progress for the [Month/Quarter] ending [Date]. This period has been marked by significant advancements in [mention 1-2 key areas, e.g., customer acquisition, product development, market expansion], and we continue to build strong momentum towards our long-term vision.

Thank you for your continued trust and support.


1. Executive Summary: Key Highlights of the [Month/Quarter]

  • [Key Metric 1] Growth: Achieved [X]% MoM/QoQ growth in [e.g., MRR, Active Users, Revenue], reaching $[Y] / [Z] users.
  • Major Milestone: Successfully launched [Product/Feature Name] ahead of schedule, resulting in [X]% increase in engagement.
  • Strategic Partnership: Secured a pivotal partnership with [Partner Name], projected to open new markets and drive [X]% revenue growth in next quarter.
  • Team Expansion: Welcomed [Number] new hires in key roles, strengthening our [e.g., engineering, sales, marketing] capabilities.
  • [Financial Highlight]: Maintained a healthy cash runway of [X] months with efficient burn rate management.

2. Performance Deep Dive

##### 2.1. KPI Highlights & Operational Metrics

Here's a closer look at our key performance indicators for the period:

  • Revenue Growth (MRR/ARR):

* Current MRR/ARR: $[X] (up from $[Y] last [month/quarter])

* Growth Rate: [Z]% MoM/QoQ

Context:* This growth was primarily driven by [e.g., successful upsell campaigns, new customer acquisition from X channel, increased average deal size].

  • Customer Acquisition:

* New Customers Acquired: [X] (total active customers now [Y])

* Customer Acquisition Cost (CAC): $[Z] (vs. $[A] last [month/quarter])

Context:* Our targeted [e.g., digital marketing campaign, referral program] proved highly effective, reducing CAC by [B]%.

  • Customer Engagement & Retention:

* Average Daily/Monthly Active Users (DAU/MAU): [X] / [Y] (up [Z]% MoM/QoQ)

* Churn Rate: [X]% (vs. [Y]% last [month/quarter])

Context:* The launch of [Feature Name] significantly boosted user engagement, and our proactive customer success efforts helped keep churn low.

  • Product Usage:

* [Key Product Metric, e.g., Features used per user, time spent in app]: [X] (up [Y]% MoM/QoQ)

Context:* We're seeing strong adoption of [specific feature], validating our recent product investments.

##### 2.2. Milestones Achieved

  • Product Development:

* [Product/Feature A] Launch: Successfully rolled out [Product/Feature A] to all users on [Date]. Initial feedback is overwhelmingly positive, with [X]% adoption within the first week.

* [Product/Feature B] Beta: Initiated private beta for [Product/Feature B] with [Number] key customers. Data from the beta will inform our Q[X] public launch.

  • Market & Sales:

* [Geographic Expansion]: Successfully entered the [Country/Region] market, securing our first [Number] enterprise clients.

* [Partnership Signed]: Finalized a strategic integration partnership with [Partner Company], enhancing our value proposition and expanding our distribution channels.

* [Sales Target Exceeded]: Exceeded our quarterly sales target by [X]%, driven by strong performance from our [e.g., enterprise sales, SMB sales] team.

  • Team & Operations:

* [Key Hire]: Welcomed [Name] as our new [Title], bringing invaluable expertise in [Area].

* [Operational Improvement]: Implemented [New CRM/ERP system], streamlining our sales/customer support processes and improving data visibility.


3. Challenges & Learnings

Transparency is key, and we want to share the challenges we've encountered and our approach to overcoming them.

  • [Challenge 1]: We observed a slight slowdown in [e.g., conversion rates from a specific channel, feature adoption] towards the end of the [month/quarter].

Learning & Action:* We've identified that [root cause, e.g., our messaging wasn't clear, a competitor launched a similar feature]. Our immediate action plan involves [e.g., A/B testing new landing pages, enhancing onboarding tutorials, conducting user interviews] to address this.

  • [Challenge 2]: Faced unexpected delays in integrating with [Third-Party API/Partner System], pushing back the launch of [Feature C] by [X] weeks.

Learning & Action:* We've strengthened our project management protocols for external dependencies and allocated additional engineering resources to expedite the integration, now projecting completion by [New Date].

  • [Challenge 3 - Optional]: [e.g., Talent acquisition for specific roles] has proven more competitive than anticipated.

Learning & Action:* We've refined our recruitment strategy, leveraging [e.g., new recruiting platforms, employee referral bonuses], and are actively exploring remote talent pools to broaden our reach.


4. Financial Snapshot

Below is a high-level summary of our financials for the [Month/Quarter]:

  • Revenue (Actual vs. Plan):

* Actual: $[X]

* Plan: $[Y]

* Variance: [Z]% (Above/Below Plan)

  • Operating Expenses: $[X]

Breakdown (Optional):* [e.g., Personnel: $A, Marketing: $B, R&D: $C, G&A: $D]

  • Net Burn Rate: $[X] per month (vs. $[Y] last [month/quarter])
  • Cash in Bank: $[X] as of [Date]
  • Runway: [Y] months

Context: Our burn rate has [increased/decreased] slightly due to [e.g., strategic investments in R&D, increased marketing spend, optimized operational costs]. We remain highly disciplined in our spending while ensuring we have the resources to execute our growth strategy.


5. Asks / How You Can Help

Your support extends beyond capital, and we value your expertise and network. Here are a few areas where your insights or connections could be particularly impactful:

  • Introductions: We are actively looking to connect with [Type of Person/Company, e.g., Head of Product at large enterprises, SaaS founders with experience in X market, potential strategic partners in Y industry]. If you know anyone who might be a good fit, please let us know!
  • Advice: We are currently exploring strategies for [Specific Challenge/Opportunity, e.g., entering the European market, optimizing our pricing model for enterprise clients, scaling our customer success team]. Any thoughts or resources you could share would be greatly appreciated.
  • Feedback: We value your perspective on our progress and challenges. Please feel free to share any feedback or questions you have in response to this update.

6. Looking Ahead: Next [Month/Quarter] Focus

Our primary objectives for the upcoming [Month/Quarter] include:

  • Product: Launch [Next Major Feature/Product] to drive [specific outcome, e.g., increased user retention, new revenue stream].
  • Growth: Target [X]% increase in [e.g., MRR, qualified leads] through [specific initiative, e.g., expanding our outbound sales team, launching new content marketing campaigns].
  • Team: Hire [Number] critical roles in [e.g., engineering, sales leadership] to support our growth trajectory.
  • Strategic: Explore potential M&A opportunities in the [X] space to accelerate our market penetration.

7. Closing & Call to Action

We are incredibly excited about the trajectory of [Company Name] and are grateful for your continued partnership. We are confident that our strategic initiatives and dedicated team will continue to deliver strong results.

Please feel free to reply to this email with any questions or comments. If you'd like a more in-depth discussion, we'd be happy to schedule a call to review these updates in more detail.

Best regards,

[Your Name]

[Your Title]

[Company Name]

[Company Website]

[Link to your latest press release or company blog (Optional)]

gemini Output

This output provides a comprehensive, detailed, and professional investor update email, optimized and finalized for direct delivery. It incorporates all requested elements: KPI highlights, milestones, challenges, asks, and a financial snapshot, structured for clarity and impact.


Investor Update Email: Optimized and Finalized

This section presents the finalized investor update email. It is crafted to be professional, transparent, and actionable, providing investors with a clear overview of [Company Name]'s performance, progress, and future outlook for the specified period.


Email Subject Line Options

Choose the most appropriate subject line based on the update frequency and company preference.

  • Option 1 (Monthly): [Company Name]: March 2024 Investor Update
  • Option 2 (Quarterly): [Company Name]: Q1 2024 Investor Update & Progress Report
  • Option 3 (Concise): Investor Update: [Company Name] - [Month/Quarter] [Year]
  • Option 4 (Highlight-focused): [Company Name] Update: Strong Growth & Key Milestones in [Month/Quarter] [Year]

Finalized Investor Update Email Draft

Subject: [Company Name]: [Month/Quarter] [Year] Investor Update

Body:

Dear [Investor Name] / Valued Investors,

We hope this email finds you well.

We are pleased to provide you with our [monthly/quarterly] update for [Month/Quarter] [Year], reflecting on our progress, key achievements, and the challenges we are actively addressing. We deeply appreciate your continued support and belief in [Company Name]'s vision.

1. Key Performance Indicators (KPIs) Highlights

This period saw [Company Name] achieve significant momentum across several critical metrics. Here are the highlights:

  • Customer Acquisition Cost (CAC): [Current Value] (vs. [Previous Value/Target])

* Trend: [e.g., -15% MoM, +5% QoQ]

* Commentary: Our refined [marketing strategy/onboarding process] led to a [significant reduction/modest increase] in CAC, demonstrating improved efficiency in acquiring new users.

  • Monthly Recurring Revenue (MRR): [Current Value] (vs. [Previous Value/Target])

* Trend: [e.g., +10% MoM, +25% QoQ]

* Commentary: We achieved [strong/steady] MRR growth, primarily driven by [new customer subscriptions/upsells of existing clients]. This aligns with our aggressive growth targets.

  • Customer Churn Rate: [Current Value] (vs. [Previous Value/Target])

* Trend: [e.g., -0.5% MoM, Stable QoQ]

* Commentary: We are pleased to report a [decrease/stable] churn rate, reflecting the success of our [customer success initiatives/product improvements] in enhancing customer retention.

  • User Engagement (e.g., Daily Active Users - DAU): [Current Value] (vs. [Previous Value/Target])

* Trend: [e.g., +8% MoM, +20% QoQ]

* Commentary: Engagement continues to climb, driven by [new feature adoption/successful community building efforts], indicating strong product stickiness.

  • Gross Margin: [Current Value] (vs. [Previous Value/Target])

* Trend: [e.g., +2% MoM, Stable QoQ]

* Commentary: Our gross margin remains [healthy/improved] due to [cost optimization in supply chain/increased efficiency in service delivery].

2. Milestones & Achievements

We've hit several important milestones this [month/quarter]:

  • Product Development: Successfully launched [Feature Name/Product V2.0] on [Date], which has already seen [X]% adoption and [Y]% increase in [specific metric] among early users.
  • Market Expansion: Entered [New Market/Region] through [Partnership/Direct Launch], exceeding our initial user acquisition targets by [X]% in the first [weeks/month].
  • Strategic Partnerships: Forged a key partnership with [Partner Company Name], which is expected to [describe benefit, e.g., expand our distribution channels by X% / integrate our platform with Y services].
  • Team Growth: Welcomed [Number] talented individuals to our [Department Name] team, including [Key Hire Name, Title], strengthening our [area of expertise].
  • Funding/Recognition: [e.g., Secured X% of our next funding round / Recognized by Industry Award for X accomplishment].

3. Challenges & Learnings

Transparency is key, and we want to share the challenges we encountered and how we are addressing them:

  • Challenge 1: [Brief Description of Challenge, e.g., Increased competitive pressure in X segment]

* Our Approach: We are responding by [describe specific actions, e.g., accelerating our product roadmap with differentiated features / investing more in brand awareness and customer loyalty programs]. Initial results from [specific action] are [positive/promising].

  • Challenge 2: [Brief Description of Challenge, e.g., Supply chain disruptions impacting hardware costs]

* Our Approach: We have diversified our supplier base and are exploring alternative materials to mitigate risk. We project [describe expected outcome, e.g., a return to target cost levels by Q3 / minimal impact on our gross margins].

  • Challenge 3: [Brief Description of Challenge, e.g., Slower-than-expected conversion rates from free trials]

* Our Approach: We've initiated A/B testing on our onboarding flow and trial experience, focusing on highlighting key value propositions earlier. We're also enhancing our sales enablement tools to better support our conversion specialists.

4. Financial Snapshot

Here’s a snapshot of our financials for [Month/Quarter] [Year] (all figures in [Currency]):

  • Total Revenue: [Current Value] (vs. [Previous Period Value/Budget])
  • Gross Profit: [Current Value] (vs. [Previous Period Value/Budget])
  • Operating Expenses: [Current Value] (vs. [Previous Period Value/Budget])
  • Net Burn Rate: [Current Value] (vs. [Previous Period Value/Budget])
  • Cash on Hand: [Current Value] as of [Date]
  • Runway: Approximately [Number] months (at current burn rate)

Commentary: Our financial health remains robust. While our burn rate [increased slightly/remained stable] due to [strategic investments in growth/new hires], our revenue growth continues to outpace expenses, extending our runway. We remain disciplined in our financial management.

5. Asks / How You Can Help

Your expertise and network are invaluable. Here are a few ways you might be able to help us accelerate our progress:

  • Introductions: We are actively seeking introductions to [Target Persona/Company Type] in the [Industry/Market] for [Partnerships/Sales Opportunities].
  • Advisory: We would greatly appreciate your insights on [Specific Challenge/Opportunity, e.g., navigating regulatory changes in X market / optimizing our pricing strategy for enterprise clients]. Please let us know if you have availability for a brief call.
  • Talent: If you know exceptional candidates for [Specific Role/Department, e.g., Senior Product Manager / Head of Sales], please connect us.
  • Feedback: We are always open to your feedback on our product, strategy, or this update.

6. Looking Ahead

For the next [month/quarter], our primary focus areas include:

  • Product: Launching [Next Major Feature/Update] to further enhance [Specific Value Proposition].
  • Growth: Expanding our [Marketing Channel/Sales Territory] to capture [X]% more market share.
  • Team: Continuing to build out our [Department Name] team to support our scaling operations.

We are excited about the opportunities ahead and are confident in our team's ability to execute our strategic plan.

Thank you once again for your unwavering support. We are always available to discuss this update or any other questions you may have.

Best regards,

[Your Name]

[Your Title]

[Company Name]

[Your Email]

[Company Website]


Final Review Checklist (Internal Use)

Before sending, ensure the following:

  • Accuracy: All numbers, dates, and facts are 100% accurate.
  • Clarity: Language is clear, concise, and easy to understand for all investors.
  • Tone: Professional, confident, transparent, and appreciative.
  • Completeness: All sections are filled with relevant information.
  • Proofreading: No typos or grammatical errors.
  • Personalization: [Investor Name] and other placeholders are correctly populated for each recipient.
  • Attachments (Optional): Consider attaching a more detailed financial report or pitch deck if relevant.
investor_update_email.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);}});}