Product Roadmap Builder
Run ID: 69cc045104066a6c4a16898e2026-03-31Business
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 - Design & Requirements Specification

Project Title: Product Roadmap Builder

Version: 1.0

Date: October 26, 2023

Step: 1 of 3 - Research & Design Requirements


1. Introduction & Purpose

This document outlines the detailed design and functional requirements for the "Product Roadmap Builder" tool. The primary objective is to create an intuitive, powerful, and collaborative platform that enables product teams to strategically plan, prioritize, execute, and communicate their product vision and development efforts. The tool will support dynamic roadmap creation, feature prioritization, milestone planning, resource allocation, risk assessment, and stakeholder communication, ensuring alignment across all organizational levels.

Target Users: Product Managers, Product Owners, Project Managers, Engineering Leads, Stakeholders (Executives, Sales, Marketing).


2. Core Functional Requirements

The Product Roadmap Builder must facilitate the following key functionalities:

  • Dynamic Roadmap Creation:

* Ability to create multiple roadmaps (e.g., product line, portfolio, team-specific).

* Configurable roadmap views (e.g., timeline, kanban, list, swimlane by team/theme).

* Support for various roadmap horizons (e.g., Now/Next/Later, Quarterly, Themed).

  • Feature & Initiative Management:

* Creation and management of features, epics, and user stories.

* Detailed information for each item: description, owner, status, priority, dependencies, estimated effort.

* Hierarchical organization (e.g., Themes > Epics > Features).

  • Feature Prioritization Engine:

* Support for multiple prioritization frameworks (e.g., RICE, MoSCoW, Weighted Scoring, Value vs. Effort Matrix).

* Interactive tools to score and rank features.

* Visualization of prioritization outcomes.

  • Milestone Planning & Tracking:

* Define key milestones and target dates.

* Associate features/epics with specific milestones.

* Progress tracking against milestones.

  • Resource Allocation & Management:

* Assign teams, individuals, or departments to features/epics.

* Visualize resource workload and capacity.

* Identify potential resource bottlenecks.

* Integration with existing HR/resource planning tools (future consideration).

  • Risk Assessment & Management:

* Ability to identify, document, and categorize risks associated with features or the overall roadmap.

* Assign risk owners, mitigation strategies, and impact levels.

* Track risk status and resolution.

  • Dependency Management:

* Define and visualize dependencies between features, teams, or projects.

* Alerts for critical path dependencies.

  • Stakeholder Communication & Collaboration:

* Shareable roadmap views (read-only, customizable visibility).

* Commenting and feedback mechanisms on specific roadmap items.

* Export options (PDF, image, CSV).

* Presentation mode for stakeholder reviews.

* Version control and history for roadmaps.

  • Reporting & Analytics:

* Dashboard summaries of roadmap progress, risks, and resource utilization.

* Customizable reports on feature delivery, team performance, etc.

  • Integrations (Future Consideration):

* Jira, Asana, Trello for task management.

* Slack, Microsoft Teams for notifications.

* BI tools for deeper analytics.


3. User Experience (UX) Principles

The design of the Product Roadmap Builder will adhere to the following UX principles:

  • Clarity & Simplicity: Minimize cognitive load, use intuitive language, and present information clearly.
  • Consistency: Maintain consistent UI elements, interactions, and terminology throughout the application.
  • Efficiency: Enable users to complete tasks quickly with minimal clicks and immediate feedback.
  • Flexibility & Customization: Provide options for users to tailor views, dashboards, and reports to their specific needs.
  • Collaboration: Facilitate seamless teamwork through sharing, commenting, and real-time updates.
  • Accessibility: Ensure the tool is usable by individuals with diverse abilities.
  • Feedback & Responsiveness: Provide immediate visual and textual feedback for user actions.

4. Information Architecture (IA)

The high-level structure of the application will be organized as follows:

  • Dashboard: Personalized overview, quick access to key roadmaps, alerts, and summaries.
  • Roadmaps:

* My Roadmaps (list/grid view)

* Create New Roadmap

* Roadmap Editor (main workspace)

* Timeline View

* Kanban View

* List View

* Prioritization Matrix

* Resource View

* Risk Register

* Shared Roadmaps

  • Initiatives/Features Library: Central repository for all product initiatives, epics, and features.
  • Reports & Analytics: Pre-built and custom reports, analytics dashboards.
  • Teams & Resources: Management of users, teams, and their capacities.
  • Settings: User profile, organization settings, integrations, templates.
  • Help & Support: Documentation, FAQs, contact support.

5. Wireframe Descriptions (Key Screens)

5.1. Dashboard / Overview Screen

  • Layout: Grid-based dashboard.
  • Elements:

* "My Roadmaps" Card: List of recently accessed or favorited roadmaps with status indicators.

* "Upcoming Milestones" Widget: Calendar view or list of critical deadlines.

* "Pending Actions/Alerts" Widget: Notifications for new comments, risk updates, resource conflicts.

* "Roadmap Health" Summary: High-level metrics (e.g., % complete, # open risks, resource utilization).

* "Quick Actions" Buttons: "Create New Roadmap," "Add Feature," "View All Roadmaps."

  • Purpose: Provide a personalized, at-a-glance summary of key activities and roadmap status.

5.2. Roadmap Editor (Timeline View)

  • Layout: Primary workspace with a large interactive timeline.
  • Elements:

* Left Sidebar: Navigation for different roadmap views (Timeline, Kanban, List, Prioritization, Resources, Risks). Filters (by team, owner, status, theme).

* Main Content Area (Timeline): Horizontal timeline displaying features/epics as color-coded bars.

* Drag-and-drop functionality for repositioning features.

* Clicking a feature opens a detailed modal.

* Milestones indicated by vertical markers.

* Swimlanes for teams or themes.

* Top Bar: Roadmap title, "Share" button, "Export" button, "Add Feature" button, "Settings" for roadmap.

  • Purpose: Visualize the roadmap over time, manage feature placement, and track progress.

5.3. Feature Prioritization Matrix

  • Layout: Two-axis matrix or a scoring interface.
  • Elements:

* Left Sidebar: List of unprioritized features.

* Main Content Area:

* Value vs. Effort Matrix: Features plotted on a 2x2 grid. Drag-and-drop features within the quadrants.

* Scoring Interface (Tabular): Table with features, columns for RICE/MoSCoW/custom scores, input fields for each criterion, and a calculated total score. Sortable columns.

* Visualization: Bar chart or bubble chart displaying prioritized features.

* Top Bar: Framework selection (RICE, MoSCoW, Custom), "Apply Prioritization" button.

  • Purpose: Systematically prioritize features based on defined criteria.

5.4. Resource Allocation View

  • Layout: Calendar/Gantt-like view or a team capacity dashboard.
  • Elements:

* Left Sidebar: List of teams/individuals.

* Main Content Area:

* Resource Timeline: Horizontal bars representing allocated time for each team/individual on specific features. Overlaps indicate over-allocation.

* Capacity Indicators: Visual cues (e.g., color-coded bars) showing whether a resource is under, at, or over capacity.

* Unassigned Work Pool: List of features not yet assigned to a resource.

* Top Bar: Timeframe selector (week, month, quarter), "Allocate Resources" button.

  • Purpose: Visualize resource workload, identify bottlenecks, and optimize team assignments.

5.5. Feature Detail Modal

  • Layout: Overlay modal appearing when a feature/epic is clicked.
  • Elements:

* Header: Feature title, status (dropdown), priority (dropdown).

* Sections:

* Description: Rich text editor for details.

* Owner/Team: Assignee dropdown.

* Timeline: Start/End dates, duration.

* Dependencies: Link to other features, visual representation.

* Effort Estimate: Story points, hours, t-shirt size.

* Risks: Linked risks, ability to add new risk.

* Comments: Threaded discussion section.

* Attachments: File uploads.

* History: Audit trail of changes.

* Footer: "Save," "Cancel," "Delete" buttons.

  • Purpose: Provide a comprehensive view and editing interface for individual roadmap items.

6. Visual Design Specifications

6.1. Color Palette

  • Primary Brand Color: #007bff (Vibrant Blue - for primary actions, main navigation highlights, active states)
  • Secondary Color: #6c757d (Muted Grey - for secondary actions, borders, inactive states)
  • Accent Color: #28a745 (Success Green - for positive feedback, completion, success indicators)
  • Warning/Risk Color: #ffc107 (Amber Yellow - for warnings, moderate risks)
  • Error Color: #dc3545 (Red - for errors, critical risks, destructive actions)
  • Neutral Palette:

* Background: #f8f9fa (Light Grey - for main application background)

* Card/Panel Background: #ffffff (White - for content areas, modals)

* Borders/Dividers: #e9ecef (Lighter Grey)

  • Text Colors:

* Primary Text: #343a40 (Dark Grey - for main content, headings)

* Secondary Text: #6c757d (Muted Grey - for descriptions, metadata)

* Disabled Text: #adb5bd (Light Grey)

6.2. Typography

  • Primary Font: Inter (Modern, highly readable sans-serif)
  • Fallback Font: sans-serif
  • Headings (H1-H6): Inter, Semi-Bold to Bold

* H1: 32px

* H2: 28px

* H3: 24px

* H4: 20px

* H5: 18px

* H6: 16px

  • Body Text: Inter, Regular

* Default: 16px

* Small: 14px (for metadata, captions)

  • UI Elements (Buttons, Navigation): Inter, Medium/Semi-Bold, 14-16px
  • Line Height: 1.5 for body text, 1.2 for headings.

6.3. Iconography

  • Style: Line-based, minimalist, consistent stroke weight.
  • Library: Font Awesome, Material Icons, or a custom SVG icon set.
  • Examples:

* roadmap icon (map pin + path)

* feature icon (star or puzzle piece)

* priority icon (up arrow/down arrow or flag)

* milestone icon (flag or diamond)

* resources icon (users group)

* risk icon (exclamation triangle)

* share icon (share arrow)

* settings icon (gear)

  • Usage: For navigation, action buttons, status indicators, and to visually represent concepts.

6.4. Imagery & Illustrations

  • Style: Flat, modern, vector-based illustrations.
  • Purpose: Used sparingly for empty states (e.g., "No Roadmaps Yet"), onboarding screens, and engaging sections of the dashboard. Avoid overly complex or realistic imagery.
  • Color Palette: Adhere to the defined brand colors and neutrals for illustrations.

6.5. Component Library

  • Buttons:

* Primary: Blue background, white text.

* Secondary: Grey background, dark grey text.

* Outline: Transparent background, colored border and text.

* Text: No background, colored text.

* States: Hover, active, disabled.

  • Forms:

* Input Fields: Light grey border, subtle focus state (blue glow).

* Dropdowns: Consistent styling with input fields.

* Checkboxes/Radio Buttons: Custom styled, using primary accent color.

* Validation: Clear error messages with red text.

  • Cards/Panels: White background, subtle shadow, rounded corners (4-8px).
  • Tables: Clean, readable, with alternating row colors for improved readability.
  • Modals/Dialogs: Centered, slightly transparent overlay, clear header and action buttons.
  • Notifications (Toasts): Appear temporarily, provide clear feedback (success, error, info).

7. Interaction Design Recommendations

  • Drag-and-Drop: Essential for roadmap scheduling, prioritization matrices, and resource allocation. Provide clear visual cues during drag operations.
  • Inline Editing: Allow users to quickly edit text fields (e.g., feature names, descriptions) directly on the roadmap view without opening a full modal, where appropriate.
  • Contextual Menus: Right-click or hover-activated menus
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 a professional, intuitive, and highly functional tool that empowers users to strategically plan, prioritize, and communicate their product roadmaps effectively.


1. Detailed Design Specifications

1.1. Overall Application Structure & Navigation

  • Main Navigation (Left Sidebar - Collapsible):

* Dashboard/Home: Overview of all roadmaps, quick stats, and notifications.

* My Roadmaps: List and manage all created roadmaps.

* Create New Roadmap: Initiate a new roadmap from scratch or template.

* Templates: Browse and utilize

gemini Output

Deliverable: Finalized Product Roadmap Builder Design Assets

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Product Roadmap Builder" application. These assets are designed to create a professional, intuitive, and highly functional tool that empowers users to strategically plan, prioritize, and communicate their product roadmaps effectively.


1. Detailed Design Specifications

The design aims for a clean, modern, and professional aesthetic, prioritizing clarity, usability, and data readability.

1.1 Layout and Grid System

  • Responsive Grid: Utilizes a 12-column responsive grid system, ensuring optimal content display across various screen sizes (desktop, tablet, mobile).
  • Fixed Header & Sidebar: A fixed header for global navigation and branding, and an optional fixed left sidebar for primary module navigation.
  • Content Area: The main content area will be fluid, adapting to available space, with clear padding and margins to prevent visual clutter.
  • Information Density: Balances information density for power users with sufficient white space for readability, especially in complex views like the Gantt chart.

1.2 Typography

  • Primary Font (Sans-serif): Inter or Roboto (or similar modern sans-serif) for all body text, labels, and UI elements. Chosen for its excellent readability across various sizes and screens.

* Weights: Regular (400), Medium (500), Semi-bold (600), Bold (700).

* Sizes:

* H1 (Page Titles): 28px - 36px

* H2 (Section Titles): 22px - 26px

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

* Body Text: 14px - 16px

* Small Text/Captions: 12px - 13px

  • Secondary Font (Optional, Sans-serif): Open Sans or Lato for specific data visualizations or auxiliary text, providing subtle visual distinction without introducing complexity.
  • Line Height: 1.5 - 1.6 for body text to enhance readability.
  • Text Alignment: Left-aligned for most content, centered for specific headings or calls-to-action where appropriate.

1.3 Iconography

  • Style: Flat, outlined, minimalist vector icons. Consistency in line weight and fill style is paramount.
  • Library: Utilizes a well-established icon library (e.g., Font Awesome, Material Icons, or a custom set) for common actions, navigation, and status indicators.
  • Usage:

* Navigation: Clear visual cues for modules (e.g., Dashboard, Roadmaps, Features, Resources).

* Actions: Edit, Delete, Add, Share, Filter, Sort.

* Status Indicators: Priority (high, medium, low), Progress (pending, in-progress, completed), Risk (low, medium, high).

* Data Visualization: Small icons within charts or tables to denote categories or types.

1.4 UI Components

  • Buttons:

* Primary: Solid fill with brand color, white text. Used for main actions.

* Secondary: Outlined with brand color, brand colored text. For less critical actions.

* Tertiary/Ghost: Transparent background, brand colored text. For subtle actions or links.

* Icon Buttons: For compact actions (e.g., edit, delete).

* States: Hover, Active, Disabled states clearly defined.

  • Input Fields:

* Clean, subtle borders with a slight border-radius.

* Clear placeholder text.

* Focus state with a distinct border or shadow.

* Error state with red border and helper text.

  • Dropdowns & Selects:

* Standard dropdown menus with clear selection indicators.

* Multi-select options where applicable.

  • Date Pickers: Intuitive calendar-based selection.
  • Sliders: For numerical ranges or progress indicators.
  • Cards: Used for grouping related information, features, or roadmap items. Subtle shadows or borders for visual separation.
  • Tables: Clean, readable tables with alternating row colors (zebra striping) for readability, sortable columns, and filtering options.
  • Modals/Dialogs: For focused tasks (e.g., adding a new feature, confirming an action). Overlaid with a semi-transparent background to focus user attention.
  • Notifications: Toast messages for success, error, or informational feedback, appearing non-intrusively and disappearing automatically.

1.5 Imagery and Illustrations

  • Data Visualization: Emphasis on clear, concise charts and graphs for progress tracking, resource allocation, and risk assessment. Minimalist style, leveraging the defined color palette.
  • Illustrations: Used sparingly for onboarding, empty states, or celebratory moments. Abstract, modern, and aligned with the brand aesthetic, avoiding overly complex or distracting visuals.

1.6 Accessibility

  • Color Contrast: Adheres to WCAG 2.1 AA standards for text and UI element contrast ratios.
  • Keyboard Navigation: All interactive elements are reachable and operable via keyboard.
  • ARIA Attributes: Proper use of ARIA roles and labels for screen reader compatibility.
  • Focus Indicators: Clear visual indicators for keyboard focus.

2. Wireframe Descriptions

Below are descriptions of key screens, outlining their structure, content, and primary functionalities.

2.1 Dashboard / Overview Screen

  • Layout:

* Fixed Header (Logo, Search, User Profile/Settings).

* Left Sidebar (Primary Navigation: Dashboard, Roadmaps, Features, Resources, Reports, Settings).

* Main content area divided into customizable widgets.

  • Content & Functionality:

* "My Roadmaps" Widget: Quick links to active roadmaps, showing status (e.g., "On Track," "At Risk").

* "Upcoming Milestones" Widget: A list of critical milestones approaching, with dates and associated features.

* "Feature Progress Summary" Widget: Bar chart or donut chart showing overall feature status (e.g., "Planned," "In Progress," "Completed," "Blocked").

* "Resource Utilization" Widget: High-level overview of team capacity vs. assigned work (e.g., a simple heat map or bar chart).

* "Recent Activity" Feed: Log of recent changes, comments, or updates across all roadmaps the user has access to.

* "Quick Actions": Buttons for "Create New Roadmap," "Add New Feature."

2.2 Roadmap View (Gantt Chart / Swimlane)

  • Layout:

* Header (Roadmap Title, Filters, View Options: Gantt, List, Kanban).

* Left Panel (Hierarchical list of features, epics, and initiatives).

* Main Content Area (Interactive timeline visualization).

  • Content & Functionality:

* Hierarchy: Features grouped under Epics, which are under Initiatives. Expand/collapse functionality.

* Timeline (Gantt):

* Horizontal bars representing features/epics, with start/end dates.

* Milestones marked with distinct icons/lines.

* Dependencies shown with connecting lines.

* Drag-and-drop to adjust dates and durations.

* Color-coded bars for status (e.g., green for completed, blue for in progress, red for at risk).

* Zoom levels (week, month, quarter, year).

* Swimlanes (Optional): Grouping by team, product area, or strategic goal.

* Filters: By status, owner, priority, strategic goal, timeframe.

* Hover States: Display detailed feature information (description, owner, status, progress percentage) on hover.

* Context Menu: Right-click on a feature for quick actions (Edit, Duplicate, Delete, Add Dependency).

2.3 Feature Detail View / Editor (Modal)

  • Layout: A modal window overlaying the current view.
  • Content & Functionality:

* Title: Feature Name (editable).

* Description: Rich text editor for detailed descriptions.

* Status: Dropdown (e.g., Planned, In Progress, Blocked, Completed, On Hold).

* Priority: Dropdown (e.g., Must-have, Should-have, Could-have, Won't-have, or High, Medium, Low).

* Strategic Goal Alignment: Multi-select dropdown linking to predefined strategic goals.

* Timeframe: Start Date & End Date (using date picker).

* Owner/Assignee: User selection dropdown.

* Team: Team selection dropdown.

* Resources: Link to resource allocation view or list of assigned resources.

* Dependencies: List of dependent features (input for adding new dependencies).

* Risks: Input field for associated risks, linking to a risk assessment.

* Milestones: Link to specific milestones.

* Attachments: File upload for supporting documents, designs.

* Comments/Activity Log: Section for threaded comments and a history of changes.

* Save/Cancel Buttons.

2.4 Prioritization Matrix / Board

  • Layout: A canvas-like view with draggable feature cards.
  • Content & Functionality:

* Axes: Configurable axes (e.g., Value vs. Effort, Impact vs. Feasibility, MoSCoW quadrants).

* Feature Cards: Each card represents a feature, showing its title, a small icon for priority/status, and possibly its owner.

* Drag-and-Drop: Users can drag feature cards across the matrix to visually prioritize them.

* Filters: Filter features by roadmap, status, owner, etc.

* Bulk Actions: Select multiple cards to change status or assign.

* Legend: Explaining the axes and color-coding (if any).

2.5 Resource Allocation View

  • Layout: Table or calendar-like view.
  • Content & Functionality:

* Team/Individual List: Left column listing team members or teams.

* Timeline/Feature List: Main area showing assigned features and their durations.

* Capacity Indicators: Visual cues (e.g., color-coded cells, progress bars) indicating individual/team capacity utilization (under-allocated, optimally allocated, over-allocated).

* Drag-and-Drop Assignment: Assign features to resources directly in this view.

* Filters: By team, project, feature status.

* Hover Details: Show feature details and resource availability on hover.


3. Color Palettes

The color palette is designed to be professional, trustworthy, and visually appealing, with clear semantic meanings for status and actions.

  • Primary Brand Color: #007bff (A vibrant, professional blue)

* Usage: Primary buttons, active navigation states, progress bars, key highlights, brand elements.

  • Secondary/Accent Colors:

* #6c757d (A medium gray)

* Usage: Secondary buttons, borders, subtle UI elements.

* #28a745 (Green)

* Usage: Success messages, "Completed" status, positive indicators.

* #ffc107 (Yellow/Orange)

* Usage: Warning messages, "In Progress" or "On Hold" status, moderate risk.

* #dc3545 (Red)

* Usage: Error messages, "Blocked" or "At Risk" status, negative indicators.

* #17a2b8 (Cyan)

* Usage: Informational messages, "Planned" status, specific chart data.

  • Neutral Colors:

* #343a40 (Dark Gray): Primary text, headings.

* #6c757d (Medium Gray): Secondary text, labels, icons.

* #adb5bd (Light Gray): Placeholder text, disabled states, subtle borders.

* #e9ecef (Extra Light Gray): Backgrounds for cards, alternate table rows.

* #f8f9fa (Off-white): Main application background.

* #ffffff (White): Card backgrounds, modal backgrounds.

  • Data Visualization Palette: A set of 5-7 distinct, accessible colors derived from the brand and accent palette, ensuring clarity when representing different data series in charts.

4. UX Recommendations

These recommendations focus on enhancing usability, efficiency, and user satisfaction.

4.1 User Onboarding & First-Time Experience

  • Guided Tour: A brief, interactive tour highlighting key features upon first login.
  • Empty States: Provide clear guidance and calls-to-action when a roadmap or feature list is empty (e.g., "No Roadmaps yet. Start by creating your first roadmap!").
  • Tooltips: Use contextual tooltips for complex UI elements or less obvious functionalities.

4.2 Information Architecture & Navigation

  • Clear Hierarchy: Logical grouping of navigation items (e.g., "Roadmaps" containing all roadmap-related views, "Features" for managing individual features).
  • Breadcrumbs: Provide clear breadcrumbs for deep navigation paths to help users understand their location within the application.
  • Global Search: A powerful search bar in the header to quickly find roadmaps, features, milestones, or resources.

4.3 Interaction Design & Feedback

  • Direct Manipulation: Implement drag-and-drop functionality extensively (e.g., reordering features, adjusting timelines in Gantt, moving cards in prioritization matrix).
  • Instant Feedback: Provide immediate visual feedback for user actions (e.g., loading spinners, success toasts, error messages).
  • Undo/Redo: Offer undo functionality for critical actions like deleting features or changing statuses.
  • Keyboard Shortcuts: Implement common keyboard shortcuts for power users (e.g., Ctrl/Cmd + S to
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
\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);}});}