pSEO Page Factory
Run ID: 69cb69cd61b1021a29a88d5d2026-03-31SEO & Growth
PantheraHive BOS
BOS Dashboard

Workflow: pSEO Page Factory - Step 1 of 5: Data Query from hive_db

This document details the successful execution and output of Step 1: hive_db → query for your "pSEO Page Factory" workflow. This crucial initial step is responsible for programmatically extracting the foundational data elements directly from your hive_db instance. These elements—your core application names, defined target personas, and specified geographical locations—will serve as the building blocks for generating thousands of highly targeted, rankable pSEO landing pages.


Objective of Step 1: hive_db Data Retrieval

The primary objective of this step is to perform a series of targeted queries against your hive_db to retrieve the essential lists required for the subsequent keyword matrix generation. This ensures that the page factory operates with the most current and accurate data defined within your system.

Specifically, the system has queried and extracted:

  1. Your Core Application Names/Services: The products or services for which pSEO pages will be generated.
  2. Target Personas: The specific audience segments (e.g., "YouTubers", "Realtors", "Agencies") that represent your ideal customers.
  3. Geographical Locations: The cities, states, or regions you wish to target with your localized content.

Core Data Elements Queried and Their Sources

The hive_db was queried for the following data, assumed to reside in designated collections or configuration documents:

1. App Names / Services

text • 153 chars
    [
        "Jacksonville",
        "Miami",
        "Orlando",
        "Tampa",
        "Atlanta",
        "Charlotte",
        "Nashville"
    ]
    
Sandboxed live preview

Verification and Customer Action Items

To ensure the accuracy and completeness of this foundational data, please review the Retrieved Data Example and the Output of Step 1 above.

  • Confirm App Names: Verify that all your relevant applications or services are present and correctly spelled.
  • Validate Personas: Check that the list of personas accurately represents your target audience segments.
  • Review Locations: Ensure all desired geographical targets are included and correctly formatted.
  • Data Integrity: If any discrepancies are found, please update the corresponding collections or configuration documents within your hive_db. Subsequent workflow runs will then pick up the corrected data.
  • Error Handling: In the event of a queryStatus: "failure", please consult your hive_db logs and ensure that the expected collections/documents exist and are accessible with appropriate permissions.

Next Steps in the Workflow

With the successful retrieval of these core data elements, the workflow will now proceed to Step 2: Keyword Matrix Generation. In this next stage, the system will systematically combine each appName, persona, and location to construct the comprehensive keyword matrix. This matrix will form the basis for every unique pSEO page to be generated, such as: "Best AI Video Editor for Realtors in Jacksonville."

gemini Output

Step 2: Gemini Content Generation (gemini → generate)

This step is the core content engine of your pSEO Page Factory. Leveraging advanced large language models (LLMs), specifically Google Gemini, we transform the targeted keyword combinations from your Keyword Matrix into unique, high-intent, and SEO-optimized landing page content. This ensures every generated page is not just a placeholder, but a compelling, rankable asset tailored to a specific user query.


1. Purpose & Objective

The primary objective of this "gemini → generate" step is to programmatically create high-quality, relevant, and unique content for each entry in your previously generated Keyword Matrix. For every combination of your App Name, Persona, and Location (e.g., "Best AI Video Editor for Realtors in Jacksonville"), Gemini crafts a complete PSEOPage document, ready for publication.

Key Outcomes:

  • Unique Content at Scale: Generate thousands of distinct content pieces, avoiding duplicate content issues.
  • High-Intent Matching: Content is precisely tailored to the specific search intent implied by each keyword combination.
  • Structured Output: Each piece of content is organized into a PSEOPage document, containing all necessary fields for a fully functional and SEO-optimized landing page.

2. Input to Gemini (Keyword Matrix & Contextual Data)

Gemini receives a rich set of inputs to ensure highly relevant and specific content generation:

  • Target Keyword Combination: The exact phrase derived from your Keyword Matrix (e.g., "Best AI Video Editor for Realtors in Jacksonville"). This serves as the primary content directive.
  • App/Product Details: Comprehensive information about your application(s) or product(s), including:

* Core features and benefits

* Unique selling propositions (USPs)

* Target audience overview (general)

* Pricing models (if relevant)

* Call-to-action (CTA) preferences

* Brand voice and guidelines

  • Persona Profile: Detailed characteristics and pain points of the targeted persona (e.g., "Realtors" ��� focusing on their need for efficient property showcases, client communication, social media presence, etc.).
  • Location Context: Any specific nuances or common search queries associated with the target location (e.g., "Jacksonville" – local market trends, specific regulations, common business challenges).
  • SEO Best Practices: Internalized guidelines for optimal title tags, meta descriptions, heading structures, keyword density, and internal linking opportunities.

3. Gemini's Content Generation Process

Gemini employs a sophisticated multi-stage generation process to produce comprehensive and optimized content:

  1. Intent Analysis: Gemini first analyzes the target keyword to understand the user's underlying intent (e.g., comparison, discovery, local service search).
  2. Persona & Location Adaptation: The model then synthesizes the app details with the specific needs and context of the persona and location. For "Realtors in Jacksonville," it focuses on how your AI video editor solves their specific problems in that market.
  3. Outline Generation: An intelligent outline is created, typically including:

* Catchy H1 (main heading)

* Introduction (setting the stage, addressing the pain point)

* Key features/benefits tailored to the persona

* Use cases relevant to the persona and location

* Why your app is the best choice

* Call-to-action

* FAQs (optional but recommended for long-tail)

  1. Content Drafting: Gemini drafts the body content, ensuring:

* Uniqueness: Every piece of content is distinct, even for similar keyword combinations.

* High-Intent Language: Direct answers and solutions to the user's implied query.

* Natural Language: Engaging and easy-to-read prose that flows well.

* Keyword Integration: Strategic and natural inclusion of the target keyword and related semantic terms.

* Persuasive Copy: Highlighting your app's value proposition effectively.

  1. SEO Element Generation: Alongside the main body, Gemini generates all critical SEO metadata.
  2. Refinement & Optimization: An internal iterative process refines the content for clarity, conciseness, and adherence to brand voice and SEO best practices.

4. Output: Structured PSEOPage Document

For each keyword combination, Gemini generates a complete PSEOPage document, structured as a JSON-like object, ready to be stored in MongoDB and subsequently published.

Here's a detailed breakdown of the fields within a typical PSEOPage document:


{
  "_id": "65b7c8d9e0f1g2h3i4j5k6l7", // MongoDB unique ID
  "targetKeyword": "Best AI Video Editor for Realtors in Jacksonville",
  "appSlug": "ai-video-editor",
  "personaSlug": "realtors",
  "locationSlug": "jacksonville",
  "urlSlug": "/best-ai-video-editor-for-realtors-in-jacksonville", // SEO-friendly URL path
  "pageTitle": "Best AI Video Editor for Realtors in Jacksonville | [Your App Name]", // Optimized for search engines
  "metaDescription": "Discover the top AI video editor for Realtors in Jacksonville. Create stunning property tours, client testimonials, and social media videos effortlessly. Try [Your App Name] today!", // Compelling snippet for SERP
  "h1": "Unlock Your Potential: The Best AI Video Editor for Realtors in Jacksonville", // Main heading, engaging and keyword-rich
  "bodyContent": [ // Array of content sections for structured display
    {
      "type": "paragraph",
      "content": "In the competitive Jacksonville real estate market, standing out is crucial. High-quality video content can be your secret weapon, but creating it is often time-consuming and complex. That's where [Your App Name] comes in, offering the best AI video editing solution tailored specifically for real estate professionals in Jacksonville."
    },
    {
      "type": "h2",
      "content": "Why Jacksonville Realtors Need AI Video Editing"
    },
    {
      "type": "paragraph",
      "content": "From virtual property tours to engaging client testimonials, video helps you connect with buyers and sellers. [Your App Name] simplifies this, allowing you to quickly produce polished videos that highlight properties and build trust, directly addressing the fast-paced demands of the Jacksonville real estate scene."
    },
    {
      "type": "ul",
      "items": [
        "**Automated Property Showcases:** Turn raw footage into professional listings in minutes.",
        "**Client Testimonial Generators:** Easily compile and edit client reviews for social proof.",
        "**Social Media Optimized:** Create vertical and square videos perfect for Instagram, TikTok, and Facebook.",
        "**Local Market Focus:** Highlight neighborhood features and amenities specific to Jacksonville."
      ]
    },
    {
      "type": "h2",
      "content": "Key Features of [Your App Name] for Real Estate Professionals"
    },
    // ... more detailed feature descriptions, tailored to Realtors, possibly with local examples ...
    {
      "type": "h3",
      "content": "Seamless Integration with Your Workflow"
    },
    {
      "type": "paragraph",
      "content": "Whether you're showcasing homes in San Marco, the Beaches, or Mandarin, [Your App Name] streamlines your video production. Spend less time editing and more time closing deals."
    },
    {
      "type": "h2",
      "content": "Ready to Transform Your Real Estate Marketing?"
    },
    {
      "type": "paragraph",
      "content": "Elevate your listings and attract more clients in Jacksonville. Experience the power of AI-driven video editing with [Your App Name]."
    },
    {
      "type": "button",
      "text": "Start Your Free Trial Today!",
      "link": "/signup"
    }
  ],
  "faqs": [ // Optional: Structured Q&A for schema markup and user intent
    {
      "question": "How can [Your App Name] help me sell homes faster in Jacksonville?",
      "answer": "[Your App Name] automates the creation of high-quality property tours and engaging social media content, allowing you to showcase listings more effectively and reach a wider audience of potential buyers in Jacksonville."
    },
    {
      "question": "Is [Your App Name] easy to use for Realtors without video editing experience?",
      "answer": "Absolutely! [Your App Name] is designed with simplicity in mind, using AI to handle complex editing tasks. You can create professional videos with minimal effort, even if you've never edited before."
    }
  ],
  "generatedAt": "2024-03-01T10:30:00Z",
  "status": "generated" // Indicates content is ready for review/publishing
}

5. Quality Control & Optimization

To ensure the highest quality and SEO effectiveness of the generated content:

  • Advanced Prompt Engineering: Gemini is guided by highly refined prompts that incorporate best practices for SEO, persuasive copywriting, and brand consistency.
  • Iterative Generation & Scoring: For critical fields like pageTitle and metaDescription, multiple variations may be generated and scored based on length, keyword density, and click-through rate potential before selecting the optimal version.
  • Brand Guidelines Enforcement: The LLM is trained and fine-tuned to adhere to your specific brand voice, tone, and messaging, ensuring consistency across thousands of pages.
  • Semantic SEO Integration: Beyond exact keyword matching, Gemini incorporates semantically related terms and entities, enhancing the page's topical authority.
  • Human-in-the-Loop (Optional but Recommended): While automated, a sampling process can be implemented where a small percentage of generated pages are reviewed by a human editor to provide feedback and further refine the generation parameters.

6. Scalability and Efficiency

This "gemini → generate" step is designed for massive scale:

  • Asynchronous Processing: Content generation for thousands of pages runs asynchronously, ensuring efficient use of compute resources and rapid turnaround times.
  • Parallel Generation: Multiple Gemini instances can run in parallel, drastically reducing the time required to generate content for an entire Keyword Matrix.
  • Cost-Effectiveness: By automating content creation, this process significantly reduces the cost and time associated with manual copywriting for large-scale pSEO efforts.

7. Next Steps

Upon successful generation, each structured PSEOPage document will be automatically saved to your designated MongoDB database (Step 3: mongodb → save). This makes the content immediately accessible and prepares it for the final publishing stage, where it will be rendered as a unique, rankable URL on your website.

gemini Output

Step 3 of 5: Content Generation via LLM (gemini → batch_generate)

This document details the successful execution and deliverables of Step 3 in your "pSEO Page Factory" workflow. In this crucial phase, the system leveraged the advanced capabilities of the Gemini Large Language Model (LLM) to automatically generate unique, high-intent, SEO-optimized content for every page identified in the Keyword Matrix.


1. Overview of the gemini → batch_generate Action

The gemini → batch_generate action is the engine that transforms your strategic keyword matrix into publishable content. For each unique keyword combination (e.g., "Best AI Video Editor for Realtors in Jacksonville"), the system dynamically crafts a comprehensive content brief and instructs the Gemini LLM to produce a full landing page. This process ensures that every targeted URL receives bespoke content designed to rank and convert.

2. Process Details

  1. Input from Keyword Matrix: The action begins by fetching each distinct keyword combination (App Name + Persona + Location) from the MongoDB-stored Keyword Matrix generated in the previous step.
  2. Dynamic Prompt Construction: For each combination, a highly specific and optimized prompt is constructed for the Gemini LLM. This prompt includes:

* The target keyword (e.g., "Best AI Video Editor for Realtors in Jacksonville").

* Contextual information about the app, persona, and location.

* Instructions for desired content structure (title, meta description, H1, body content with subheadings, calls to action, etc.).

* SEO best practices (keyword density, semantic keywords, user intent).

  1. LLM Content Generation: The constructed prompt is sent to the Gemini LLM. Gemini then generates unique, high-quality content tailored to the specific search intent of that keyword.
  2. Structured Output & Validation: The LLM's output is received and validated to ensure it adheres to the predefined PSEOPage document schema. This includes parsing the generated content into specific fields:

* title: SEO-optimized page title.

* meta_description: Compelling meta description for SERPs.

* h1: Primary heading of the page, matching the target keyword.

* body_content: The main body of the page, structured with paragraphs, subheadings (H2, H3), and relevant information.

* slug: A clean, SEO-friendly URL slug derived from the target keyword.

* keywords: The primary keyword and relevant semantic keywords.

* app_name, persona, location: Original targeting parameters for easy filtering.

  1. MongoDB Storage: Each piece of generated content, structured as a PSEOPage document, is then securely saved into your MongoDB database. These documents are now ready for the final publishing step.

3. Key Features & Benefits

  • Massive Scalability: Automatically generates thousands of unique content pieces, enabling the creation of a vast pSEO footprint without manual content writing.
  • Hyper-Targeted Content: Each page directly addresses a specific long-tail keyword, ensuring high relevance for users searching for precise solutions (e.g., a specific app for a specific persona in a specific location).
  • Uniqueness & SEO Value: By leveraging Gemini, every page features distinct, high-quality content, avoiding duplication penalties and maximizing SEO potential for individual keywords.
  • High-Intent Conversion Focus: Content is crafted to not just rank, but also to engage high-intent users and drive conversions by directly speaking to their specific needs and pain points.
  • Efficiency & Speed: Automates a traditionally time-consuming and resource-intensive process, allowing you to launch thousands of rankable URLs in a fraction of the time.
  • Structured for Publication: The output is immediately usable, formatted into a consistent PSEOPage document structure that seamlessly integrates with your routing and publishing system.

4. Technical Implementation Details

  • LLM Integration: Direct API integration with Google's Gemini Pro model, ensuring access to a powerful and up-to-date language model.
  • Prompt Engineering: Sophisticated prompt templates are used, dynamically populated with data from your Keyword Matrix, to guide Gemini towards optimal, SEO-friendly output.
  • Error Handling & Retries: Robust mechanisms are in place to handle potential LLM generation failures or timeouts, including intelligent retry logic to ensure maximum content generation success.
  • Database Schema: The PSEOPage document in MongoDB follows a predefined schema, ensuring consistency and ease of retrieval for the publishing step.

* Example PSEOPage Document Structure (simplified):


        {
          "_id": "ObjectId('...')",
          "app_name": "AI Video Editor",
          "persona": "Realtors",
          "location": "Jacksonville",
          "target_keyword": "Best AI Video Editor for Realtors in Jacksonville",
          "slug": "best-ai-video-editor-realtors-jacksonville",
          "title": "Top AI Video Editor for Realtors in Jacksonville | Boost Your Listings",
          "meta_description": "Discover the best AI video editing tools for Realtors in Jacksonville. Create stunning property tours and engaging content effortlessly.",
          "h1": "The Best AI Video Editor for Realtors in Jacksonville",
          "body_content": "<h2>Why Jacksonville Realtors Need AI Video Editing</h2><p>Jacksonville's competitive real estate market demands cutting-edge tools...</p><h3>Features to Look for...</h3>",
          "generated_at": "2023-10-27T10:00:00Z",
          "status": "content_generated"
        }

5. Deliverables for This Step

Upon completion of the gemini → batch_generate action, the following deliverables are available:

  • Generated PSEOPage Documents: A comprehensive collection of PSEOPage documents, each containing unique, SEO-optimized content, now stored in your designated MongoDB database.
  • Total Page Count: A precise count of the number of unique landing pages for which content has been successfully generated.
  • Content Generation Report: A summary report detailing the success rate, any encountered errors (and retries), and processing time for the batch generation.

6. Next Steps & Recommendations

With the content successfully generated and stored, you are now ready for the final phase of your pSEO Page Factory workflow.

  • Review Generated Content (Optional but Recommended): While the process is automated, we recommend reviewing a sample of the generated PSEOPage documents in MongoDB to familiarize yourself with the content quality and structure.
  • Proceed to Publishing: The next step in the workflow will involve taking these structured PSEOPage documents and publishing them as live routes on your platform, making them accessible to search engines and users.

This completes the content generation phase. Your thousands of targeted landing pages are now equipped with unique, high-intent content, poised for publication and search engine ranking.

hive_db Output

Step 4 of 5: hive_dbbatch_upsert - PSEO Page Persistence

This step marks a critical transition in the "pSEO Page Factory" workflow, moving from content generation to data persistence. The batch_upsert action efficiently stores the thousands of newly created PSEOPage documents into your hive_db (powered by MongoDB), making them durable, queryable, and ready for the final publishing stage.


1. Step Overview: Batch Upsert to hive_db

Action: hive_db → batch_upsert

Description: This step takes the entire collection of unique PSEOPage documents, each containing high-intent, LLM-generated content for specific App Name, Persona, and Location combinations, and performs a large-scale upsert operation into your dedicated hive_db instance.

The primary goal is to:

  • Persist Generated Content: Ensure all 2,000+ pages are securely saved.
  • Enable Querying: Make the pages accessible for future operations, analytics, and, most importantly, the publishing step.
  • Maintain Data Integrity: Use an upsert mechanism to prevent duplicates and efficiently update existing records if the workflow is re-run or pages are regenerated.

2. Purpose and Value Proposition

The batch_upsert step is foundational for the "pSEO Page Factory" workflow's success, providing several key benefits:

  • Scalable Data Management: Handles the insertion and potential update of thousands of structured documents in a highly efficient manner, crucial for large-scale pSEO initiatives.
  • Robustness and Idempotency: The "upsert" operation ensures that even if this step is executed multiple times, it will only create new pages if they don't exist or update existing ones, preventing data duplication and maintaining a clean database.
  • Foundation for Publication: By storing the pages in hive_db, they become a structured, addressable resource for the final publishing step, which will transform these database records into live, rankable URLs.
  • Centralized Content Repository: hive_db acts as the single source of truth for all generated pSEO pages, facilitating easy management, auditing, and future enhancements.
  • Readiness for Future Enhancements: Once in the database, pages can be tagged, categorized, monitored, and integrated with other systems or analytics tools.

3. Input Data for Batch Upsert

The input for this step is a collection of fully formed PSEOPage documents, as generated by the preceding LLM content creation step. Each document represents a unique landing page and adheres to a predefined schema to ensure consistency and structure.

Typical PSEOPage Document Structure:


{
  "_id": "65b8e9b0d2d2a4f4e5a6b7c8", // Unique identifier for the page (e.g., generated slug)
  "app_name": "AI Video Editor",
  "persona": "Realtors",
  "location": "Jacksonville",
  "keyword_target": "Best AI Video Editor for Realtors in Jacksonville",
  "url_slug": "/best-ai-video-editor-for-realtors-in-jacksonville",
  "title": "Boost Your Listings: Best AI Video Editor for Realtors in Jacksonville",
  "meta_description": "Discover the top AI video editor tailored for Jacksonville Realtors. Create stunning property tours, client testimonials, and engaging social media content effortlessly.",
  "h1_primary": "Revolutionize Your Real Estate Marketing in Jacksonville with AI Video Editing",
  "h2_benefits": "Key Advantages for Jacksonville Realtors",
  "h2_features": "Powerful Features Designed for Real Estate Professionals",
  "h2_local_impact": "Why Local Realtors in Jacksonville Choose Our AI Editor",
  "content_intro": "In the competitive Jacksonville real estate market, standing out is key...",
  "content_benefits": [
    "Save Time & Resources: Automate video creation...",
    "Enhance Engagement: Capture attention with professional-grade videos...",
    "Local SEO Advantage: Target Jacksonville buyers directly...",
    // ... more benefit points
  ],
  "content_features": [
    "One-Click Property Tours: Instantly generate walkthroughs from photos...",
    "Testimonial Builder: Easily compile client reviews into compelling videos...",
    "Social Media Optimization: Export videos perfectly sized for Instagram, Facebook...",
    // ... more feature points
  ],
  "content_local_impact": "Jacksonville's dynamic housing market demands cutting-edge tools. Our AI video editor...",
  "call_to_action": "Start Your Free Trial Today and Transform Your Jacksonville Listings!",
  "status": "generated", // Current status: 'generated', 'pending_publish', 'published', 'error'
  "created_at": "2023-10-27T10:00:00Z",
  "updated_at": "2023-10-27T10:00:00Z"
}

4. Batch Upsert Process Details

The batch_upsert operation leverages the power of MongoDB's efficient bulk operations to handle the large volume of data.

  1. Unique Identifier: Each PSEOPage document is identified by a unique key. This is typically the url_slug or a combination of app_name, persona, and location, which can be hashed or used directly as the _id field in MongoDB. This ensures that each page has a distinct record.
  2. Bulk Write Operation: Instead of individual insert/update commands, a single batch write operation is executed. This significantly reduces network overhead and database load, making the process much faster for thousands of documents.
  3. Upsert Logic: For each document in the batch:

* The system attempts to find an existing document in the PSEOPage collection that matches the unique identifier.

* If found: The existing document is updated with the new content and metadata from the input PSEOPage document. This is crucial for re-running the workflow with updated content or parameters. The updated_at timestamp is also refreshed.

* If not found: A new document is inserted into the PSEOPage collection. The created_at and updated_at timestamps are set.

  1. Status Update: The status field of each PSEOPage document is typically set to generated or pending_publish at this stage, indicating it's ready for the final publishing step.
  2. Error Handling: The system includes robust error handling to log any issues during the batch operation (e.g., schema validation failures, database connection issues). Failed upserts are reported, allowing for investigation and potential re-processing.

5. Output of this Step

Upon successful completion of the batch_upsert step:

  • Populated hive_db: Your hive_db instance now contains a dedicated collection (e.g., pseopages) fully populated with all the generated PSEOPage documents.
  • Structured Data: Each document within the collection adheres to the defined PSEOPage schema, ensuring consistency and ease of retrieval.
  • Persistent Records: The content and metadata for all 2,000+ pSEO pages are durably stored, protected against transient failures or system restarts.
  • Ready for Publishing: The pages are now in a structured, queryable state, making them immediately available for the final step of the workflow: generating live routes and publishing the content.

6. Key Considerations and Best Practices

  • Schema Evolution: While a fixed schema is used, the system is designed to gracefully handle minor schema evolution, allowing for new fields to be added in future iterations if needed.
  • Indexing: Critical fields like url_slug, app_name, persona, and location are automatically indexed in hive_db to ensure fast lookup and efficient upsert operations.
  • Monitoring: Performance metrics for the batch upsert (e.g., number of documents processed, time taken, error rate) are logged and monitored to ensure efficient operation at scale.
  • Data Validation: Basic validation occurs before the upsert to ensure that critical fields are present and correctly formatted, preventing malformed data from entering the database.

7. Next Steps

With all your pSEO pages now securely stored and structured within hive_db, the workflow proceeds to its final and most impactful step:

  • Step 5: publish_pages: This step will take the PSEOPage documents from hive_db and transform them into live, accessible URLs on your chosen platform or application, making your 2,000+ targeted landing pages rankable and discoverable by search engines.
hive_db Output

Workflow Step Completion: hive_db Update

This marks the successful completion of Step 5 of 5 in your "pSEO Page Factory" workflow. In this crucial final step, the thousands of unique, high-intent pSEO pages generated by the LLM in the previous stages have been securely committed to your designated MongoDB hive_db instance.


1. Overview and Objective

The primary objective of the hive_db update step is to persist all generated pSEO page content and metadata into your database. This transforms the ephemeral output of the content generation process into structured, queryable data, making each page ready for publication as a distinct URL route on your platform.

By completing this step, you have now:

  • Successfully created a vast repository of targeted landing pages.
  • Ensured data integrity and accessibility for your application.
  • Prepared your system for immediate deployment of these new, rankable URLs.

2. Input Data for Update

The input for this step is the complete set of PSEOPage documents, meticulously crafted by the LLM in Step 4. Each document represents a fully formed, unique landing page, and includes:

  • keyword_combination: The specific long-tail keyword targeted (e.g., "Best AI Video Editor for Realtors in Jacksonville").
  • app_name: The specific application or service name.
  • persona: The target audience segment (e.g., "Realtors", "YouTubers").
  • location: The geographical target (e.g., "Jacksonville", "Los Angeles").
  • title: The SEO-optimized page title.
  • meta_description: The snippet displayed in search results.
  • h1: The primary heading of the page.
  • content_body: The unique, high-intent content of the page (typically HTML or Markdown format).
  • slug: The URL-friendly path for the page (e.g., /best-ai-video-editor-for-realtors-in-jacksonville).
  • status: An initial status (e.g., draft, pending_review).
  • word_count: The total word count of the generated content.
  • readability_score: A metric indicating content readability.
  • internal_links: A list of suggested internal links within your site.
  • external_links: A list of suggested external links.
  • generated_at: Timestamp of content generation.

3. Database Update Process

The system executed the following robust process to update your hive_db:

  1. Secure Connection: An authenticated and secure connection was established to your designated MongoDB hive_db instance.
  2. Target Collection: The pseo_pages collection (or your specified equivalent) within hive_db was targeted for data insertion.
  3. Data Iteration & Validation: The system iterated through each of the [Number of Pages] generated PSEOPage documents. Each document was validated against a predefined schema to ensure data integrity and consistency before being processed.
  4. Batch Insertion: To optimize performance and efficiency for handling thousands of documents, the PSEOPage documents were inserted into the pseo_pages collection using batched operations, rather than individual write requests. This significantly reduced the total time required for the update.
  5. Indexing: Relevant indexes (e.g., on slug, keyword_combination, status) were either utilized or created to ensure rapid retrieval of pages and efficient querying in the future.
  6. Error Handling: The process incorporated robust error handling, logging any failed insertions or database connection issues, and ensuring that successful insertions continued even if isolated errors occurred.

4. Outcome and Deliverables

Upon completion of this step, your hive_db has been populated with a total of [Number of Pages] new PSEOPage documents.

Specific Deliverables:

  • Populated pseo_pages Collection: Your MongoDB hive_db now contains a rich and structured collection of pSEO pages, ready to be served.
  • Detailed Log: A comprehensive log of the database insertion process, including the total number of documents processed, successfully inserted documents, and any encountered errors.
  • Summary Report:

* Total Pages Generated: [Number of Pages]

* Total Pages Inserted into DB: [Number of Pages]

* Failed Insertions: [Number of Failed Pages] (if any)

* Database Update Duration: [Total Time Taken]

5. PSEOPage Document Structure Example

Below is an example of a PSEOPage document as it now exists within your pseo_pages collection in MongoDB:


{
  "_id": ObjectId("65c3b2e3f5d7a1b2c3d4e5f6"), // MongoDB's unique identifier
  "app_name": "AI Video Editor",
  "persona": "Realtors",
  "location": "Jacksonville",
  "keyword_combination": "Best AI Video Editor for Realtors in Jacksonville",
  "slug": "/best-ai-video-editor-for-realtors-in-jacksonville",
  "title": "Top AI Video Editor for Realtors in Jacksonville – Boost Your Listings",
  "meta_description": "Discover the best AI video editing tools specifically designed for Realtors in Jacksonville. Create stunning property tours and marketing videos effortlessly.",
  "h1": "Elevate Your Real Estate Marketing in Jacksonville with AI Video Editing",
  "content_body": "<p>Are you a Realtor in Jacksonville looking to stand out? Leveraging AI video editing can transform your property listings and client engagement. Our platform offers intuitive tools tailored for the real estate market, helping you create professional-grade videos in minutes. From automated scene cuts to background music and voiceovers, enhance your visual storytelling without extensive editing experience. Start captivating potential buyers in Jacksonville today!</p>",
  "status": "draft", // Or 'pending_review' based on your configuration
  "word_count": 120,
  "readability_score": 68.2,
  "internal_links": [
    "/features/ai-video-editing",
    "/case-studies/realtor-success"
  ],
  "external_links": [
    "https://www.nar.realtor/",
    "https://www.realtors.com/"
  ],
  "generated_at": ISODate("2024-02-07T10:00:00.000Z"),
  "last_updated_at": ISODate("2024-02-07T10:00:05.123Z")
}

6. Verification and Next Steps

Now that your hive_db is populated, you can proceed with verification and activate these pages.

6.1. Verification Steps:

  1. Connect to MongoDB: Use your preferred MongoDB client (e.g., MongoDB Compass, mongosh, or your application's database browser).
  2. Access hive_db: Navigate to your hive_db database instance.
  3. Query pseo_pages Collection:

* Confirm the presence of new documents: db.pseo_pages.countDocuments() should return [Number of Pages] or higher if existing pages were present.

* Inspect a sample of documents: db.pseo_pages.find({"location": "Jacksonville"}).limit(3).pretty() to review content, slugs, and metadata.

* Check for a specific page: db.pseo_pages.findOne({"slug": "/best-ai-video-editor-for-realtors-in-jacksonville"})

6.2. Actionable Next Steps:

  1. Review and Refine (Optional but Recommended): While the content is LLM-generated, a quick review of a representative sample can ensure quality, brand voice alignment, and accuracy. You can update the status field from draft to pending_review or published as needed.
  2. Publishing Integration: Configure your web application, CMS, or static site generator to dynamically fetch and render these PSEOPage documents as live URL routes based on their slug field.

* Example: When a user navigates to /best-ai-video-editor-for-realtors-in-jacksonville, your application queries hive_db for the PSEOPage document with that slug and renders its title, meta_description, h1, and content_body.

  1. SEO Enhancements:

* Sitemap Generation: Update or generate new sitemaps to include all these new pSEO URLs and submit them to Google Search Console.

* Internal Linking Strategy: Leverage the internal_links suggestions within the PSEOPage documents to interlink your new pages and strengthen your site's SEO.

* Schema Markup: Implement relevant schema

pseo_page_factory.txt
Download source file
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);}});}