Product Roadmap Builder
Run ID: 69cc7bbe3e7fb09ff16a254e2026-04-01Business
PantheraHive BOS
BOS Dashboard

Build a strategic product roadmap with feature prioritization, milestone planning, resource allocation, risk assessment, and stakeholder communication plan.

Product Roadmap Builder: Research & Design Requirements

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Product Roadmap Builder" tool. The aim is to create an intuitive, powerful, and collaborative platform that empowers product teams to build, manage, and communicate strategic roadmaps effectively.


1. Design Specifications

1.1 Functional Requirements

The Product Roadmap Builder will provide the following core functionalities:

  • Roadmap Creation & Management:

* New Roadmap Wizard: Guided creation process including defining product vision, strategic goals, and initial time horizons (e.g., quarterly, monthly, now/next/later).

* Feature/Initiative Management:

* Ability to add, edit, delete, and categorize features/initiatives with detailed descriptions, owners, and status.

* Support for custom fields (e.g., business value, technical effort, confidence, dependencies).

* Link features to strategic goals.

* Prioritization Engine:

* Multiple prioritization frameworks: RICE (Reach, Impact, Confidence, Effort), MoSCoW (Must-have, Should-have, Could-have, Won't-have), Weighted Scoring (customizable criteria).

* Drag-and-drop reordering within a timeline or priority list.

* Visual representation of prioritization scores.

* Timeline Visualization:

* Multiple views: Quarterly, Monthly, Now/Next/Later, Kanban/Card view.

* Interactive timeline with drag-and-drop functionality for adjusting feature placement.

* Milestone tracking: Define, assign owners, set target dates, track progress.

* Dependency Mapping: Visualize and manage inter-feature and inter-team dependencies.

* Version Control: Track changes to the roadmap, view history, and revert to previous versions.

  • Resource Allocation:

* Team & Individual Assignment: Assign features/milestones to specific teams or individuals.

* Capacity Planning: Basic visualization of team/resource capacity versus assigned workload (e.g., hours, story points).

* Resource Pool Management: Define available resources and their skill sets.

  • Risk Assessment & Management:

* Risk Identification: Ability to add risks associated with features, milestones, or the overall roadmap.

* Risk Categorization: Assign risk types (e.g., technical, market, operational), severity, and likelihood.

* Mitigation Planning: Document mitigation strategies and assign owners.

* Risk Status Tracking: Update risk status (e.g., open, in progress, mitigated, closed).

  • Collaboration & Communication:

* Stakeholder Management:

* Define stakeholders, their roles, and communication preferences.

* Categorize stakeholders (e.g., executive, engineering, sales, marketing, customer).

* Communication Plan Builder:

* Templates for different stakeholder groups (e.g., executive summary, detailed technical roadmap, customer-facing overview).

* Ability to customize message content, frequency, and channels (e.g., email, presentation, in-app notification).

* Automated reporting based on defined plans.

* Commenting & Feedback: In-app commenting on features, milestones, and the overall roadmap.

* Sharing & Export:

* Shareable links with customizable access permissions (view-only, comment, edit).

* Export options: PDF, PNG, CSV, PowerPoint/Keynote compatible formats.

* Embeddable roadmap widgets for external websites/portals.

* Activity Feed: Real-time updates on roadmap changes and team activities.

  • Customization & Integrations:

* Customizable Templates: Ability to create and save custom roadmap templates.

* Reporting & Analytics: Dashboard view of roadmap health, progress, and key metrics.

* Integrations:

* Project Management Tools (e.g., Jira, Asana, Trello) for syncing tasks/issues.

* Communication Platforms (e.g., Slack, Microsoft Teams) for notifications.

* Single Sign-On (SSO) support.

1.2 Non-Functional Requirements

  • Performance: Fast loading times, highly responsive UI, efficient data processing for large roadmaps.
  • Scalability: Architected to support a growing number of users, roadmaps, and features without degradation in performance.
  • Security: Robust authentication (MFA, SSO), authorization (role-based access control), data encryption (at rest and in transit), and regular security audits.
  • Usability: Intuitive interface, minimal learning curve, consistent navigation, and clear visual hierarchy.
  • Accessibility: Adherence to WCAG 2.1 AA standards for users with disabilities.
  • Reliability: High availability (99.9% uptime target), robust error handling, and comprehensive data backup/recovery mechanisms.
  • Maintainability: Clean, modular code architecture, comprehensive documentation, and ease of deployment for updates.

2. Wireframe Descriptions

The following descriptions outline the key screens and components of the Product Roadmap Builder, focusing on layout and interaction.

2.1 Dashboard / Home Screen

  • Layout:

* Left Sidebar: Global navigation (Dashboard, My Roadmaps, Templates, Settings).

* Main Content Area (Top): "Create New Roadmap" button, quick filters (e.g., 'My Roadmaps', 'Shared with me').

* Main Content Area (Middle): Card-based display of existing roadmaps. Each card shows: Roadmap Name, Last Updated, Owner, Status (e.g., Draft, Active, Archived), and quick actions (View, Share, Duplicate, Archive).

* Main Content Area (Bottom): "Roadmap Insights" widget showing aggregated metrics (e.g., total features, overdue milestones across all active roadmaps).

  • Interaction: Clicking a roadmap card navigates to the Roadmap Editor. "Create New Roadmap" initiates a guided wizard.

2.2 Roadmap Editor (Main View)

  • Layout:

* Top Bar: Roadmap Title (editable), Share button, Export button, View Options (Timeline, Kanban, List), Filters (Owner, Status, Category), Settings icon.

* Left Panel (Contextual Navigation): Sections for the current roadmap: Features, Milestones, Resources, Risks, Stakeholders, Communication Plans.

* Central Canvas (Primary View Area): This area changes based on the selected 'View Option' in the Top Bar.

* Timeline View (Default): Horizontal timeline (e.g., Q1, Q2, Q3, Q4). Features are represented as draggable cards/bars within their respective time buckets. Milestones are marked as distinct icons on the timeline. Dependencies are shown with connecting lines.

* Kanban View: Columns representing stages (e.g., Idea, Prioritized, In Progress, Done) or Now/Next/Later. Features are draggable cards between columns.

* List View: Table format with columns for Feature Name, Status, Owner, Priority, Due Date, etc., with sortable and filterable headers.

* Right Panel (Contextual Details / Inspector): Appears when a feature, milestone, or risk is selected. Displays detailed information and allows for editing (e.g., Feature Description, Prioritization scores, Assigned Resources, Risks, Comments).

  • Interaction:

* Drag-and-drop features to adjust their position on the timeline or move between Kanban columns.

* Clicking a feature opens its details in the Right Panel.

* Clicking "Add Feature" from the Left Panel or a "+" icon on the canvas opens a modal for quick feature creation.

* Filters and View Options update the Central Canvas in real-time.

2.3 Feature Detail Panel / Modal

  • Layout:

* Header: Feature Name, Status dropdown, Owner dropdown.

* Main Content:

* General Information: Rich text editor for Description, Category dropdown, Strategic Goal linkage.

* Prioritization: Input fields/sliders for RICE (Reach, Impact, Confidence, Effort) or MoSCoW selection. Displays calculated priority score.

* Timeline & Milestones: Start/End Dates, associated Milestones (clickable).

* Resources: Assigned Teams/Individuals, estimated effort/capacity.

* Dependencies: List of dependent features (incoming/outgoing), with link to view dependency graph.

* Risks: List of associated risks (clickable to view risk details).

* Attachments: Upload files, link external documents.

* Comments & Activity: Threaded comments section, activity log for the feature.

* Footer: Save/Cancel buttons.

  • Interaction: All fields are editable. Changes are saved upon confirmation.

2.4 Stakeholder & Communication Plan Editor

  • Layout:

* Left Sub-Panel: List of Stakeholder Groups (e.g., "Executives", "Engineering Leads", "Customers").

* Right Main Panel:

* Selected Group Details: Group Name, Description, Members (with roles).

* Communication Plans for Group: List of associated communication plans.

* Plan Details (when selected):

* Plan Name, Description.

* Audience (pre-filled from group).

* Content Template Selector (e.g., "Executive Summary", "Technical Deep Dive").

* Customizable Message Editor (rich text, dynamic tags for roadmap data).

* Frequency (e.g., Weekly, Bi-weekly, On-demand).

* Channels (e.g., Email, In-app Notification, Export to PPT).

* Preview/Send buttons.

  • Interaction: Users can create new groups, add/remove members, define multiple communication plans per group, and preview generated communications.

3. Color Palettes

A professional, modern, and accessible color palette will be used to ensure clarity and user comfort.

3.1 Primary Palette

  • Primary Brand Color (Blue/Teal): #007BFF (or a similar vibrant yet professional blue/teal for action items, primary buttons, branding).

* Darker variant: #0056b3 (for hover states)

* Lighter variant: #E6F2FF (for subtle highlights, backgrounds)

  • Secondary Accent Color (Green/Orange): #28a745 (for success states, positive indicators) or #fd7e14 (for warning, attention).

Rationale:* Provides visual contrast for call-to-actions, status indicators, and differentiation of elements without being overwhelming.

3.2 Neutral Palette

  • Backgrounds:

* Light Gray: #F8F9FA (for main content areas, panels)

* White: #FFFFFF (for cards, modals, primary interactive elements)

  • Text:

* Dark Gray (Primary Text): #343A40 (for body text, headings)

* Medium Gray (Secondary Text/Labels): #6C757D (for helper text, timestamps, less prominent info)

* Light Gray (Disabled/Placeholder): #CED4DA

  • Borders/Dividers: #DEE2E6 (subtle separators)
  • Rationale: A clean, neutral base ensures readability and allows the primary and accent colors to stand out effectively, reducing visual clutter.

3.3 Semantic Colors

  • Success: #28a745 (Green)
  • Warning: #ffc107 (Yellow/Orange)
  • Danger/Error: #dc3545 (Red)
  • Info: #17a2b8 (Light Blue)
  • Rationale: Consistent use of semantic colors for status indicators, alerts, and feedback messages.

3.4 Data Visualization Colors

  • A set of 5-7 distinct, accessible colors will be defined for charts and graphs (e.g., for different feature categories, teams, or priority levels). These will be chosen to be colorblind-friendly and have sufficient contrast.

* Example: Blue, Teal, Purple, Orange, Green, Red, Yellow (with appropriate shades).


4. UX Recommendations

4.1 Intuitive Navigation & Information Architecture

  • Clear Hierarchy: Global navigation (Dashboard, My Roadmaps) on the left, contextual navigation (Features, Milestones) within a specific roadmap.
  • Consistent Patterns: Use familiar UI patterns for buttons, forms, and data tables.
  • Breadcrumbs: For deeper navigation paths within a roadmap, helping users understand their location.
  • Search & Filter: Prominent and powerful search and filtering options across all views to quickly find specific features, risks, or roadmaps.

4.2 Visual Clarity & Readability

  • Whitespace: Generous use of whitespace to reduce cognitive load and improve readability, especially in complex views like the timeline.
  • Typography: Use a clean, modern sans-serif font (e.g., Inter, Open Sans, Roboto) with a clear hierarchy of font sizes and weights for headings, body text, and labels.
  • Iconography: Use a consistent set of clear, universally understood icons to represent actions and categories.
  • Color Contrast: Ensure all text and interactive elements meet WCAG AA contrast guidelines.
  • Progressive Disclosure: Show only essential information by default, allowing users to expand or click for more details (e.g., feature cards showing title and status, clicking reveals full details).

4.3

gemini Output

Product Roadmap Builder: Detailed Design Specifications

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Product Roadmap Builder" tool. The goal is to create an intuitive, powerful, and visually appealing application that empowers product teams to strategically plan and communicate their roadmaps effectively.


1. Detailed Design Specifications

1.1. Core Application Structure

  • Global Header: Persistent at the top, containing:

* Product Logo/Name (left)

* Global Search Bar (center)

* Notifications Icon (badge for unread alerts)

* User Profile Avatar (dropdown for settings, logout)

  • Primary Sidebar Navigation: Persistent on the left
gemini Output

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Product Roadmap Builder" application. The goal is to create an intuitive, powerful, and visually appealing tool that empowers product teams to strategically plan, prioritize, and communicate their product vision effectively.


Product Roadmap Builder: Final Design Assets & UX Strategy

1. Introduction & Design Philosophy

This deliverable provides the comprehensive design framework for the Product Roadmap Builder. Our design philosophy centers around clarity, actionability, and collaboration. The interface will be clean, professional, and optimized for data visualization, ensuring users can quickly grasp complex information and take decisive action.

Core Design Principles:

  • Clarity & Simplicity: Minimize cognitive load with intuitive layouts and straightforward interactions.
  • Actionability: Enable users to easily manage features, milestones, and resources directly within the interface.
  • Data-Driven Insights: Present data effectively through charts, graphs, and structured tables to support decision-making.
  • Consistency: Maintain a unified visual language and interaction patterns across all modules.
  • Scalability: Design to accommodate growing product portfolios, teams, and data complexity.
  • Collaboration-Friendly: Facilitate team communication and stakeholder alignment.

2. Core Interface Components & Wireframe Descriptions

The application will be structured around key modules, each designed for specific roadmap management functions.

2.1. Global Navigation & Layout

  • Left Sidebar Navigation: Persistent, collapsible sidebar for primary navigation (Dashboard, Features, Roadmap, Resources, Risks, Reports, Settings). Icons with text labels.
  • Top Header Bar: Contains global search, notifications, user profile/account settings, and potentially a "Quick Add" button for new features/tasks.
  • Main Content Area: Dynamic area displaying the selected module's content.

2.2. Dashboard / Overview

  • Description: A personalized landing page providing a high-level summary of the product roadmap's health and key upcoming items.
  • Wireframe Description:

* Layout: Grid-based with customizable widgets/cards.

* Key Widgets:

* "Upcoming Milestones" Card: Chronological list of next 3-5 milestones with due dates and progress bars.

* "Top Priorities" Card: List of the top 3-5 prioritized features, with their status and owners.

* "Resource Overview" Card: Quick glance at resource allocation (e.g., percentage capacity utilized, overloaded teams).

* "Key Risks" Card: Summary of high-impact risks with their current status.

* "Recent Activity" Feed: Log of recent changes, comments, and updates across the roadmap.

* Interactions: Widgets are clickable to navigate to detailed views. Drag-and-drop to reorder/customize widgets.

2.3. Feature Prioritization View

  • Description: A dedicated space for managing and prioritizing individual product features.
  • Wireframe Description:

* Primary View (Table/List):

* Columns: Feature Name, Status, Owner, Value Score, Effort Score, Risk Score, Overall Priority Score, Due Date, Tags.

* Interactions:

* Drag-and-drop rows to manually reorder priority.

* Clickable column headers for sorting.

* Inline editing for quick updates.

* Checkbox for bulk actions (e.g., change status, assign).

* Filters for status, owner, tags, etc.

* Secondary View (Prioritization Matrix - e.g., Value vs. Effort):

* Layout: A 2x2 or 3x3 quadrant chart.

* Elements: Features represented as draggable circles or cards within the quadrants (e.g., "High Value, Low Effort" quadrant).

* Interactions: Drag features between quadrants to visually adjust their priority. Hover to see feature details.

* Feature Detail Panel (Sidebar/Modal): Opens upon clicking a feature, displaying comprehensive information (see section 2.8).

2.4. Milestone Planning / Timeline View (Gantt-like)

  • Description: Visual representation of the product roadmap over time, showing milestones, epics, and their dependencies.
  • Wireframe Description:

* Layout: Horizontally scrollable timeline (Gantt-like chart).

* Elements:

* Swimlanes: Representing different products, teams, or strategic themes.

* Timeline Bars: Each bar represents a milestone or epic, showing start and end dates. Color-coded by status or owner.

* Dependencies: Connectors (lines/arrows) between bars to show predecessor/successor relationships.

* Key Dates: Vertical lines for important events or release dates.

* Interactions:

* Drag-and-drop timeline bars to adjust dates.

* Resize bars to modify duration.

* Click on a bar to open the detail panel.

* Zoom levels: Day, Week, Month, Quarter, Year.

* Filtering by team, product, status.

2.5. Resource Allocation View

  • Description: Visualize team capacity and feature assignments to identify bottlenecks and optimize resource distribution.
  • Wireframe Description:

* Layout:

* Team Capacity Heatmap/Chart: A visual representation (e.g., stacked bar chart or heatmap) showing available capacity vs. allocated effort for each team/individual over time.

* Resource List: A table listing team members/roles.

* Assigned Features Panel: When a resource is selected, shows a list of features/tasks assigned to them, with estimated effort.

* Interactions:

* Filter by team, skill, availability.

* Drag-and-drop features from an unassigned pool to resources.

* Hover over capacity indicators to see detailed numbers.

2.6. Risk Assessment Module

  • Description: A centralized register for identifying, tracking, and mitigating risks associated with the product roadmap.
  • Wireframe Description:

* Risk Register Table:

* Columns: Risk ID, Description, Likelihood (Low, Medium, High), Impact (Low, Medium, High), Risk Score, Mitigation Plan, Owner, Status (Open, Mitigated, Closed), Date Identified.

* Interactions: Inline editing, sorting, filtering.

* Risk Matrix Visualization: A 2x2 or 3x3 grid (Likelihood vs. Impact) with risks plotted as points, color-coded by severity.

* Risk Detail Panel: Opens on click, similar to Feature Detail Panel.

2.7. Stakeholder Communication / Reporting

  • Description: Tools for generating and sharing professional reports and custom views for various stakeholders.
  • Wireframe Description:

* Report Templates: List of pre-defined reports (e.g., Executive Summary, Team Progress, Feature Status Update).

* Custom Report Builder: Drag-and-drop interface for selecting data points, charts, and tables.

* Export Options: Prominent buttons for exporting to PDF, CSV, PNG, or generating shareable web links (with view-only permissions).

* Presentation Mode: A clean, full-screen view for presenting the roadmap.

2.8. Feature / Milestone / Risk Detail Panel (Modal/Sidebar)

  • Description: A dedicated panel for viewing and editing comprehensive details of any selected item.
  • Wireframe Description:

* Layout: Right-aligned sidebar or a central modal, with clear sections.

* Key Fields:

* Summary: Name, Description, Status, Owner, Due Date.

* Prioritization: Value, Effort, Risk scores.

* Dependencies: List of dependent items and items it depends on.

* Acceptance Criteria: Bulleted list.

* Attachments: File upload/management.

* Comments/Activity Log: Chronological thread of discussions and changes.

* History: Version control/audit trail.

* Interactions: All fields are editable inline or via dedicated edit buttons. "Save" and "Cancel" buttons at the bottom.

3. Detailed Design Specifications

3.1. Typography

  • Primary Font: Inter (Sans-serif)

* Rationale: Modern, highly legible, excellent for UI elements and data display across various screen sizes.

  • Font Weights: Regular (400), Medium (500), Semi-bold (600), Bold (700)
  • Font Sizes Hierarchy:

* H1 (Page Titles): 28px / Semi-bold

* H2 (Section Headers): 22px / Medium

* H3 (Card Titles/Sub-sections): 18px / Medium

* Body Text: 15px / Regular

* Labels/Small Text: 13px / Regular

* Line Height: 1.5x for body text, 1.2x for headings for optimal readability.

3.2. Color Palette

A professional, clean, and accessible color palette that enhances data visualization.

  • Primary Brand Color:

* #2F80ED (Vibrant Blue): Used for primary CTAs, active states, key highlights, and branding elements.

  • Secondary Accent Color:

* #F2994A (Warm Orange): Used for secondary actions, warnings, and to draw attention to specific data points.

  • Neutral Palette (Grayscale):

* #FFFFFF (White): Backgrounds, cards.

* #F8F9FA (Light Gray): Secondary backgrounds, subtle dividers.

* #E0E0E0 (Medium Light Gray): Borders, inactive states.

* #BDBDBD (Medium Gray): Placeholder text, subtle icons.

* #828282 (Dark Gray): Secondary text, labels.

* #333333 (Charcoal Gray): Primary text, headings.

  • Semantic Colors (Status & Alerts):

* Success/On-Track: #27AE60 (Green)

* Warning/At-Risk: #F2C94C (Yellow)

* Error/Delayed: #EB5757 (Red)

* Information/Neutral: #2F80ED (Primary Blue)

  • Data Visualization Palette: A set of 5-7 distinct, accessible colors for charts and graphs, ensuring good contrast (e.g., various shades of blue, green, purple, and orange).

3.3. Iconography

  • Style: Clean, modern, outline-based (line icons) with a consistent stroke weight. Filled icons can be used for active states or primary actions.
  • Library: Utilize a well-established icon library (e.g., Feather Icons, Material Design Icons, or a custom set) to ensure consistency and scalability.
  • Examples:

* Dashboard: grid

* Features: list or trello

* Roadmap: calendar or timeline

* Resources: users

* Ris

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