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

Step 1 of 5: hive_db → query - Data Retrieval for pSEO Page Factory

This document details the execution and expected output for Step 1 of the "pSEO Page Factory" workflow, focusing on querying the hive_db to retrieve foundational data.


1. Overview and Objective

Workflow: pSEO Page Factory

Step: 1 of 5: hive_db → query

Description: The initial phase of the pSEO Page Factory workflow involves extracting core entities from your hive_db that will serve as the building blocks for generating thousands of targeted landing pages. This step ensures that the subsequent Keyword Matrix generation and content creation processes are based on accurate and up-to-date data specific to your application(s), target personas, and desired geographical locations.

Objective: To query the hive_db and retrieve comprehensive lists of:

  1. Application Names: Your core products or services.
  2. Target Personas: The specific audience segments you aim to reach (e.g., YouTubers, Realtors, Agencies).
  3. Geographical Locations: The cities, regions, or countries you wish to target.

This retrieved data will be immediately passed to Step 2, where it will be used to construct the Keyword Matrix.


2. Query Details and Execution

The hive_db query is executed against specified collections within your database to gather the necessary data points.

2.1. Data Sources (Assumed Collections)

The query will target the following logical collections within your hive_db:

2.2. Query Parameters and Filtering

The query can be configured to filter or select specific subsets of data based on your requirements. For this run, the following general parameters are applied:

* Filter: Retrieve all active applications. (Optional: Filter by specific application_id or tag if only a subset is desired).

* Fields Selected: name, primary_keyword (if available).

* Filter: Retrieve all defined personas relevant for marketing. (Optional: Filter by persona_type or status).

* Fields Selected: name, description (for LLM context).

* Filter: Retrieve a pre-defined list of target cities. (Optional: Filter by country, state, population_threshold, or a specific location_tag).

* Fields Selected: city, state (if applicable), country.

2.3. Example Query Logic (Conceptual MongoDB Syntax)

text • 245 chars
---

### 3. Expected Output

The successful execution of this step will yield three distinct lists, structured as follows, which will be immediately available for the next workflow step (Keyword Matrix generation).

#### 3.1. Output Structure

Sandboxed live preview

3.2. Detailed Content of Retrieved Data

  • applications Array:

* Each object represents one of your core products/services.

* name: The official name of your application, which will be a primary component in the generated page titles and content.

* primary_keyword: (Optional) A default or primary keyword associated with the application, useful for guiding content generation.

  • personas Array:

* Each object defines a target audience segment.

* name: The short, descriptive name of the persona (e.g., "Realtors"). This will be used directly in keyword phrases.

* description: A more detailed explanation of the persona. This description is crucial as it will be fed to the LLM in subsequent steps to ensure content is highly tailored and relevant to that specific audience's needs, pain points, and language.

  • locations Array:

* Each object represents a specific geographical target.

* city: The name of the city.

* state: (Optional, but recommended) The state or province, providing additional context and disambiguation.

* The combination of these will form the location component of the keyword phrases.


4. Actionable Insights & Next Steps

  • Verification: Please review the generated output above to ensure all desired applications, personas, and locations are correctly represented. If any data is missing or incorrect, adjustments to the hive_db collections or the query parameters for this step will be required.
  • Input for Step 2: The lists generated in this step (Applications, Personas, Locations) are the direct inputs for Step 2: Keyword Matrix Generation. They will be systematically combined to create a comprehensive list of unique, high-intent keyword phrases, such as "Best AI Video Editor for Realtors in Jacksonville."
  • LLM Context: The description field for personas is a critical input for the LLM in later stages. Ensuring these descriptions are rich and accurate will significantly improve the quality and relevance of the generated page content.
  • Scalability: This modular approach allows for easy expansion. To generate pages for new applications, personas, or locations, simply ensure they are present and correctly structured within your hive_db collections.

This concludes Step 1, providing the foundational data required to proceed with the automated pSEO page generation.

gemini Output

This document details the successful execution of Step 2: Content Generation (gemini → generate) within your pSEO Page Factory workflow. This crucial step leverages advanced AI to transform your keyword matrix into unique, high-intent landing page content, ready for publication.


pSEO Page Factory: Step 2/5 - Content Generation (gemini → generate)

1. Introduction & Purpose

This step is the core content engine of the pSEO Page Factory. Utilizing Google's state-of-the-art Gemini Large Language Model (LLM), we have automatically generated unique, high-quality, and SEO-optimized content for every distinct keyword combination identified in your Keyword Matrix. The primary goal is to produce compelling content that directly addresses the search intent for each specific app-persona-location pairing, ensuring maximum relevance and conversion potential.

Example Keyword: "Best AI Video Editor for Realtors in Jacksonville"

2. Input Data for Generation

The Gemini LLM was provided with a comprehensive set of inputs to ensure the highest quality and most relevant content generation:

  • Keyword Matrix Combinations: Each unique keyword phrase (e.g., "Best AI Video Editor for Realtors in Jacksonville") derived from the previous step.
  • Application Specifics: Detailed information about your application, including its core features, benefits, unique selling propositions (USPs), and target use cases. This ensures the content accurately reflects your product.
  • Persona Profiles: In-depth understanding of the target audience (e.g., "Realtors" – their pain points, daily workflows, specific needs, and industry terminology). This helps Gemini adopt the correct tone and focus on relevant solutions.
  • Location Context: Specific information about the targeted geographic area (e.g., "Jacksonville" – while less critical for a software product, it helps tailor language or examples if applicable for local relevance).
  • Pre-defined Content Structure & Guidelines: A set of templates and best practices for page structure (e.g., H1, H2s, intro, benefits, use cases, CTA placement, internal linking strategy) to ensure SEO compliance and readability.

3. AI-Powered Content Generation Process

The content generation process is highly sophisticated and designed for both scale and quality:

  • Advanced Prompt Engineering: Gemini received meticulously crafted prompts that dynamically combined the specific keyword, your app's details, the persona's characteristics, and location context. This ensures each piece of content is hyper-targeted.
  • Dynamic Content Structuring: The LLM adhered to a predefined content hierarchy, generating:

* A compelling SEO Title and Meta Description.

* A clear and keyword-rich H1 heading.

* Structured body content with logical H2/H3 subheadings, informative paragraphs, and relevant bullet points.

* A clear Call-to-Action (CTA).

  • Uniqueness and Relevance: For every keyword combination, Gemini produced entirely unique content. This eliminates duplicate content issues and ensures that each page is singularly focused on its specific search query, maximizing its potential to rank.
  • SEO Optimization: The generated content is designed with SEO best practices in mind, naturally incorporating target keywords, semantic variations, and answering implied user questions, thereby enhancing search engine visibility.
  • Scalability and Efficiency: This automated process allows for the rapid generation of thousands of high-quality, distinct landing pages, a task that would be logistically impossible and prohibitively expensive with manual content creation.

4. Output: Structured PSEOPage Documents

The successful output of this step is a collection of structured PSEOPage documents, stored in your MongoDB database. Each document represents a complete, ready-to-publish landing page tailored to a specific keyword combination.

PSEOPage Document Structure:

Each PSEOPage document contains the following key fields:

  • _id: Unique identifier for the document (MongoDB ObjectId).
  • keywordCombination: The exact keyword phrase this page targets (e.g., "Best AI Video Editor for Realtors in Jacksonville").
  • appRef: Reference to your application's data.
  • personaRef: Reference to the targeted persona's data.
  • locationRef: Reference to the targeted location's data.
  • slug: The URL-friendly path for the page (e.g., /best-ai-video-editor-realtors-jacksonville).
  • seoTitle: The optimized title tag for search engine results pages (SERPs) (e.g., "Best AI Video Editor for Realtors in Jacksonville - [Your App Name]").
  • metaDescription: A concise, compelling summary for SERPs, designed to improve click-through rates.
  • h1: The main heading of the page, typically mirroring the keywordCombination.
  • bodyContent: The rich text content of the page, structured for readability and SEO:

* sections: An array of objects, each representing a content section:

* heading: (e.g., "Why Realtors in Jacksonville Need an AI Video Editor")

* paragraphs: Array of strings (e.g., "In today's competitive Jacksonville real estate market...")

* bulletPoints: Array of strings (e.g., "Save time on editing", "Create stunning property tours")

  • callToAction: An object containing:

* text: The CTA button text (e.g., "Start Your Free Trial Today!")

* url: The link for the CTA (e.g., /signup).

  • internalLinks: An array of objects for internal navigation and SEO, each with text and url.
  • schemaMarkup: JSON-LD structured data (e.g., Article or Product schema) to enhance SERP visibility and context.
  • status: Current status of the page (e.g., 'generated', 'review_pending', 'published').
  • generatedAt: Timestamp of content creation.

5. Key Benefits of this Step

  • Massive Scale & Efficiency: Automatically generates thousands of unique, high-quality pages, drastically cutting down content creation time and costs.
  • Hyper-Targeted Relevance: Each page's content is precisely tailored to a specific long-tail keyword, directly addressing user intent and increasing engagement.
  • Enhanced SEO Performance: Pages are optimized for their target keywords, improving organic search visibility and driving qualified traffic.
  • Consistent Quality & Brand Voice: Ensures a uniform level of quality and maintains your brand's voice across all generated content.
  • Ready-to-Publish Assets: Produces fully structured PSEOPage documents that are immediately ready for review and deployment.

6. Next Steps

The generated PSEOPage documents are now available for your review and approval.

  • Step 3: Review & Refine: You will now access these generated documents within the platform. Here, you can review the content, make any necessary edits or refinements, and approve them for publishing.
  • Step 4: Publishing: Once approved, these documents will be used to create live, crawlable routes on your website, making your thousands of new landing pages discoverable by search engines and potential customers.

Customer Deliverable:

You now have [Number] unique, high-intent PSEOPage documents generated, each targeting a specific combination of your app, a persona, and a location. These documents are stored in your MongoDB instance and are ready for the next stage of review and publishing.

gemini Output

Step 3: Content Generation via Gemini (gemini → batch_generate)

This crucial step leverages Google's Gemini LLM to transform each unique keyword combination from the Keyword Matrix into a fully structured, high-intent landing page document. The output is a collection of PSEOPage documents, ready for immediate publication or further review.


1. Overview & Objective

The primary objective of the gemini → batch_generate step is to automate the creation of thousands of unique, SEO-optimized landing page content pieces. Each piece of content is specifically tailored to a granular keyword combination (e.g., "Best AI Video Editor for Realtors in Jacksonville"), ensuring high relevance and search intent alignment. This process eliminates the need for manual content creation for each page, drastically accelerating the pSEO strategy.

Key Goals:

  • Generate unique, high-quality content for every entry in the Keyword Matrix.
  • Ensure content is highly relevant to the target app, persona, and location.
  • Produce structured PSEOPage documents ready for direct publication.
  • Scale content generation to support 2,000+ landing pages efficiently.

2. Input Data for Gemini

To ensure the generated content is precise and highly effective, Gemini receives a comprehensive set of inputs for each page:

  • Target Keyword Combination: The specific long-tail keyword generated from the previous steps (e.g., "Best AI Video Editor for Realtors in Jacksonville"). This forms the core intent for the page.
  • Client Application Data:

* App Name: The name of your application.

* Core Features & Benefits: A detailed list of your app's functionalities and the advantages they offer.

* Unique Selling Propositions (USPs): What makes your app stand out.

* Use Cases: Examples of how your app solves problems or adds value.

* Tone of Voice Guidelines: Brand-specific instructions for content style (e.g., professional, friendly, innovative).

  • Persona-Specific Context:

* Persona Name: (e.g., "Realtors," "YouTubers," "Agencies").

* Pain Points: Common challenges faced by this persona.

* Goals & Aspirations: What this persona aims to achieve.

* Industry Jargon: Specific terminology relevant to the persona's field.

* Desired Outcomes: How your app specifically helps this persona.

  • Location-Specific Context (if applicable):

* City/Region: (e.g., "Jacksonville").

* Local Market Nuances: Any specific regulations, trends, or competitive landscape relevant to the location that might influence the content.

  • Content Structure & SEO Guidelines:

* Desired Sections: A predefined template for the page structure (e.g., H1, Introduction, Problem, Solution, Features, Benefits, CTA, FAQ).

* SEO Best Practices: Instructions for keyword density, LSI keyword inclusion, readability, and compelling calls to action.


3. Gemini LLM Configuration & Prompt Engineering

The system employs advanced prompt engineering techniques to guide Gemini in generating high-quality, relevant, and unique content for each page.

  • Model Selection: We utilize a powerful Gemini model (e.g., gemini-1.5-pro or equivalent) known for its extended context window and superior content generation capabilities, ensuring comprehensive and coherent outputs.
  • Dynamic Prompt Construction: For each keyword combination, a highly specific and detailed prompt is constructed. This prompt includes:

* The target keyword.

* All relevant application, persona, and location data.

* Explicit instructions for the desired content structure, tone, and SEO elements.

* Example Prompt Structure:


        "You are an expert SEO content writer for [App Name].
        Your task is to create a high-intent landing page for the keyword: '[Target Keyword Combination]'.
        Focus on how [App Name] specifically addresses the needs of [Persona Name] in [Location Name].

        **Client App Details:**
        - App Name: [App Name]
        - Core Features: [List of features]
        - Benefits: [List of benefits]
        - USPs: [List of USPs]

        **Persona Details:**
        - Persona: [Persona Name]
        - Pain Points: [List of pain points]
        - Goals: [List of goals]

        **Location Details:**
        - Location: [Location Name]
        - Local Context: [Specific local insights, if any]

        **Content Requirements:**
        1.  **Title (H1):** Compelling, keyword-rich, and directly addressing the user's intent.
        2.  **Meta Description:** Concise, enticing, and encouraging clicks.
        3.  **Introduction:** Immediately hook the reader, acknowledge their problem.
        4.  **Problem Section:** Elaborate on the challenges faced by [Persona Name] related to [App's Domain].
        5.  **Solution Section:** Introduce [App Name] as the ideal solution, linking features to problem-solving.
        6.  **Key Features & Benefits Section:** Detail specific features of [App Name] and their direct benefits for [Persona Name] in [Location Name].
        7.  **Use Cases:** Provide concrete examples of how [Persona Name] can leverage [App Name].
        8.  **Why Choose [App Name] in [Location Name]?** Highlight local advantages or tailored solutions.
        9.  **Call to Action (CTA):** Clear, prominent, and compelling (e.g., "Start Your Free Trial," "Get a Demo").
        10. **FAQs (Optional):** Address common questions related to the keyword, app, and persona.

        **SEO Guidelines:**
        - Ensure natural keyword integration.
        - Maintain a [Tone of Voice] tone.
        - Aim for readability and engagement.
        - Use Markdown for formatting (headings, bullet points, bolding).
        "
  • Safety Settings: Gemini's safety settings are configured to ensure that all generated content is on-brand, professional, and free from harmful or inappropriate material.
  • Iterative Refinement (Optional): For highly sensitive or critical pages, the system can be configured to perform multiple generation attempts or self-correction loops based on predefined quality metrics.

4. Batch Generation Process

The system is designed for high-throughput, parallel content generation to handle thousands of pages efficiently.

  • Parallel Processing: The content generation requests are batched and sent to the Gemini API in parallel, significantly reducing the overall processing time.
  • Rate Limiting & Error Handling: Robust mechanisms are in place to manage API rate limits, handle transient errors, and retry failed requests, ensuring maximum successful page generation.
  • Progress Monitoring: The workflow provides real-time updates on the generation status, allowing you to track the progress of content creation across all targeted pages.
  • Cost Optimization: Intelligent batching and efficient API usage are implemented to optimize the operational cost of using the Gemini LLM.

5. Output: Structured PSEOPage Document (MongoDB)

Upon successful generation, each content piece is structured into a PSEOPage document and saved directly into your MongoDB instance. This document is a complete, ready-to-publish entity.

PSEOPage Document Structure:


{
    "_id": "unique_page_identifier_uuid",
    "keyword": "Best AI Video Editor for Realtors in Jacksonville",
    "app_name": "Your AI Video Editor App",
    "persona": "Realtors",
    "location": "Jacksonville",
    "title": "Best AI Video Editor for Realtors in Jacksonville | [Your App Name]",
    "metaDescription": "Discover how [Your App Name] revolutionizes video creation for Realtors in Jacksonville. Create stunning property tours and marketing videos instantly. Get started today!",
    "slug": "/best-ai-video-editor-realtors-jacksonville",
    "h1": "Unlock Your Potential: The Best AI Video Editor for Realtors in Jacksonville",
    "bodyContent": {
        "introduction": "In the competitive Jacksonville real estate market, standing out is crucial...",
        "problem": "Realtors often struggle with time-consuming video editing, missing out on engaging their audience...",
        "solution": "[Your App Name] provides an intuitive, AI-powered solution for Realtors...",
        "features_benefits": [
            {
                "feature": "Automated Property Tours",
                "benefit": "Generate professional property walkthroughs in minutes, showcasing every detail."
            },
            {
                "feature": "AI-Powered Scripting",
                "benefit": "Effortlessly create compelling narratives for your listings, enhancing viewer engagement."
            }
            // ... more features and benefits tailored to Realtors in Jacksonville
        ],
        "use_cases": [
            "Creating virtual open house tours.",
            "Developing social media video ads for new listings.",
            "Producing client testimonials with professional polish."
        ],
        "local_context_section": "Jacksonville's booming real estate market demands cutting-edge tools. [Your App Name] helps you connect with local buyers and sellers more effectively...",
        "call_to_action": {
            "text": "Start Your Free Trial Today in Jacksonville!",
            "url": "https://your-app.com/signup?location=jacksonville"
        },
        "faq": [
            {"question": "How does [Your App Name] help Realtors in Jacksonville specifically?", "answer": "Our AI tailors content suggestions for local market trends and property types."},
            {"question": "Is it easy to integrate with MLS listings?", "answer": "Yes, [Your App Name] offers seamless integration options to streamline your workflow."}
        ]
    },
    "relatedKeywords": [
        "real estate video editing jacksonville",
        "property video maker jacksonville",
        "ai video software for realtors florida",
        "best video marketing tools real estate"
    ],
    "wordCount": 980,
    "readabilityScore": 75, // e.g., Flesch-Kincaid score
    "status": "generated", // Other statuses: 'pending_review', 'published', 'error'
    "generatedAt": "2023-10-27T10:30:00Z"
}

6. Content Quality & SEO Optimization

A core focus of this step is to ensure that the generated content is not only unique but also highly optimized for search engines and user engagement:

  • Uniqueness: Each PSEOPage document contains truly unique content, avoiding duplication across pages, which is critical for SEO performance.
  • High-Intent Alignment: The content directly addresses the user's intent as implied by the long-tail keyword, leading to higher conversion rates and lower bounce rates.
  • Natural Keyword Integration: Target keywords and semantically related keywords (LSI keywords) are naturally woven into the content, enhancing relevance without keyword stuffing.
  • Readability & Engagement: Gemini is prompted to generate human-like, engaging, and easy-to-read content, promoting longer on-page times.
  • Structured Content: The predefined content structure (H1, sections, lists) makes the pages easy for both search engines and users to digest.

7. Deliverable for this Step

Upon completion of the gemini → batch_generate step, you will receive:

  • MongoDB Collection of PSEOPage Documents: A fully populated MongoDB collection containing 2,000+ unique, structured landing page documents, each ready for publication.
  • Generation Report: A summary report detailing:

* Total number of pages attempted for generation.

* Total number of pages successfully generated.

* Any pages that encountered generation errors (with error details).

* Average word count and readability scores across generated pages.

* A sample of 5-10 randomly selected generated PSEOPage documents for immediate review.

This output forms the foundation for your pSEO strategy, providing the bulk of the content needed to launch thousands of targeted landing pages.

hive_db Output

Step 4: hive_db Integration – Batch Upsert of pSEO Pages

This pivotal step in the "pSEO Page Factory" workflow is responsible for securely and efficiently storing all the unique, high-intent pSEO page content generated in the previous stages into your dedicated hive_db (MongoDB instance). The batch_upsert operation ensures that thousands of structured PSEOPage documents are persisted, making them ready for immediate publication.


Purpose of This Step

The hive_db → batch_upsert operation serves several critical functions:

  • Data Persistence: To permanently store each PSEOPage document, ensuring that the valuable, LLM-generated content and associated metadata are not lost and are readily accessible for future use and publishing.
  • Scalable Storage: To efficiently manage the insertion or update of potentially thousands of unique landing page documents into your database in a single, optimized operation, rather than individual, less efficient transactions.
  • Foundation for Publishing: To prepare the structured page data for the final publishing step, where these documents will be retrieved and converted into live, rankable URLs on your platform.
  • Data Integrity & Management: To maintain a consistent, reliable, and queryable repository of all your pSEO assets, facilitating content management, analytics, and future updates.

Input Data Overview: PSEOPage Documents

The input for this step is a collection of fully structured PSEOPage documents, which are the direct output from Step 3 (LLM Content Generation). Each document represents a complete, unique landing page tailored to a specific keyword combination.

Typical Structure of a PSEOPage Document:

Each PSEOPage document is a rich data object designed for optimal SEO performance and includes, but is not limited to:

  • _id: A unique identifier for the page (e.g., a hash derived from the app-persona-location combination, ensuring uniqueness).
  • keyword_target: The primary keyword phrase this page is optimized for (e.g., "Best AI Video Editor for Realtors in Jacksonville").
  • app_name: The specific application or product being featured on the page.
  • persona: The targeted audience segment (e.g., "Realtors", "YouTubers", "Marketing Agencies").
  • location: The geographical target for the page (e.g., "Jacksonville", "Los Angeles", "New York City").
  • title: The SEO-optimized page title (for <title> tag).
  • meta_description: A compelling meta description designed to attract clicks from SERPs.
  • h1: The main heading of the page, reinforcing the primary keyword.
  • body_content: The unique, LLM-generated long-form content, typically structured with sub-headings (h2, h3), paragraphs, bullet points, and calls to action.
  • slug: The clean, SEO-friendly URL path for the page (e.g., /best-ai-video-editor-realtors-jacksonville).
  • status: The current status of the page (e.g., "generated", "stored", "published").
  • created_at: Timestamp indicating when the document was first created.
  • updated_at: Timestamp indicating the last modification of the document.
  • (Optional) Additional fields like FAQs, testimonials, internal linking suggestions, schema markup, etc., can also be included based on your specific configuration.

Expected Volume:

Given the workflow description, this step is designed to handle 2,000+ such PSEOPage documents, corresponding to every unique combination generated from your Keyword Matrix.


Execution Process: Batch Upsert Mechanism

The batch_upsert operation is executed as follows:

  1. Database Connection: The workflow establishes a secure and authenticated connection to your designated hive_db (MongoDB instance).
  2. Data Collection: All PSEOPage documents generated by the LLM in the previous step are collected and prepared for database interaction.
  3. Batching: To maximize efficiency and minimize database overhead, the system groups these PSEOPage documents into optimized batches. This reduces the number of individual network requests to the database.
  4. Upsert Logic: For each document within a batch, the system performs an "upsert" operation:

* IF a document with the same unique identifier (e.g., _id or a composite key like app_name, persona, location) already exists in the PSEOPage collection, the existing document will be updated with the new content and metadata. This is crucial for re-running the workflow with updated content or configurations without creating duplicate entries.

* ELSE IF no such document exists, a brand new PSEOPage document will be inserted into the collection.

  1. Error Handling & Resilience: The system incorporates robust error handling mechanisms to manage potential issues such as network interruptions, database timeouts, or data validation failures. Any unrecoverable errors will be logged and reported, ensuring the integrity of the operation.
  2. Performance Optimization: The batching strategy significantly reduces the number of database round trips, leading to faster overall execution times and lower resource consumption on the database server, even when processing thousands of pages.

Key Outcomes and Customer Value

Upon successful completion of this step, you will realize the following benefits:

  • Thousands of Structured pSEO Pages Stored: Your hive_db now contains a comprehensive and organized collection of unique, high-intent landing page documents, each perfectly tailored to a specific app-persona-location keyword.
  • Ready for Immediate Publishing: The data is perfectly structured and organized, forming the direct, validated input for the final publishing step. This eliminates any manual data preparation before making pages live.
  • Scalability and Efficiency Achieved: The batch_upsert operation demonstrates the system's robust ability to handle large-scale content generation and storage efficiently, validating the core promise of the pSEO Page Factory.
  • Persistent Asset Library: You now possess a persistent, queryable database of all your generated pSEO content. This serves as a valuable asset library that can be leveraged for analytics, content management, future updates, and strategic decision-making.
  • Reduced Manual Effort: This automated storage step completely eliminates the need for manual data entry, organization, or management for thousands of pages, freeing up your team's valuable time.

Next Steps in the Workflow

  • Step 5: publish_pages: The system will now proceed to the final and most anticipated step. The PSEOPage documents that have been successfully stored in your hive_db will be retrieved and published as live, accessible URLs (routes) on your designated platform or content delivery network. This is where your thousands of rankable URLs become visible to search engines and users, ready to capture targeted organic traffic.

Monitoring and Verification

  • Completion Log: Upon the conclusion of this step, you will receive a detailed confirmation log indicating the total number of documents successfully upserted (inserted or updated) into your hive_db. This log will provide a clear summary of the operation's success.
  • Database Inspection (Optional): For further verification, you can optionally connect to your MongoDB instance and inspect the PSEOPage collection. You will be able to observe the presence, structure, and content of the newly stored documents. You can also query the collection to confirm counts and recent updated_at timestamps.
hive_db Output

pSEO Page Factory: Step 5/5 - Database Update (hive_db → update)

This final, crucial step of the pSEO Page Factory workflow is dedicated to the secure and structured persistence of all generated content. The hive_db → update operation ensures that every unique, LLM-generated PSEOPage document is meticulously saved into your designated database, forming the foundation for your massive pSEO content library.

Overview of This Step

The hive_db → update step concludes the content generation and structuring process by writing all the high-intent, targeted landing page data into your MongoDB instance. Each document represents a fully formed landing page, ready to be published as a distinct URL route on your website. This action transforms the ephemeral output of the LLM into a permanent, queryable, and deployable asset.

Process Details

  1. Data Ingestion: Each PSEOPage document, meticulously crafted in the preceding steps, is now being ingested into your hive_db. This includes:

* Unique URL Slug/Route: A clean, SEO-friendly URL path derived from the target keyword (e.g., /best-ai-video-editor-for-realtors-in-jacksonville).

* LLM-Generated Content: The full, unique, and high-intent body content, optimized for specific app-persona-location combinations, designed to rank and convert.

* Comprehensive SEO Metadata: Pre-optimized title tags, meta descriptions, H1 headings, and other critical on-page SEO elements.

* Target Keywords: The specific combination of App Name, Persona, and Location that each page is designed to target.

* Structured Data (Schema Markup): Any generated JSON-LD schema markup to enhance search engine understanding and visibility (if applicable).

* Internal Linking Data: Suggestions or actual links to related pages within your pSEO network.

* Timestamps: Metadata indicating creation and last update times for tracking and versioning.

  1. Database Target: As specified by the workflow, these documents are being securely stored within your MongoDB database. MongoDB's flexible document model is ideal for handling the diverse structure and scale of pSEO content.
  1. Scalability and Efficiency: This step is engineered to efficiently handle the storage of thousands of unique PSEOPage documents in a single run. The process is optimized for high-volume writes, ensuring all your generated content is safely recorded without performance bottlenecks.

Key Deliverables & Outcomes

Upon completion of this step, you will have:

  • Populated hive_db: Your MongoDB instance will contain a new collection (or updated documents within an existing one) specifically for your PSEOPage documents.
  • Structured Content Library: A comprehensive, organized, and searchable database of thousands of unique, high-intent landing pages, each ready for publication.
  • Data Persistence: Assurance that all the valuable, LLM-generated content is securely stored and permanently accessible.
  • Audit Confirmation: A detailed log confirming the number of PSEOPage documents successfully inserted or updated, along with any rare instances of errors during the write operation.

Benefits to Your Business

  • Robust Content Foundation: You now possess a solid, scalable database containing your entire pSEO content strategy, ready for immediate deployment.
  • Maximized Efficiency: Eliminates the need for manual data entry or complex content management for thousands of pages, freeing up valuable team resources.
  • Enhanced SEO Readiness: Each stored document is pre-optimized and strategically targeted, providing a powerful asset for driving organic search traffic and conversions.
  • Scalability for Future Growth: The MongoDB structure allows for seamless expansion as you continue to generate more pages, explore new personas, or target additional locations.
  • Centralized Content Management: All your pSEO content resides in a single, accessible location, simplifying future updates, A/B testing, and performance analysis.

Next Steps & Actionable Recommendations

With your pSEO content now securely stored in hive_db, you are ready for deployment. Here are the recommended next actions:

  1. Database Review & Validation:

* Access Your hive_db: Connect to your MongoDB instance and navigate to the PSEOPage collection.

* Sample Verification: Review a random selection of documents to verify their structure, content accuracy, SEO metadata, and URL slugs.

* Count Confirmation: Confirm that the total number of documents in the PSEOPage collection matches the expected output from the preceding content generation step.

  1. Publishing Integration Strategy:

* CMS Integration: Develop or leverage an existing integration layer to pull these PSEOPage documents from hive_db and seamlessly publish them to your Content Management System (CMS) or as static routes on your web application.

* Dynamic API Endpoint: Consider building a dedicated API endpoint that dynamically serves the content of these PSEOPage documents, allowing for real-time content delivery and updates.

* Static Site Generation: Explore using a static site generator (e.g., Next.js, Gatsby, Hugo) to build thousands of HTML pages directly from your hive_db data, offering unparalleled performance and security.

  1. Deployment & Monitoring Plan:

* Staging Environment Deployment: Deploy a subset of these pages to a staging or testing environment first. Verify rendering, internal linking, user experience, and technical SEO aspects before going live.

* Phased Rollout: Consider a phased rollout to your live production environment, starting with a smaller batch of pages and gradually expanding.

* SEO Performance Monitoring: Implement robust SEO monitoring tools to track keyword rankings, organic traffic, impressions, click-through rates, and conversion metrics for these new pages.

  1. Future Content Iterations:

* Content Refresh Cycle: Plan for future workflow runs to refresh or update existing content based on performance, market changes, or new product features.

* Expansion Opportunities: Use the structured data in hive_db to identify opportunities for generating even more targeted pages by expanding your persona, location, or app name matrices.

This workflow has successfully equipped you with a vast, high-quality, and strategically generated content library. The next phase is to unleash these pages to the web and capture your target market!

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