Real Estate Listing Generator
Run ID: 69cc88363e7fb09ff16a2c262026-04-01Real Estate
PantheraHive BOS
BOS Dashboard

Create professional real estate listings with compelling descriptions, feature highlights, neighborhood analysis, pricing comparisons, and marketing copy.

Step 1 of 3: Property Analysis (analyze_property)

Executive Summary

This deliverable outlines the comprehensive property analysis performed as the foundational step for generating a professional real estate listing. The analyze_property step leverages advanced data models to assimilate property-specific details with broad market intelligence, neighborhood demographics, and comparative sales data. The goal is to provide a holistic understanding of the property's market position, intrinsic value, unique selling propositions, and optimal pricing strategy.

While specific property data was not provided in the initial prompt, this analysis details the framework, methodology, and types of insights that would be generated for any given property. The output is designed to be directly actionable, informing the subsequent steps of listing description generation, feature highlighting, and marketing copy creation.


1. Property Data Assimilation & Validation

This initial phase focuses on collecting, validating, and enriching all available data points pertaining to the property.

  • Input Data Categories (Hypothetical):

* Basic Property Details: Address, property type (e.g., single-family home, condo, multi-family), number of bedrooms, bathrooms, square footage (living space, lot size), year built, garage capacity.

* Interior Features: Renovations (year, scope), appliance upgrades, flooring, smart home technology, specific room details (e.g., gourmet kitchen, spa-like master bath).

* Exterior Features: Landscaping, pool, outdoor living areas, roof age, siding material, views.

* Community/Building Specifics (for condos/townhouses): HOA fees, amenities (gym, concierge, security), pet policies.

* Financial & Legal: Current tax assessment, recent sales history of the property, zoning information.

* Agent Notes: Any specific instructions, desired highlights, or known issues.

  • Validation & Augmentation:

* Cross-referencing provided data with public records (county assessor, GIS data) for accuracy.

* Automatically fetching additional data such as school district ratings, flood zone information, parcel maps, and historical sales trends for the specific address.

* Identifying any discrepancies or missing critical information that may require agent follow-up.


2. Comparative Market Analysis (CMA) Insights

This section provides a data-driven assessment of the property's value relative to the current market.

  • Key Comparables Identification:

* Sold Comps: Identification of 3-5 most relevant properties sold within the last 3-6 months, ideally within a 0.5-1 mile radius, matching property type, size, bedroom/bathroom count, and year built range.

* Pending Comps: Analysis of properties currently under contract to gauge recent buyer activity and accepted price points.

* Active Comps: Review of competing properties currently on the market to understand current supply, pricing strategies of competitors, and potential over/under-pricing.

  • Market Trend Analysis:

* Average Days on Market (DOM): Analysis of local DOM trends for similar properties to predict selling velocity.

* Price Per Square Foot (PPSF): Calculation and comparison of average PPSF for sold comparables, adjusted for property condition and features.

* Listing Price vs. Sale Price Ratio: Evaluation of how close properties are selling to their original asking price in the local market, indicating negotiation room or market heat.

* Inventory Levels: Assessment of current housing supply in the micro-market (e.g., 2 months supply indicates a seller's market, 6+ months a buyer's market).

  • Estimated Price Range & Justification (Conceptual):

* Based on adjusted comparables, a data-backed estimated listing price range would be generated (e.g., \$750,000 - \$785,000).

* Detailed adjustments for differences in square footage, lot size, number of bedrooms/bathrooms, specific renovations (e.g., new kitchen adds \$X, older roof subtracts \$Y), and premium features (e.g., pool, view).

* Recommendation: A specific target listing price within the range, considering current market dynamics and seller objectives.


3. Neighborhood & Location Analysis

A deep dive into the property's surroundings to highlight lifestyle benefits and local amenities.

  • Demographics & Lifestyle Profile:

* Household Income & Age: Average household income, median age, and family composition (e.g., young families, empty nesters, professionals) to identify the most likely buyer demographic.

* Education Levels: Percentage of residents with higher education.

* Walkability/Bikeability Scores: Numerical scores indicating ease of access to amenities by foot or bike.

* Safety & Crime Rates: Data-driven insights into neighborhood safety, often using publicly available crime statistics.

  • Key Amenities & Proximity:

* Schools: Top-rated public and private schools within designated zones or easy commuting distance, including ratings (e.g., 9/10 GreatSchools rating).

* Shopping & Dining: Proximity to grocery stores, retail centers, popular restaurants, and cafes.

* Parks & Recreation: Access to green spaces, walking trails, sports facilities, community centers.

* Transportation: Proximity to public transit (bus stops, train stations), major highways, and airports.

* Healthcare: Nearby hospitals, clinics, and specialized medical facilities.

  • Future Outlook & Development:

* Information on approved or proposed zoning changes, new commercial developments, infrastructure projects, or community improvements that could impact property value.

* Identification of local trends (e.g., gentrification, influx of tech companies, new public art installations) that enhance neighborhood appeal.


4. Property Feature & Value Proposition Assessment

Identifying what makes the property unique and appealing to its target audience.

  • Unique Selling Points (USPs):

* Architectural Style: Distinctive design elements (e.g., Mid-Century Modern, Victorian charm, contemporary open-concept).

* Key Renovations/Upgrades: New roof (2022), remodeled kitchen (2023 with high-end appliances), updated bathrooms, energy-efficient windows, smart home systems.

* Premium Features: Stunning panoramic views, oversized private backyard, custom-built-ins, dedicated home office, income-generating ADU.

* Condition & Maintenance: Impeccably maintained, turn-key ready.

  • Potential Areas for Consideration/Mitigation:

* Identification of any features that might be perceived as drawbacks (e.g., smaller yard, older HVAC, busy street).

* Strategy recommendations for addressing these in the listing or during showings (e.g., emphasize low-maintenance yard, highlight recent service on HVAC, focus on interior quietness).

  • Identified Target Buyer Profile:

* Based on property features, price point, and neighborhood analysis, define the ideal buyer (e.g., "Young professional couple seeking urban convenience," "Growing family needing space and top schools," "Empty nesters desiring single-level living and community amenities"). This informs the tone and focus of the listing copy.


5. Strategic Recommendations

Actionable advice derived from the comprehensive analysis.

  • Suggested Listing Price Strategy:

* Recommendation: List at \$765,000 (within the estimated range but leaning towards the higher end due to low inventory and recent upgrades).

* Rationale: Positions the property competitively while allowing for potential multiple offers given market conditions.

  • Marketing Angle & Narrative Recommendations:

* Primary Angle: "Modern Urban Oasis with Unrivaled Convenience" (if near city amenities, renovated).

* Secondary Angle: "Family Dream Home in Top-Rated School District" (if spacious, family-friendly).

* Keywords: Suggest specific keywords for online listings to maximize search visibility (e.g., "smart home," "gourmet kitchen," "walk to metro," "private pool").

  • Pre-Listing Preparation Advice:

* Staging: Professional staging recommended for living areas and master bedroom to maximize appeal and highlight spaciousness.

* Photography: Emphasize twilight shots for exterior to showcase curb appeal, and detailed shots of renovated kitchen/bathrooms. Drone photography recommended for lot size and neighborhood context.

* Minor Repairs: Address minor scuffs, touch-up paint, and ensure all light fixtures are functional.

* Professional Cleaning: Deep cleaning recommended before photos and showings.


Next Steps

The detailed insights from this analyze_property step will now directly feed into the subsequent stages of the "Real Estate Listing Generator" workflow.

  • Step 2: Generate Draft Listing Description: Utilizing the USPs, target buyer profile, and marketing angles, a compelling and detailed property description will be drafted.
  • Step 3: Refine & Customize Listing: The draft will be refined with specific feature highlights, neighborhood analysis snippets, and optimized marketing copy, ready for agent review and finalization.
gemini Output

Here is the comprehensive, detailed, and professional real estate listing content, ready for publishing, generated based on your request. This output demonstrates the capabilities of the "Real Estate Listing Generator" by providing a complete, engaging example.


Exquisite Modern Sanctuary in [Fictional Neighborhood Name]: Your Dream Home Awaits

Property Overview: A Masterpiece of Design and Comfort

Step into unparalleled luxury and sophisticated living with this stunning, newly renovated residence nestled in the heart of the highly coveted [Fictional Neighborhood Name]. This architectural gem seamlessly blends contemporary design with timeless elegance, offering an expansive 4-bedroom, 3.5-bathroom layout spread across [Fictional Sq Footage, e.g., 3,200] sq ft of meticulously crafted interior space. Every detail has been thoughtfully considered to create an environment of comfort, style, and effortless entertaining. From the moment you arrive, the striking curb appeal, lush landscaping, and grand entrance hint at the exceptional living experience within.

Key Features & Amenities: Unrivaled Luxury at Every Turn

  • Spacious Layout: 4 generously sized bedrooms, including a lavish master suite, and 3.5 designer bathrooms.
  • Gourmet Chef's Kitchen: State-of-the-art appliances (Sub-Zero, Wolf, Miele), custom cabinetry, an oversized island with waterfall quartz countertops, and a walk-in pantry.
  • Open-Concept Living: Soaring ceilings, expansive windows bathing the interiors in natural light, and an seamless flow between living, dining, and kitchen areas.
  • Luxurious Master Suite: A private retreat featuring a spa-like ensuite bathroom with a freestanding soaking tub, dual vanity, rainfall shower, and a spacious walk-in closet with custom organizers.
  • Smart Home Technology: Integrated smart lighting, climate control (Nest/Ecobee), security system, and pre-wired for sound throughout.
  • Outdoor Oasis: Professionally landscaped backyard with a custom-built patio, outdoor kitchen area, fire pit, and ample space for relaxation and al fresco dining.
  • Premium Finishes: Wide-plank hardwood flooring, bespoke millwork, designer light fixtures, and high-end materials used throughout.
  • Dedicated Office/Flex Space: Perfect for remote work, a library, or a creative studio.
  • Two-Car Garage: Attached, oversized garage with additional storage space.
  • Energy Efficient: New HVAC system, energy-efficient windows, and updated insulation for optimal comfort and lower utility costs.

Exceptional Interior Details: Craftsmanship Beyond Compare

Discover a symphony of high-end finishes and thoughtful design elements. The grand foyer welcomes you with gleaming hardwood floors that extend throughout the main living areas. The living room, anchored by a sleek, modern fireplace, offers panoramic views of the landscaped garden. Adjacent, the formal dining room is perfect for hosting intimate dinners or grand celebrations. Each bathroom is a sanctuary, adorned with designer tiles, custom vanities, and premium fixtures. The lower level features a versatile media room or guest suite, offering privacy and additional living space.

Outdoor Oasis & Exterior Highlights: Your Private Retreat

Beyond the exquisite interiors, the property boasts a meticulously manicured exterior designed for both beauty and function. The front yard offers stunning curb appeal with mature plantings and a welcoming pathway. The fully fenced backyard is a private haven, featuring a spacious composite deck ideal for entertaining, a built-in BBQ station, and a tranquil water feature. Imagine summer evenings spent by the fire pit, enjoying the serene ambiance. The exterior also benefits from durable, low-maintenance siding and a new roof, ensuring peace of mind for years to come.

Neighborhood Spotlight: The Allure of [Fictional Neighborhood Name]

Location & Connectivity

[Fictional Neighborhood Name] is renowned for its tree-lined streets, friendly atmosphere, and unparalleled convenience. Situated just minutes from major highways and public transport hubs, commuting to downtown [Fictional City] or surrounding business districts is a breeze. Enjoy quick access to [Specific Local Landmark/Area, e.g., the Riverwalk, City Park] and a short drive to [Nearby Town/Attraction].

Local Amenities & Lifestyle

Experience the vibrant lifestyle [Fictional Neighborhood Name] offers. Indulge in culinary delights at highly-rated restaurants like [Fictional Restaurant 1] and [Fictional Restaurant 2], or grab your morning coffee at [Fictional Cafe]. Explore boutique shops, art galleries, and lively entertainment venues. For outdoor enthusiasts, [Fictional Park/Nature Reserve] provides miles of walking trails, picnic areas, and recreational facilities. Top-rated schools, including [Fictional School Name 1] and [Fictional School Name 2], are within easy reach, making it an ideal location for families.

Community & Culture

[Fictional Neighborhood Name] boasts a strong sense of community, with regular farmers' markets, seasonal festivals, and neighborhood events fostering a close-knit environment. It's a place where neighbors become friends and community spirit thrives.

Market Insights & Value

Properties in [Fictional Neighborhood Name] consistently command strong market value due to the area's desirability, excellent infrastructure, and high quality of life. This home represents an exceptional opportunity to invest in a neighborhood with appreciating property values and a robust real estate market, offering a superior living experience compared to similar offerings in [Adjacent Neighborhood] or [Another Nearby Neighborhood] given its modern upgrades and prime location.

Investment Potential: A Wise Choice for Discerning Buyers

Beyond being a magnificent place to live, this property represents a sound investment. The steady growth of [Fictional City]'s economy, combined with the enduring appeal of [Fictional Neighborhood Name], ensures long-term value appreciation. With its turn-key condition and desirable features, this home is poised to attract significant interest and offers a fantastic opportunity for sustained equity growth.

Pricing & Value Proposition

Offered at: [Fictional Price, e.g., $1,850,000]

This home is competitively priced within the luxury market segment of [Fictional Neighborhood Name], offering exceptional value for its size, features, and prime location. Compared to recent sales of similar caliber properties in the area, this residence stands out with its comprehensive modern upgrades, superior finishes, and ready-to-move-in condition, eliminating the need for costly renovations.

Call to Action: Seize Your Opportunity

Don't miss the chance to own this extraordinary residence. This is more than a home; it's a lifestyle. Schedule your private showing today and experience the unparalleled luxury and convenience that awaits you in [Fictional Neighborhood Name].

Contact [Your Name/Agency Name] for a private tour:

Phone: [Your Phone Number]

Email: [Your Email Address]

Website: [Your Website URL]


Marketing Slogans & Hashtags

Slogans:

  • "Experience Elevated Living in [Fictional Neighborhood Name]."
  • "Modern Luxury Meets Neighborhood Charm."
  • "Your Sanctuary Awaits: Sophistication, Comfort, Community."
  • "Designed for Life, Built for Legacy."

Hashtags:

#LuxuryRealEstate #[FictionalNeighborhoodName]Homes #DreamHome #[FictionalCity]RealEstate #ModernLiving #NewListing #HomeSweetHome #LuxuryLifestyle #RealEstateInvestment #ExclusiveProperty

gemini Output

This comprehensive marketing strategy is designed to maximize exposure, attract qualified buyers, and achieve the optimal sale price for your real estate listing. It outlines a multi-faceted approach, tailored to reach the most relevant audiences through effective channels and compelling messaging, with clear metrics for success.


Real Estate Listing Marketing Package

1. Target Audience Analysis

Understanding who is most likely to purchase this property is paramount. We will segment potential buyers based on demographics, psychographics, and specific needs.

  • Primary Target Segment: Affluent Move-Up Buyers / Luxury Seekers

* Demographics:

* Age: 35-55 years old.

* Income: High-net-worth individuals, dual-income professional households (e.g., executives, doctors, lawyers, successful entrepreneurs).

* Family Status: Growing families seeking more space, established families desiring premium amenities, or empty-nesters looking for a refined lifestyle.

* Occupation: Senior management, specialized professionals, business owners.

* Psychographics:

* Lifestyle: Value quality, comfort, convenience, privacy, and prestige. Seek properties that reflect their success and provide an elevated living experience.

* Aspirations: Desire for a "forever home," a sanctuary, an impressive space for entertaining, or a property in a highly desirable school district/community.

* Pain Points: Current home lacks space, modern amenities, or desired neighborhood features. Looking for a seamless transition with high-end finishes and move-in readiness.

  • Secondary Target Segment: Savvy Investors / Second Home Buyers

* Demographics:

* Age: 40-65 years old.

* Income: High disposable income, established wealth.

* Family Status: Often empty-nesters or individuals seeking investment diversification.

* Psychographics:

* Lifestyle: Looking for properties with strong appreciation potential, rental income opportunities, or a luxurious retreat for vacations.

* Aspirations: Wealth preservation, portfolio growth, or a convenient and comfortable second residence.

* Pain Points: Identifying properties with strong market fundamentals and hassle-free management potential.


2. Channel Recommendations

A diversified channel strategy will ensure broad reach while also targeting specific high-value segments.

  • Digital Marketing (Core Focus)

* Premium Real Estate Portals:

* Strategy: List on top-tier national portals (e.g., Zillow Premier Agent, Realtor.com Showcase, Redfin Partner Agent) and relevant international platforms if the property has global appeal. Utilize enhanced listings with professional photos, videos, and 3D tours.

* Action: Ensure maximum visibility, featured placement, and detailed property pages.

* Social Media Marketing (Paid & Organic):

* Platforms: Instagram (visual appeal), Facebook (demographic targeting, community groups), LinkedIn (affluent professionals), Pinterest (interior design inspiration), YouTube (video tours).

* Strategy: High-quality visual content (photos, reels, stories, virtual tours). Targeted ad campaigns based on demographics, interests (luxury goods, travel, home decor), income levels, and geographic areas. Retargeting ads for users who have engaged with the listing.

* Action: Create engaging short-form video content showcasing key features and lifestyle. Run hyper-targeted ad campaigns.

* Email Marketing:

* Strategy: Leverage the agent's and brokerage's existing CRM database of pre-qualified buyers. Create dedicated email campaigns with stunning visuals and compelling descriptions.

* Action: Send personalized emails to potential buyers who have expressed interest in similar properties.

* Dedicated Property Website/Landing Page:

* Strategy: A standalone, SEO-optimized website for the property featuring all media (photos, videos, floor plans, 3D tours), detailed descriptions, neighborhood information, and contact forms.

* Action: Drive traffic from all other channels to this central hub for an immersive experience.

* Paid Search (Google Ads):

* Strategy: Targeted keyword bidding for "luxury homes [city/neighborhood]," "[specific address] for sale," "high-end real estate [city]."

* Action: Drive immediate traffic from users actively searching for properties like yours.

  • Traditional & Network Marketing

* Professional Photography & Videography:

* Strategy: High-resolution professional photos, aerial drone footage, cinematic video walkthroughs, 3D Matterport tours, and interactive floor plans.

* Action: Essential for all digital and print channels to convey the property's true value and appeal.

* Open Houses & Private Showings:

* Strategy: Host exclusive "broker only" previews to generate buzz within the agent community. Schedule carefully curated open houses for qualified buyers, and prioritize private showings.

* Action: Create an inviting and luxurious atmosphere for viewings, highlighting key features in person.

* Brokerage Network & MLS:

* Strategy: Ensure the listing is prominently featured on the Multiple Listing Service (MLS) and shared extensively within the brokerage's internal network and with co-op agents.

* Action: Leverage agent-to-agent referrals and established professional relationships.

* Luxury Print Media (Selective):

* Strategy: For ultra-luxury properties, consider advertising in high-end local or national real estate magazines, lifestyle publications, or targeted direct mail campaigns to affluent neighborhoods.

* Action: Place ads with stunning imagery and concise, impactful descriptions.


3. Messaging Framework

Our messaging will focus on evoking emotion, highlighting unique selling propositions, and clearly articulating the value proposition.

  • Core Value Proposition:

* "Experience unparalleled luxury and sophisticated living in a prime [Neighborhood/City] location. This exquisite residence offers [2-3 key unique features, e.g., breathtaking views, bespoke design, state-of-the-art amenities] for the discerning homeowner."

  • Key Messaging Pillars:

1. Lifestyle & Experience:

* Focus: Emphasize the quality of life the property offers.

* Keywords: "Exclusive living," "private oasis," "entertainer's dream," "serene retreat," "effortless luxury," "unrivaled comfort."

* Example: "Imagine waking to panoramic city views, enjoying morning coffee on your private terrace, and entertaining guests in a gourmet kitchen designed for culinary excellence."

2. Design & Craftsmanship:

* Focus: Highlight architectural details, high-end finishes, and smart home technology.

* Keywords: "Bespoke finishes," "architectural masterpiece," "smart home integration," "premium materials," "meticulously curated," "designer fixtures."

* Example: "Every detail has been thoughtfully considered, from the custom millwork and imported stone finishes to the integrated smart home system, ensuring both beauty and functionality."

3. Location & Community:

* Focus: Underscore the benefits of the neighborhood, access to amenities, and desirability.

* Keywords: "Prime location," "vibrant community," "top-rated schools," "walk to amenities," "exclusive enclave," "urban convenience."

* Example: "Nestled in the heart of [Neighborhood], you'll enjoy immediate access to [specific highlights like boutique shops, fine dining, parks] while benefiting from a tranquil residential setting."

4. Investment & Value:

* Focus: Position the property as a sound financial decision and a legacy asset.

* Keywords: "Exceptional investment," "appreciation potential," "turnkey luxury," "timeless elegance," "rare opportunity."

* Example: "More than just a home, this property represents a significant investment opportunity in one of the city's most sought-after markets, offering enduring value and prestige."

  • Call to Action (CTA):

* "Schedule Your Private Showing Today."

* "Explore the Virtual Tour."

* "Contact [Agent Name] for an Exclusive Viewing."

* "Download Full Property Details."

  • Tone: Professional, sophisticated, aspirational, exclusive, inviting.

4. Key Performance Indicators (KPIs)

Measuring the effectiveness of our marketing efforts is crucial for optimization and demonstrating value.

  • Reach & Awareness:

* Total Listing Views: Cumulative views across all online portals and the dedicated property website.

* Social Media Impressions: How many times the property's content was displayed.

* Email Open Rate: Percentage of recipients who opened listing emails.

  • Engagement:

* Website/Listing Page Dwell Time: Average time users spend on the property's page.

* Virtual Tour/Video Views: Number of plays and completion rates.

* Click-Through Rate (CTR): Clicks on "More Info," "Contact Agent," "View Gallery" buttons.

* Social Media Engagement Rate: Likes, comments, shares, saves on posts.

  • Lead Generation:

* Number of Inquiries: Direct calls, emails, form submissions from interested parties.

* Number of Showings Scheduled: Both private and open house attendees.

* Lead-to-Showing Conversion Rate: Percentage of inquiries that result in a scheduled showing.

  • Sales Performance:

* Number of Offers Received: Quantity and quality of purchase offers.

* Offer-to-Sale Conversion Rate: Percentage of offers that lead to a successful closing.

* Time on Market (TOM): Number of days from listing to accepted offer.

* Sale Price vs. List Price: Percentage difference, indicating pricing accuracy and market demand.

* Marketing Spend ROI: Cost per lead, cost per showing, and overall marketing expenditure efficiency relative to sale price.


This detailed marketing strategy provides a robust framework to effectively position and sell your real estate listing, ensuring maximum visibility and appeal to the right buyers. Regular monitoring of KPIs will allow for agile adjustments to optimize performance throughout the selling process.

real_estate_listing_generator.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
"); 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' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); 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' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

) } export default App "); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e} .app{min-height:100vh;display:flex;flex-direction:column} .app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px} h1{font-size:2.5rem;font-weight:700} "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` ## Open in IDE Open the project folder in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- 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",'{ "name": "'+pn+'", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.5.13", "vue-router": "^4.4.5", "pinia": "^2.3.0", "axios": "^1.7.9" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.1", "typescript": "~5.7.3", "vite": "^6.0.5", "vue-tsc": "^2.2.0" } } '); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname,'src') } } }) "); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]} '); zip.file(folder+"tsconfig.app.json",'{ "compilerOptions":{ "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"], "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true, "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue", "strict":true,"paths":{"@/*":["./src/*"]} }, "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"] } '); zip.file(folder+"env.d.ts","/// "); zip.file(folder+"index.html"," "+slugTitle(pn)+"
"); 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' import { createPinia } from 'pinia' import App from './App.vue' import './assets/main.css' const app = createApp(App) app.use(createPinia()) app.mount('#app') "); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue"," "); 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} "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` Open in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- 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",'{ "name": "'+pn+'", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test" }, "dependencies": { "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0", "typescript": "~5.6.0" } } '); zip.file(folder+"angular.json",'{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "'+pn+'": { "projectType": "application", "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/'+pn+'", "index": "src/index.html", "browser": "src/main.ts", "tsConfig": "tsconfig.app.json", "styles": ["src/styles.css"], "scripts": [] } }, "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"} } } } } '); zip.file(folder+"tsconfig.json",'{ "compileOnSave": false, "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"]}, "references":[{"path":"./tsconfig.app.json"}] } '); zip.file(folder+"tsconfig.app.json",'{ "extends":"./tsconfig.json", "compilerOptions":{"outDir":"./dist/out-tsc","types":[]}, "files":["src/main.ts"], "include":["src/**/*.d.ts"] } '); zip.file(folder+"src/index.html"," "+slugTitle(pn)+" "); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig) .catch(err => console.error(err)); "); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; } "); 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'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = '"+pn+"'; } "); zip.file(folder+"src/app/app.component.html","

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); 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} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/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(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/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)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- 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:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== 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(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } 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);}});}