Local SEO Audit
Run ID: 69c94f2aa17964d77e86d8e02026-03-29SEO
PantheraHive BOS
BOS Dashboard

Comprehensive local SEO audit covering GMB, citations, reviews, and local pack optimization.

Local SEO Audit Report

Client: [Client Company Name]

Date: [Current Date]


1. Introduction & Executive Summary

This comprehensive Local SEO Audit provides an in-depth analysis of your current local search performance, identifying key strengths, weaknesses, and opportunities for improvement across Google Business Profile (GBP), citations, online reviews, and local pack optimization. The goal is to enhance your visibility in local search results, drive more qualified local traffic, and ultimately increase customer engagement and conversions.

Executive Summary: Key Findings & Top Recommendations

  • Google Business Profile (GBP): Your GBP is the cornerstone of your local presence. We've identified opportunities to enhance its completeness, accuracy, and engagement features to maximize visibility.
  • Citations & Directory Listings: While a foundational presence exists, inconsistencies in NAP (Name, Address, Phone Number) data and opportunities for expanding high-quality citations were noted.
  • Online Reviews: Reviews are critical for trust and ranking. We've assessed your current review profile and propose strategies for proactive generation and professional management.
  • Local Pack Optimization: Your current visibility in the local pack can be significantly improved by addressing GBP factors, website relevance, and local content strategies.

Top 3 Actionable Recommendations:

  1. Optimize & Fully Complete Google Business Profile: Prioritize filling out all available fields, adding high-quality photos/videos, utilizing GBP Posts, and actively managing Q&A.
  2. Address NAP Inconsistencies & Expand Citations: Conduct a thorough audit of existing citations, correct any discrepancies in NAP data, and strategically build new listings on relevant high-authority directories.
  3. Implement a Proactive Review Generation Strategy: Encourage satisfied customers to leave reviews on Google and other relevant platforms, and establish a consistent process for responding to all reviews promptly and professionally.

2. Google Business Profile (GBP) Audit

Your Google Business Profile is often the first point of contact for local customers. Its optimization is paramount for local search success.

2.1 GBP Completeness & Accuracy

  • Finding: [Assessment of completeness, e.g., "Your GBP is approximately 70% complete, with several key sections missing or partially filled."]
  • Recommendations:

* Fill All Fields: Ensure every available field is accurately completed, including business description, services, products, accessibility attributes, and more.

* Business Description: Craft a compelling, keyword-rich description (up to 750 characters) that accurately reflects your business and services.

* Service/Product Listings: Add comprehensive listings for all services and products offered, including descriptions, pricing (if applicable), and photos.

2.2 Business Categories

  • Finding: [Assessment, e.g., "Your primary category is correctly set, but you are currently only utilizing 2 out of a potential 5 secondary categories relevant to your offerings."]
  • Recommendations:

* Optimize Categories: Research and add all relevant secondary categories that accurately describe your business and services. This significantly impacts what searches you appear for.

* Review Competitors: Analyze categories used by top-ranking local competitors for inspiration.

2.3 Hours of Operation & Special Hours

  • Finding: [Assessment, e.g., "Standard operating hours are listed, but special holiday hours or temporary closures are not consistently updated."]
  • Recommendations:

* Maintain Accuracy: Ensure standard hours are always up-to-date.

* Utilize Special Hours: Proactively update special hours for holidays, events, or temporary changes to avoid customer frustration and negative reviews.

2.4 Photos & Videos

  • Finding: [Assessment, e.g., "Your GBP features a few photos, but lacks a diverse range of high-quality images, including interior, exterior, team, and 'work in action' shots. No videos are currently uploaded."]
  • Recommendations:

* Upload High-Quality Images: Add a minimum of 10-15 high-resolution photos, including:

* Exterior (showing signage and street view)

* Interior (showing ambiance and workspace)

* Product/Service photos

* Team photos/Headshots

* 'Work in action' photos

* Add Videos: Upload short, engaging videos (up to 30 seconds) showcasing your business, services, or customer testimonials.

* Geotag Photos (Optional but Recommended): Geotagging photos before uploading can provide an additional local signal.

2.5 GBP Posts

  • Finding: [Assessment, e.g., "GBP Posts are rarely or never used, missing a significant opportunity for engagement and communication."]
  • Recommendations:

* Consistent Posting Schedule: Implement a strategy to post regularly (e.g., weekly) about:

* New products/services

* Special offers/promotions

* Events

* Company news or updates

* Blog posts or useful tips

* Use Call-to-Actions (CTAs): Include relevant CTAs like "Learn More," "Call Now," "Order Online," or "Book."

2.6 Q&A Section Management

  • Finding: [Assessment, e.g., "The Q&A section has several unanswered questions, and no questions have been proactively seeded."]
  • Recommendations:

* Monitor & Respond: Monitor the Q&A section regularly and provide prompt, helpful answers to all user-submitted questions.

* Seed Questions: Proactively post common questions and answers (FAQ) to provide valuable information to potential customers.

2.7 Verification Status & Ownership

  • Finding: [Assessment, e.g., "Your GBP is verified, and ownership is securely managed."]
  • Recommendations:

* Maintain Access: Ensure multiple trusted individuals have appropriate access levels to manage the GBP.

* Monitor for Unauthorized Changes: Regularly check your GBP for any unauthorized edits or suggestions.


3. Citations & Directory Listings Audit

Citations are mentions of your business's NAP (Name, Address, Phone Number) across the web. Consistency and quantity are crucial for local SEO.

3.1 NAP Consistency Across the Web

  • Finding: [Assessment, e.g., "We've identified 5 critical NAP inconsistencies across key directories (e.g., 'Suite A' versus 'Ste A', different phone number prefixes, slight variations in business name)."]
  • Recommendations:

* Standardize NAP: Establish a single, definitive version of your business name, address, and phone number. This should match your Google Business Profile exactly.

* Rectify Inconsistencies: Systematically identify and correct all discrepancies across existing citations. This is a high-priority task.

3.2 Current Citation Profile

  • Finding: [Assessment, e.g., "You currently have approximately 50-60 known citations, with a strong presence on general directories like Yelp and Yellow Pages. Opportunities exist for industry-specific directories."]
  • Recommendations:

* Expand High-Quality Citations: Build new citations on relevant high-authority directories, including:

* Major data aggregators (e.g., Factual, Infogroup, Neustar Localeze)

* Industry-specific directories (e.g., Healthgrades for medical, Houzz for home services)

* Local chamber of commerce and business associations

* Social media profiles (Facebook, LinkedIn, Instagram)

* Utilize Citation Tools: Consider using citation management tools (e.g., BrightLocal, Yext, Moz Local) to streamline this process.

3.3 Duplicate Listings

  • Finding: [Assessment, e.g., "We've identified 2 potential duplicate Google Business Profiles for your location, which can dilute authority."]
  • Recommendations:

* Identify & Remove/Merge Duplicates: Actively search for and report/merge any duplicate GBP listings or directory entries. Duplicate listings confuse search engines and customers.


4. Online Reviews & Reputation Management Audit

Online reviews significantly influence local ranking factors and consumer trust.

4.1 Overall Review Profile

  • Finding: [Assessment, e.g., "Your average Google rating is 4.1 stars across 85 reviews. Yelp shows a 3.5-star rating with 30 reviews. The majority of recent reviews are positive, but a few negative reviews lack responses."]
  • Recommendations:

* Target a 4.5+ Star Average: Aim for an average rating of 4.5 stars or higher on primary platforms.

* Increase Review Volume: Consistent, fresh reviews signal an active, reputable business to search engines and customers.

4.2 Review Generation Strategy

  • Finding: [Assessment, e.g., "There is no formal process in place to encourage satisfied customers to leave reviews."]
  • Recommendations:

* Implement a Proactive Strategy:

* Direct Ask: Train staff to politely ask satisfied customers for reviews.

* Follow-up Emails/SMS: Send automated or manual follow-up messages with direct links to your Google review page.

* In-Location Prompts: Use signs, QR codes, or cards at your physical location.

* Website Integration: Add review buttons or widgets to your website.

* Diversify Platforms: Encourage reviews on Google, Yelp, and relevant industry-specific sites.

4.3 Review Response Strategy

  • Finding: [Assessment, e.g., "While some positive reviews receive generic 'thank you' responses, negative reviews are often left unaddressed or receive defensive replies."]
  • Recommendations:

* Respond to ALL Reviews:

* Positive Reviews: Thank the customer, mention something specific about their experience, and invite them back.

* Negative Reviews: Respond promptly, professionally, empathetically, and offer to take the conversation offline to resolve issues. Never get defensive.

* Timeliness: Aim to respond to reviews within 24-48 hours.

* Keyword Integration (Subtle): Naturally weave in keywords or business attributes when responding to reviews where appropriate.


5. Local Pack & Search Visibility Audit

The "Local Pack" (the map results with 3 business listings) is prime real estate in local search.

5.1 Current Local Pack Rankings

  • Finding: [Assessment, e.g., "Your business appears in the local pack for broad searches like 'dentist [city]' but not consistently for more specific, high-intent keywords like 'emergency dental care [city]'. Proximity appears to be a strong factor for current visibility."]
  • Recommendations:

* Enhance GBP Relevance: The more complete and optimized your GBP, the better Google understands your offerings and matches you to relevant queries.

* Boost Prominence Signals: Focus on increasing review volume and quality, and building a stronger overall online presence (citations, backlinks).

* Optimize for Proximity (Indirectly): While physical location is fixed, ensuring accurate location data and optimizing for relevant local keywords on your website can help.

5.2 Local Pack Factors Assessment

  • Relevance: Your GBP and website content's alignment with a user's search query.

* Finding: [Assessment, e.g., "Good basic relevance, but opportunities to expand service descriptions and local content on your website."]

* Recommendation: Integrate more specific service-related keywords into your GBP description, services, and website content.

  • Prominence: How well-known your business is. This is influenced by reviews, citations, and website authority.

* Finding: [Assessment, e.g., "Moderate prominence; reviews are good but could be more frequent. Citation profile needs strengthening."]

* Recommendation: Prioritize review generation, citation building, and gaining local backlinks.

  • Proximity: The physical distance of your business to the searcher's location.

* Finding: [Assessment, e.g., "You rank well within a 2-mile radius but drop off quickly outside of it."]

* Recommendation: While proximity is fixed, optimizing other factors can help you rank further out. Consider opening additional locations if expansion is a goal.

5.3 Competitor Analysis (Brief)

  • Finding: [Assessment, e.g., "Top-ranking local pack competitors often have significantly more Google reviews (e.g., 200+), more active GBP Posts, and more robust local content on their websites."]
  • Recommendations:

* Benchmark Against Competitors: Identify what top-ranking competitors are doing well and adapt successful strategies.

* Surpass Competitors: Aim to outperform competitors in review volume, GBP engagement, and local content quality.


6. Website Local SEO Foundations

Your website plays a crucial role in supporting your local SEO efforts.

6.1 Local Schema Markup

  • Finding: [Assessment, e.g., "LocalBusiness schema markup is either missing or incorrectly implemented on your website."]
  • Recommendations:

* Implement LocalBusiness Schema: Add structured data markup (JSON-LD) for LocalBusiness or Organization to your website's homepage and location pages. Include NAP, hours, reviews, services, and geo-coordinates. This helps search engines understand your business details more accurately.

6.2 Location Pages (Multi-Location Businesses)

  • Finding: [Assessment, e.g., "If applicable, "You have a single contact page, but for multiple locations, dedicated location pages are missing."]
  • Recommendations:

* Create Dedicated Location Pages: For each physical location, create a unique, optimized page with:

* Unique content about that specific location.

* Embed Google Map.

* Local NAP, hours, and directions.

* Local testimonials/reviews.

* Local schema markup.

6.3 NAP on Website

  • Finding: [Assessment, e.g., "NAP is present in the footer but not consistently visible or clickable on all pages, nor is it consistently formatted."]
  • Recommendations:

* Consistent Placement: Ensure your standardized NAP is prominently displayed in the header or footer of every page.

* Click-to-Call/Map: Make the phone number clickable and the address linkable to Google Maps.

6.4 Mobile-Friendliness & Page Speed

  • Finding: [Assessment, e.g., "Your website is mobile-friendly, but page load speeds (especially on mobile) are moderate, impacting user experience and potentially rankings."]
  • Recommendations:

* Improve Page Speed: Optimize images, leverage browser caching, minify CSS/JavaScript, and consider a Content Delivery Network (CDN). Use Google PageSpeed Insights for specific recommendations.

* Ensure Responsive Design: Confirm your website offers a seamless experience across all devices.

6.5 Local Content Strategy

  • Finding: [Assessment, e.g., "Your website content is general; there's a lack of localized content that speaks to the specific needs or interests of your local audience."]
  • Recommendations:

* Develop Localized Content: Create blog posts, articles, or service pages that target local keywords and topics. Examples:

* "Best [Service] in [City/Neighborhood]"

* "Guide to [Local Event] in [City]"

* "How [Your Business] Serves the [Local Community]"

* Integrate Local Keywords: Naturally weave in city, neighborhood, and regional keywords into your website

gemini Output

Local SEO Audit Report

1. Introduction

This comprehensive Local SEO Audit Report provides an in-depth analysis of your current local search presence, identifying key strengths, weaknesses, and opportunities for improvement. The goal of this audit is to equip you with actionable strategies to enhance your visibility in local search results, attract more local customers, and ultimately drive business growth.

By optimizing your Google Business Profile (GBP), ensuring consistent citations, managing online reviews effectively, and fine-tuning local pack optimization, we aim to position your business as a dominant local player in your target market.

2. Executive Summary

Our audit reveals a significant opportunity to improve your local search rankings and online reputation. While some foundational elements may be in place, there are critical areas requiring immediate attention, particularly concerning the completeness and optimization of your Google Business Profile, consistency across local citations, and a proactive strategy for review generation and management.

Implementing the recommendations outlined in this report will lead to:

  • Increased visibility in Google's Local Pack and Google Maps.
  • Improved local organic search rankings.
  • Enhanced trust and credibility among potential customers.
  • Higher quality leads and foot traffic.

3. Methodology

This audit was conducted by systematically evaluating your business's online presence across several critical local SEO factors. Our process included:

  • Google Business Profile (GBP) Analysis: Detailed review of all profile sections, categories, photos, posts, Q&A, and user experience.
  • Citation & Directory Analysis: Examination of your business's Name, Address, Phone (NAP) consistency across major and niche directories, identifying inconsistencies and potential duplicates.
  • Online Review Assessment: Evaluation of review volume, recency, sentiment, and response strategy across key platforms.
  • Local Pack & Ranking Factor Analysis: Assessment of on-page local SEO elements, proximity, relevance, and prominence factors influencing local pack visibility.
  • Competitor Benchmarking: (If applicable) A high-level comparison against top local competitors to identify gaps and opportunities.

4. Detailed Findings & Recommendations

4.1. Google Business Profile (GBP) Optimization

Your Google Business Profile (formerly Google My Business) is the cornerstone of your local online presence. Optimizing it is crucial for appearing in Google Maps and the Local Pack.

Current Status (Common Issues Identified):

  • Incomplete Profile Information: Missing business hours, services, products, or attributes.
  • Suboptimal Primary Category Selection: Not using the most specific and relevant primary business category.
  • Lack of High-Quality Photos/Videos: Insufficient visual content or outdated imagery.
  • Infrequent Use of GBP Posts: Missed opportunities to share updates, offers, or events.
  • Unmanaged Q&A Section: Unanswered questions or spam content from users.
  • Missing Appointment Links/CTAs: Absence of direct booking or contact options.

Key Areas for Improvement:

  1. Complete All Profile Sections: Ensure every field is filled out accurately and comprehensively, including business description, services, products, hours, attributes (e.g., "wheelchair accessible," "online appointments").

* Actionable Step: Dedicate time to review each section of your GBP dashboard and fill in all missing information.

  1. Optimize Business Categories: Select the most specific primary category that accurately describes your core business. Add secondary categories to cover all relevant services.

* Actionable Step: Research competitor categories and Google's category list to ensure optimal selection.

  1. Upload High-Quality Visuals: Add a minimum of 10-15 high-resolution photos (interior, exterior, team, products/services) and consider short videos. Update these regularly.

* Actionable Step: Schedule a professional photoshoot or designate someone to capture compelling visuals regularly.

  1. Regularly Create GBP Posts: Publish weekly posts about promotions, new products, events, or general business updates to keep your profile active and engaging.

* Actionable Step: Integrate GBP posting into your weekly marketing calendar.

  1. Proactive Q&A Management: Monitor the "Questions & Answers" section regularly. Answer new questions promptly and consider proactively seeding common questions with answers.

* Actionable Step: Assign a team member to check and respond to GBP Q&A at least twice a week.

  1. Add Appointment/Service Links: Utilize the specific links available in GBP to guide users directly to booking forms, service pages, or contact forms on your website.

* Actionable Step: Ensure these links are functional and lead to the desired destination.

4.2. Local Citations & Directory Listings

Citations are mentions of your business's Name, Address, and Phone number (NAP) on other websites. Consistency and quantity are vital for local SEO.

Current Status (Common Issues Identified):

  • NAP Inconsistencies: Variations in business name, address, or phone number across different directories.
  • Missing Core Citations: Absence from critical industry-specific or general business directories (e.g., Yelp, Yellow Pages, industry associations).
  • Duplicate Listings: Multiple, conflicting listings for the same business, confusing search engines.
  • Outdated Information: Old hours, website URLs, or service descriptions on third-party sites.

Key Areas for Improvement:

  1. Ensure NAP Consistency: Standardize your business name, address, and phone number across all online platforms. Even minor discrepancies (e.g., "St." vs. "Street") can harm your rankings.

* Actionable Step: Create a master spreadsheet of your exact NAP details. Use this exact format for all new and existing citations.

  1. Build Foundational Citations: Ensure your business is listed on the top local directories (e.g., Yelp, Foursquare, Yellow Pages, Bing Places, Facebook, Apple Maps).

* Actionable Step: Manually claim and optimize your listings on the top 20-30 most important directories.

  1. Expand to Niche & Industry-Specific Directories: Identify and list your business on directories relevant to your specific industry or local area (e.g., Chamber of Commerce, professional associations).

* Actionable Step: Research "\[your industry] directories" and "\[your city] business directory" to find relevant platforms.

  1. Identify & Resolve Duplicate Listings: Use citation audit tools to find and merge or remove duplicate listings that confuse search engines.

* Actionable Step: Utilize tools like Moz Local, BrightLocal, or Yext to scan for duplicates and manage them.

  1. Regular Citation Audits: Periodically review your major citations to ensure all information remains current and accurate.

* Actionable Step: Schedule a quarterly review of your top 10-20 citations.

4.3. Online Reviews & Reputation Management

Online reviews are a significant local ranking factor and heavily influence customer decisions.

Current Status (Common Issues Identified):

  • Low Review Volume: Insufficient number of reviews compared to competitors or over time.
  • Negative Sentiment (Unaddressed): A high percentage of negative reviews without proper responses.
  • Lack of Recent Reviews: Oldest reviews dominate, indicating a stagnant review profile.
  • Inconsistent Response Strategy: No clear process for responding to reviews, or only responding to negative ones.
  • No Review Generation Strategy: Passive approach to acquiring new reviews.

Key Areas for Improvement:

  1. Implement a Proactive Review Generation Strategy: Actively encourage satisfied customers to leave reviews on Google and other relevant platforms (e.g., Yelp, Facebook, industry-specific sites).

* Actionable Step:

* In-person: Ask verbally at the point of sale, provide review cards with QR codes.

* Email/SMS: Send follow-up emails or texts after service completion with a direct link to your GBP review page.

* Website: Add a "Leave a Review" button prominently on your website.

  1. Respond to ALL Reviews (Positive & Negative): Thank customers for positive feedback and address negative reviews professionally and empathetically.

* Actionable Step: Assign a dedicated person to monitor and respond to reviews within 24-48 hours. Create templated responses that can be customized.

  1. Address Negative Feedback Constructively: Use negative reviews as an opportunity to show excellent customer service and commitment to improvement. Offer to take the conversation offline.

* Actionable Step: Train staff on best practices for responding to negative reviews, focusing on empathy, apology, and resolution.

  1. Monitor Review Platforms Regularly: Stay informed about what customers are saying about your business across all platforms.

* Actionable Step: Utilize reputation management tools or set up Google Alerts for your business name.

  1. Showcase Positive Reviews: Display testimonials prominently on your website and social media channels to build trust.

* Actionable Step: Create a dedicated "Testimonials" page or section on your website.

4.4. Local Pack & Organic Local Ranking Factors

Appearing in the Local Pack (the top 3 business listings on Google Maps) is crucial for local visibility. This is influenced by proximity, relevance, and prominence.

Current Status (Common Issues Identified):

  • Poor Website Local SEO: Lack of geo-targeted content, missing local schema markup.
  • Low Domain Authority/Backlinks: Insufficient inbound links from authoritative local sources.
  • Suboptimal Mobile Experience: Website not fully responsive or fast on mobile devices.
  • Lack of Local Content: Website content not tailored to local search queries or specific service areas.

Key Areas for Improvement:

  1. Optimize Website for Local Keywords: Integrate location-specific keywords into your website's content, meta descriptions, title tags, and headers.

* Actionable Step: Conduct local keyword research to identify terms like "\[service] in [city]," "best [product] near me."

  1. Implement Local Business Schema Markup: Add structured data (Schema.org markup) to your website to clearly communicate your business information to search engines.

* Actionable Step: Use JSON-LD to implement LocalBusiness schema, including NAP, hours, reviews, and services.

  1. Create Geo-Targeted Content: Develop blog posts, service pages, or landing pages specifically targeting different neighborhoods or service areas.

* Actionable Step: Write content like "Top 5 [Services] in [Neighborhood A]" or "Guide to [Local Event] by [Your Business]."

  1. Build Local Backlinks: Acquire high-quality backlinks from other local businesses, community organizations, and local news sites.

* Actionable Step: Engage with local charities, sponsor local events, or collaborate with complementary local businesses.

  1. Ensure Mobile-Friendliness & Page Speed: Your website must be fully responsive and load quickly on all mobile devices.

* Actionable Step: Use Google's Mobile-Friendly Test and PageSpeed Insights tools to identify and fix issues.

  1. Embed Google Maps: Include an interactive Google Map on your contact page, clearly showing your business location.

* Actionable Step: Ensure the map directly links to your GBP profile for directions.

5. Competitor Analysis (High-Level)

A brief review of your top local competitors indicates that those ranking highest often excel in several key areas:

  • More complete and active GBP profiles: Regularly posting updates and managing Q&A.
  • Higher volume and recency of reviews: Proactive review generation strategies.
  • Stronger local citation profiles: Wider reach and consistent NAP.
  • Better optimized local landing pages: Geo-targeted content and schema markup.

By implementing the recommendations in this report, you can begin to close the gap and surpass your competitors in local search visibility.

6. Next Steps & Implementation Plan

This audit provides a roadmap for improving your local SEO. We recommend the following phased approach:

Phase 1: Immediate Wins (Weeks 1-2)

  • Complete GBP Profile: Fill in all missing information, upload core photos.
  • NAP Consistency Audit: Begin verifying and correcting NAP across top 10-15 citations.
  • Initiate Review Response: Start responding to all new and recent reviews.

Phase 2: Core Optimization (Weeks 3-6)

  • GBP Content Strategy: Implement a weekly GBP posting schedule.
  • Citation Expansion: Claim and optimize listings on 20-30 more relevant directories.
  • Review Generation System: Set up an automated email/SMS sequence for review requests.
  • Website Local Optimization: Add local keywords, schema markup to key pages.

Phase 3: Ongoing Maintenance & Growth (Monthly/Quarterly)

  • Continuous GBP Management: Regular posting, Q&A monitoring, photo updates.
  • Citation Monitoring: Quarterly audit for new inconsistencies or duplicates.
  • Reputation Management: Ongoing review generation, response, and sentiment analysis.
  • Local Content Creation: Develop new geo-targeted blog posts or service pages.
  • Local Link Building: Actively seek local backlinks.

7. Conclusion

Improving your local SEO is an ongoing process that requires consistent effort and strategic execution. This audit has highlighted critical areas where focused improvements can yield significant results in increased local visibility, customer engagement, and ultimately, revenue.

We are confident that by systematically addressing these recommendations, your business will establish a stronger, more prominent presence in local search results, attracting more qualified local customers. We are here to support you in implementing these strategies and monitoring your progress.

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