Product Roadmap Builder
Run ID: 69cb698f61b1021a29a88d1f2026-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: Research & Design Requirements

This document outlines the detailed design specifications, wireframe descriptions, color palette, 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 managers and their teams to strategically plan, execute, and communicate their product vision.


1. Design Philosophy & Principles

Our design philosophy centers on Clarity, Actionability, and Collaboration.

  • Clarity: Information should be easy to understand at a glance, with a clear hierarchy and minimal cognitive load. Complex data (features, timelines, resources) must be presented in an digestible format.
  • Actionability: Users should be able to make decisions and take action directly within the interface. Editing, prioritizing, and updating should be seamless and efficient.
  • Collaboration: The design will facilitate easy sharing, commenting, and version control, supporting a collaborative product development environment.
  • Scalability: The design must accommodate roadmaps of varying complexity and team sizes, ensuring performance and usability are maintained as projects grow.
  • Flexibility: Provide multiple views (e.g., Timeline, Kanban, List) to cater to different planning methodologies and user preferences.

2. User Personas & Core Scenarios (Design Context)

While a full persona deep dive is a separate research step, our design considers the following primary users and their core needs:

  • Product Manager (Primary User): Needs to build, prioritize, update, and present the roadmap. Requires comprehensive views and granular control.
  • Product Owner/Team Lead: Needs to understand upcoming features, allocate resources, and track progress against milestones. Requires clear status updates and resource visibility.
  • Stakeholder/Executive: Needs high-level overview, strategic alignment, and progress reports. Requires executive dashboards and easy-to-digest summaries.

Core Scenarios Driving Design:

  1. Creating a New Roadmap: Seamless setup, defining strategic themes/goals.
  2. Adding & Prioritizing Features: Intuitive input, drag-and-drop prioritization, scoring mechanisms.
  3. Planning Milestones & Timelines: Visual timeline editing, dependency management.
  4. Allocating Resources: Assigning teams/individuals, visualizing capacity.
  5. Assessing & Mitigating Risks: Identifying, tracking, and linking risks to features/milestones.
  6. Communicating the Roadmap: Generating shareable views, presentations, and status updates.
  7. Tracking Progress: Visual indicators for feature status, milestone completion.

3. Detailed Design Specifications

3.1. Layout Structure

The application will feature a consistent layout across key views:

  • Global Navigation (Left Sidebar): Persistent, collapsible navigation for core sections (e.g., Dashboard, Roadmaps, Features, Resources, Settings).
  • Header Bar (Top): Contextual information (current roadmap name), quick actions (e.g., Share, Export, Notifications, User Profile).
  • Main Content Area: Dynamic area displaying the primary content of the selected view (e.g., roadmap timeline, feature list, dashboard widgets).
  • Contextual Side Panel (Right - Optional): Appears on demand for detailed editing of selected items (e.g., feature details, task properties) or for filters/settings.

3.2. Component Library

  • Buttons:

* Primary: Solid fill, prominent action (e.g., "Add Feature", "Save Roadmap").

* Secondary: Outline, less prominent (e.g., "Cancel", "Edit").

* Tertiary/Ghost: Text-only, for subtle actions (e.g., "View Details").

* Icon Buttons: For common actions (e.g., Delete, Edit, Filter).

  • Inputs:

* Text Fields: Standard, clear labels, validation states.

* Text Areas: Multi-line input for descriptions.

* Dropdowns/Selects: For choices from a predefined list.

* Date Pickers: Intuitive calendar interface for start/end dates.

* Toggle Switches: For binary options (on/off).

* Sliders: For numerical ranges (e.g., confidence level).

  • Cards: Used for displaying individual features, risks, resources, or dashboard widgets. Should be easily reorderable and clickable.
  • Tables: For tabular data (e.g., detailed feature list, resource breakdown). Sortable, filterable, and resizable columns.
  • Charts & Graphs:

* Bar Charts: For resource allocation, feature counts by status.

* Line Charts: For progress over time.

* Donut/Pie Charts: For breakdown of feature types, risk levels.

* Gantt Charts: Central to the timeline view for roadmap visualization.

  • Modals/Dialogs: For focused tasks (e.g., "Confirm Deletion", "Add New User").
  • Toasts/Notifications: Non-intrusive feedback messages (e.g., "Roadmap Saved Successfully").
  • Progress Indicators: Spinners for loading, progress bars for long operations.

3.3. Interaction Patterns

  • Drag-and-Drop: Essential for reordering features, prioritizing, and scheduling on the timeline.
  • In-line Editing: Where appropriate, allow direct editing of text fields without opening a separate modal.
  • Filtering & Sorting: Robust options for refining views based on various criteria (e.g., status, owner, strategic theme).
  • Hover States: Clear visual feedback on interactive elements.
  • Keyboard Navigation: Support for efficient interaction without a mouse.
  • Tooltips: Provide helpful context for icons and less obvious controls.
  • Undo/Redo: For critical actions, especially in the roadmap editor.

4. Wireframe Descriptions (Key Screens)

4.1. Dashboard/Roadmap Overview

  • Layout: Grid-based dashboard.
  • Widgets:

* "My Roadmaps" Card: List of user's active roadmaps with quick links.

* "Upcoming Milestones" Card: Timeline view of critical deadlines across all active roadmaps.

* "Feature Status Summary" Chart: Donut chart showing features by status (Planned, In Progress, Complete, On Hold).

* "Resource Utilization" Bar Chart: Overview of team capacity vs. assigned work.

* "Top Risks" List: Critical risks requiring attention.

* "Activity Feed": Recent changes and comments across roadmaps.

  • Header: "Welcome, [User Name]!", "Create New Roadmap" button.

4.2. Roadmap Editor (Timeline View - Gantt-like)

  • Layout: Left panel for feature/milestone list, right panel for interactive Gantt chart.
  • Left Panel (List View):

* Hierarchical list of strategic themes, epics, and features.

* Columns for Status, Owner, Priority, Dates.

* Drag-and-drop to reorder features within themes.

* Expand/Collapse functionality for themes/epics.

  • Right Panel (Gantt Chart):

* Interactive timeline (zoom in/out: year, quarter, month, week).

* Features and milestones represented as draggable bars.

* Dependencies shown as connecting lines between bars.

* Hovering over a bar reveals key details (title, dates, owner).

* Clicking a bar opens a contextual right-side panel for detailed editing.

* Visual indicators for progress (e.g., fill percentage on bar).

  • Header: Roadmap name, view switcher (Timeline, Kanban, List), filters (by owner, status, theme), "Share" button, "Add Feature/Milestone" button.

4.3. Roadmap Editor (Kanban View - Optional alternative)

  • Layout: Columns representing stages (e.g., Backlog, Now, Next, Later, Done).
  • Cards: Each card represents a feature/epic, showing title, owner, priority, and a small status indicator.
  • Drag-and-Drop: Move cards between columns to change status/priority.
  • Swimlanes (Optional): Group cards by strategic theme or team.
  • Header: Roadmap name, view switcher, filters, "Add Feature" button.

4.4. Feature Detail View (Contextual Right Panel)

  • Trigger: Clicking a feature card/bar.
  • Content:

* Feature Name (Editable)

* Description (Rich Text Editor)

* Status Dropdown (Planned, In Progress, Complete, On Hold, etc.)

* Priority Dropdown (High, Medium, Low)

* Strategic Theme/Goal Selector

* Owner/Assignee Selector

* Start Date / End Date (Date Pickers)

* Effort Estimate (e.g., Story Points, T-shirt Size)

* Dependencies (Linked Features)

* Associated Risks (Linked Risks)

* Comments Section: With @mentions and attachments.

* Activity Log: History of changes.

* "Save" / "Cancel" / "Delete" Buttons

4.5. Resource Allocation View

  • Layout: Table-based or visual grid.
  • Table View:

* Rows: Individual team members or teams.

* Columns: Capacity (e.g., hours/week), Assigned Work (features/tasks), Utilization Percentage, Availability.

* Drill-down to see specific assigned features.

  • Visual Grid View (Optional):

* Team members as cards.

* Visual representation of their workload (e.g., progress bars, color-coded based on utilization).

* Drag-and-drop features onto team members to assign.

  • Header: Filters (by team, role), "View Unassigned Work" button.

4.6. Risk Management View

  • Layout: Table of risks, with a right-side detail panel.
  • Table Columns: Risk Name, Description, Likelihood (High, Medium, Low), Impact (High, Medium, Low), Mitigation Plan, Owner, Status (Open, Mitigated, Closed), Associated Features.
  • Filter/Sort: By likelihood, impact, status.
  • "Add New Risk" Button.
  • Risk Detail Panel (Right): Similar to Feature Detail, but specific to risks. Includes fields for Mitigation Steps, Contingency Plans, and Risk Score calculation.

4.7. Communication Plan / Export View

  • Layout: Options for generating and sharing roadmap views.
  • Content:

* "Shareable Link" Generator: Create public/private links to specific roadmap views (e.g., executive summary, full roadmap).

* "Presentation Mode": Full-screen, simplified view for presenting the roadmap.

* Export Options:

* PDF: Customizable (e.g., choose visible columns, date range, themes to include).

* CSV/Excel: For detailed data export.

* Image (PNG/JPG): For timeline snapshots.

* "Email Report": Schedule automated roadmap updates to stakeholders.

* Customizable Templates: For different audiences (e.g., Executive Summary, Team Sync, Investor Update).

  • Preview Area: Shows what the exported/shared roadmap will look like.

5. Color Palette

Our color palette is designed for professionalism, clarity, and accessibility.

  • Primary Brand Color: #007BFF (Vibrant Blue) - Used for primary buttons, active states, key highlights.
  • Secondary Accent Color: #28A745 (Success Green) - Used for positive actions, completion indicators.
  • Neutral Palette:

* Backgrounds: #F8F9FA (Light Gray) - Main application background.

* Card/Container Backgrounds: #FFFFFF (White) - For content blocks, modals.

* Borders/Dividers: #E9ECEF (Lighter Gray) - Subtle separation.

* Text (Primary): #212529 (Dark Gray) - Main body text, headings.

* Text (Secondary): #6C757D (Medium Gray) - Helper text, descriptions, inactive states.

  • Semantic Colors:

* Success: #28A745 (Green) - Already defined as Secondary Accent.

* Warning: #FFC107 (Yellow/Amber) - For warnings, attention required.

* Error: #DC3545 (Red) - For critical errors, negative actions.

* Information: #17A2B8 (Cyan) - For informational messages.

  • Roadmap Specific Colors: A set of distinct, accessible colors for differentiating strategic themes, feature types, or status categories on charts and timelines. (e.g., a palette of 5-7 distinct pastels or muted tones).

* Example: #6C757D, #FD7E14, #6F42C1, #20C997, #E83E8C, #00BCD4 (these would be chosen carefully to ensure contrast).


6. Typography

  • Primary Font Family: Inter (or similar modern sans-serif like Roboto, Open Sans). Highly readable, clean, and professional for UI elements and body text.
  • Headings (H1, H2, H3): Inter Bold/Semi-Bold, larger sizes for hierarchy.

* H1: 2.5rem (40px)

* H2: 2rem (32px)

* H3: 1.75rem (28px)

* H4: 1.5rem (24px)

  • Body Text: Inter Regular, 1rem (16px) for readability.
  • Small Text/Helper Text: Inter Regular, 0.875rem (14px).
  • Font Weights: Regular (400), Semi-Bold (600), Bold (700) to create visual emphasis.
  • Line Height: 1.5 for body text for optimal readability.

7. Iconography

  • Style: Clean, modern, outline or filled icons. Consistency is key.
  • Library: Utilizing a well-established icon library (e.g., Font Awesome, Material Icons, Feather Icons) to ensure consistency and scalability.
  • Common Icons:

* + (Add)

* Edit (Pencil)

* Delete (Trash Can)

* Share

* Filter

* Sort

* Settings (Gear)

* User / Team

* Calendar (Date Picker)

* Checkmark (Complete)

* Warning (Exclamation Mark)

* Info (i in a circle)

* Chevron (Expand/Collapse, Navigation)


8. UX Recommendations

8.1. Usability & Consistency

  • Predictable Interactions: Elements should behave as users expect (e.g., clicking a button performs an action, clicking a text field allows editing).
  • Visual Hierarchy: Use size, color, and spacing to guide the user's eye to the most important information and actions.
  • Feedback: Provide immediate visual and textual feedback for all user actions (e.g., loading spinners, success toasts, error messages).
  • Error Prevention: Design forms and workflows to prevent common errors (e.g., clear labels, input validation, confirmation dialogs
gemini Output

Product Roadmap Builder: Detailed Design Specifications

This document outlines the comprehensive design specifications for the "Product Roadmap Builder" tool, covering functional and non-functional requirements, conceptual wireframe descriptions, a professional color palette, and user experience (UX) recommendations. This deliverable aims to provide a clear, actionable blueprint for development, ensuring a robust, intuitive, and visually appealing product.


1. Detailed Design Specifications

1.1 Functional Requirements

The Product Roadmap Builder will provide a comprehensive suite of features to enable strategic planning and execution.

  • Roadmap Creation & Management:

* Create/Edit/Delete Roadmaps: Users can create multiple roadmaps, each with a unique name, description, owner, and defined time horizon (e.g., quarterly, yearly).

* Initiative & Feature Management: Ability to add, edit, and delete initiatives (epics) and their associated features. Each item includes fields for name, description, owner, status, priority, estimated effort, and start/end dates.

* Dependency Mapping: Link features/initiatives to indicate dependencies, visually represented in the timeline view.

* Categorization: Assign features/initiatives to specific products, teams, or strategic goals.

  • Feature Prioritization:

* Multiple Frameworks: Support for common prioritization methods (e.g., RICE scoring, MoSCoW, Value vs. Effort Matrix). Users can select their preferred framework.

* Interactive Prioritization: Drag-and-drop functionality for reordering features within lists or plotting features on a matrix.

* Scoring & Calculation: Input fields for RICE (Reach, Impact, Confidence, Effort) or MoSCoW (Must, Should, Could, Won't) criteria, with automated calculation of priority scores.

  • Milestone Planning:

* Define Milestones: Ability to create and manage key milestones (e.g., MVP launch, Beta release, major version updates) with specific dates and descriptions.

* Milestone Association: Link features and initiatives to relevant milestones for clear progress tracking.

* Visual Representation: Milestones are clearly marked and visible across relevant views (e.g., Timeline).

  • Resource Allocation:

* Resource Management: Add and manage team members or generic roles (e.g., "2x Backend Engineer") with their availability.

* Assignment: Assign resources to features/initiatives, specifying allocation (e.g., hours per week, percentage of capacity).

* Utilization Tracking: Visual representation of resource utilization, highlighting over/under-allocated resources and potential bottlenecks.

  • Risk Assessment & Management:

* Risk Identification: Log risks associated with specific features, initiatives, or the overall roadmap.

* Risk Attributes: Assign severity (High, Medium, Low), likelihood (High, Medium, Low), mitigation strategies, owner, and status.

* Visual Indicators: Display visual cues (e.g., color-coded icons) for high-risk items in relevant views.

  • Stakeholder Communication & Reporting:

* Customizable Views: Generate tailored roadmap views for different stakeholders (e.g., executive summary, detailed engineering plan, marketing release plan).

* Export Options: Export roadmap data and visualizations to various formats (PDF, CSV, PNG image, PowerPoint slides).

* Shareable Links: Generate read-only or editable shareable links with granular access controls.

* Comment System: Allow stakeholders to add comments directly on features or initiatives.

  • User & Access Management:

* Role-Based Access Control (RBAC): Define roles (e.g., Admin, Editor, Viewer) with specific permissions for creating, editing, and viewing roadmaps and their components.

* User Directory: Manage users and assign roles.

  • Integrations (Future Consideration):

* Integrate with popular project management tools (e.g., Jira, Trello, Asana) for seamless data synchronization.

* Integrate with communication tools (e.g., Slack, Microsoft Teams) for notifications.

1.2 Non-Functional Requirements

These requirements ensure the system performs optimally and securely.

  • Performance:

* Fast loading times (under 2 seconds for main views).

* Responsive UI interactions (sub-100ms for common actions).

* Efficient data retrieval and rendering for large roadmaps.

  • Security:

* Authentication: Secure user authentication (e.g., OAuth 2.0, 2FA support).

* Authorization: Robust role-based access control to prevent unauthorized data access

gemini Output

As the final step in the "Product Roadmap Builder" workflow, this deliverable outlines the detailed design specifications, visual aesthetics, and user experience recommendations to create a professional, intuitive, and highly functional product roadmap application. Our goal is to empower Product Managers and their stakeholders with a tool that provides clarity, facilitates strategic decision-making, and enhances collaboration.


1. Introduction & Design Philosophy

The design for the Product Roadmap Builder is anchored in several core principles:

  • Clarity through Simplicity: Present complex strategic information in an easily digestible and understandable format.
  • Actionable Insights: Enable users to not just view data, but to derive insights and make informed decisions directly within the platform.
  • Collaborative by Design: Foster seamless communication and teamwork among product teams and stakeholders.
  • Flexibility & Scalability: Provide customizable views and features that can adapt to various product strategies, team structures, and organizational sizes.
  • User-Centricity: Prioritize ease of use, intuitive navigation, and a delightful user experience for all levels of users.

This design aims to transform strategic planning into a visually engaging and highly productive process.

2. Detailed Design Specifications

The Product Roadmap Builder will feature a suite of interconnected views, each designed for a specific aspect of roadmap management.

2.1. Main Dashboard / Overview

  • Purpose: Provide a high-level summary of all active roadmaps, key performance indicators, and immediate priorities.
  • Key Components:

* Roadmap Cards: Visual cards for each product or portfolio roadmap, displaying title, owner, overall progress bar, and a quick link to its detailed view.

* Key Metrics Summary: Customizable widgets showing aggregated data such as:

* Upcoming Milestones (next 30/60/90 days)

* Critical Risks (number of high-severity risks)

* Feature Velocity (e.g., features shipped per quarter)

* Resource Utilization overview.

* Notification/Activity Feed: A chronological list of recent updates, comments, and critical alerts across all owned roadmaps.

* Quick Filters: Ability to filter roadmaps by product line, team, or status.

  • Interactions: Clickable cards to drill down into specific roadmaps; interactive charts for quick insights.

2.2. Main Roadmap View (Timeline / Swimlane)

  • Purpose: The primary visualization of features, epics, and initiatives over time, organized by strategic themes, product areas, or teams.
  • Key Components:

* Global Header:

* Filters: Robust filtering system (by timeframe, product, team, status, strategic theme, owner, priority).

* View Toggles: Switch between Timeline, List, and Kanban board views.

* Actions: "Add New Initiative," "Export Roadmap" (PDF, CSV, Image), "Share/Present," "History/Versions."

* Left Sidebar (Collapsible):

* Roadmap Navigation: List of available roadmaps/product areas.

* Legend: Explaining color-coding for status, priority, or strategic theme.

* Settings: Access to roadmap-specific configurations.

* Main Canvas:

* Time Axis: Configurable display (quarters, months, weeks, years).

* Swimlanes: Horizontal lanes representing chosen categories (e.g., Product Area, Team, Strategic Goal, Customer Segment).

* Feature Cards: Rectangular cards representing individual features, epics, or initiatives.

* Display: Title, owner, status indicator (color/icon), progress bar, key dates (start/end), priority icon.

* Interactions: Drag-and-drop for rescheduling, reassigning to different swimlanes (e.g., moving from one team to another), hover for quick details, click to open detail pane.

2.3. Feature / Initiative Detail Pane (Modal)

  • Purpose: Comprehensive view and editing interface for a single roadmap item. Accessible via click from any roadmap view.
  • Key Components:

* Header: Item Title (editable), Unique ID, Status dropdown, Type (Epic, Feature, Initiative, Enabler), Owner, Date Range, Quick Actions (Duplicate, Delete, Link to external tools).

* Core Details Section:

* Description: Rich text editor for detailed scope, goals, and context.

* Business Case/Value Proposition: Field to articulate the "why."

* Dependencies: Linked roadmap items, internal or external.

* Planning & Prioritization:

* Dates: Start Date, End Date (with calendar picker).

* Effort: Estimated effort (e.g., Story Points, T-shirt size, person-days).

* Priority: Dropdown (e.g., High, Medium, Low) or link to prioritization matrix.

* Metrics/OKRs: Link to specific Key Results or Success Metrics this item contributes to.

* Resource Allocation: Assigned Teams/Individuals, estimated hours/capacity.

* Risk Assessment: Identified Risks (linked to Risk Register), Mitigation Strategies.

* Stakeholders & Communication: Key internal/external stakeholders, notes on communication plan.

* Activity Log & Comments: Chronological history of changes, with a dedicated section for collaborative comments and @mentions.

* Attachments: Ability to upload files (docs, images) and link to external resources.

2.4. Prioritization Workspace (e.g., Value vs. Effort Matrix)

  • Purpose: An interactive canvas for visually prioritizing features based on configurable criteria.
  • Key Components:

* Configurable Axes: Dropdowns to select criteria for X and Y axes (e.g., Business Value, Customer Impact, Technical Effort, Risk, Confidence).

* Interactive Grid: Features represented as movable cards or dots on a 2x2 or 3x3 matrix.

* Unprioritized Backlog: A sidebar list of features not yet placed on the matrix, with drag-and-drop functionality to add them.

* Legend: Explaining color-coding (e.g., by status, owner, strategic theme).

* Analysis Tools: Summary of features in each quadrant, ability to filter the matrix view.

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