Product Roadmap Builder
Run ID: 69cb233061b1021a29a864742026-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 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, prioritize, and communicate their product vision effectively.


1. Detailed Design Specifications

This section defines the core functional and technical requirements for the Product Roadmap Builder.

1.1 Functional Requirements

The application will provide the following capabilities:

  • User & Role Management:

* Secure user authentication (e.g., email/password, SSO integration).

* Role-based access control (e.g., Admin, Product Manager, Stakeholder/Viewer).

* User profile management.

  • Roadmap Creation & Management:

* Ability to create, edit, and archive multiple roadmaps.

* Define roadmap parameters: Name, Description, Time Horizon (e.g., Quarterly, Yearly, Rolling), Owner.

* Support for multiple roadmap views: Timeline, Kanban Board, List View.

* Filtering and sorting capabilities across all roadmap views (by owner, status, priority, theme, etc.).

  • Strategic Themes & Goals:

* Define overarching strategic themes or goals for each roadmap.

* Link features directly to strategic themes to ensure alignment.

* Track progress against strategic goals.

  • Feature Management:

* Add, edit, and delete individual features or initiatives.

* Detailed feature attributes: Name, Description, Owner, Status (e.g., Idea, Backlog, In Progress, Complete, On Hold), Priority, Estimated Effort (e.g., T-shirt size, Story Points), Due Date/Target Quarter, Dependencies.

* Ability to group features under larger epics or initiatives.

* Support for feature descriptions, attachments (e.g., design mockups, PRDs), and comments.

  • Prioritization Engine:

* Integrate common prioritization frameworks (e.g., RICE, MoSCoW, Weighted Scoring).

* Customizable scoring criteria for advanced prioritization.

* Visual representation of prioritized features.

* Drag-and-drop functionality for manual re-prioritization.

  • Milestone Planning:

* Define key milestones with specific dates and descriptions.

* Associate features or themes with specific milestones.

* Visual representation of milestones on timeline views.

  • Resource Allocation (Basic):

* Assign team members to features or epics.

* Basic visualization of assigned workload per team member.

* (Future enhancement: Detailed capacity planning, resource availability tracking).

  • Risk Assessment:

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

* Assign severity, likelihood, and define mitigation strategies for each risk.

* Status tracking for risks (e.g., Open, Mitigated, Closed).

  • Stakeholder Communication & Collaboration:

* Shareable read-only links for external stakeholders.

* Export roadmap data to various formats (PDF, CSV, PNG for visual roadmap).

* In-app commenting and notification system for collaboration.

* Version history/audit trail for roadmap changes.

  • Reporting & Analytics:

* Dashboard view showing key metrics (e.g., Roadmap Progress, Feature Velocity, Risk Overview, Resource Utilization).

* Customizable reports based on various roadmap attributes.

1.2 Technical Requirements

The application will adhere to the following technical specifications:

  • Architecture: Modern, scalable web-based application. Cloud-native deployment preferred (e.g., AWS, GCP, Azure).
  • Frontend: Single-Page Application (SPA) using a robust framework (e.g., React, Vue.js, Angular) for a dynamic and responsive user experience.
  • Backend: RESTful API built with a performant language/framework (e.g., Node.js, Python/Django/Flask, Go).
  • Database: Relational database (e.g., PostgreSQL) for structured data integrity, potentially complemented by a document database (e.g., MongoDB) for flexible data storage (e.g., comments, attachments).
  • Security:

* OAuth 2.0 or JWT-based authentication.

* Role-based access control (RBAC) enforced at the API level.

* Data encryption at rest and in transit (TLS/SSL).

* Regular security audits and vulnerability assessments.

  • Scalability: Designed for horizontal scaling, utilizing microservices or a modular architecture.
  • Performance: Optimized for fast loading times, responsive interactions, and efficient data retrieval/manipulation.
  • Integrations (Future): API-first design to facilitate future integrations with project management tools (e.g., Jira, Asana), communication platforms (e.g., Slack), and version control systems (e.g., GitHub).

1.3 Data Model (Simplified Overview)

  • User: UserID, Name, Email, PasswordHash, Role, OrganizationID, CreatedAt, UpdatedAt
  • Organization: OrganizationID, Name, SubscriptionPlan
  • Roadmap: RoadmapID, OrganizationID, Name, Description, OwnerUserID, TimeHorizon, Status, CreatedAt, UpdatedAt
  • StrategicTheme: ThemeID, RoadmapID, Name, Description, TargetOutcome
  • Feature: FeatureID, RoadmapID, EpicID (optional), Name, Description, OwnerUserID, Status, Priority, EffortEstimate, DueDate, StrategicThemeID, Dependencies, CreatedAt, UpdatedAt
  • Epic: EpicID, RoadmapID, Name, Description, OwnerUserID, Status (Groups Features)
  • Milestone: MilestoneID, RoadmapID, Name, Description, TargetDate
  • Risk: RiskID, FeatureID (optional), RoadmapID, Name, Description, Severity, Likelihood, MitigationPlan, Status, OwnerUserID
  • Comment: CommentID, FeatureID (or RoadmapID), UserID, Content, CreatedAt
  • ResourceAssignment: AssignmentID, FeatureID, UserID, AllocationPercentage (optional), StartDate, EndDate

2. Wireframe Descriptions

This section describes the key screens and their essential elements, focusing on functionality and layout.

2.1 Dashboard / Roadmap Overview

  • Header: Application Logo, User Profile/Settings, "Create New Roadmap" button.
  • Main Area:

* List of all available roadmaps, presented as cards or a table.

* Each roadmap card/row displays: Roadmap Name, Description, Owner, Last Updated, Progress indicator (e.g., % complete, number of features done).

* Quick filters/search for roadmaps.

* Option to view upcoming milestones across all roadmaps.

2.2 Roadmap Detail View (Timeline)

  • Header: Roadmap Name, Description, "Edit Roadmap" button, Share button, Export button.
  • Toolbar:

* View selector (Timeline, Kanban, List).

* Timeframe selector (Quarterly, Yearly, Custom).

* Filters: By Owner, Status, Priority, Strategic Theme.

* "Add Feature" button.

  • Main Area (Timeline):

* Horizontal timeline with quarters/months marked.

* Features represented as colored bars, placed according to their target quarter/due date.

* Bar length can indicate estimated effort or duration.

* Milestones marked prominently on the timeline (e.g., diamond icons).

* Drag-and-drop functionality for features to adjust timing.

* Clicking a feature bar opens a "Feature Detail" sidebar/modal.

  • Sidebar (Optional): When a feature is selected, a sidebar appears displaying its details for quick editing.

2.3 Roadmap Detail View (Kanban Board)

  • Header: (Same as Timeline view)
  • Toolbar: (Same as Timeline view, with Kanban-specific filters)
  • Main Area (Board):

* Columns representing feature statuses or phases (e.g., "Ideas," "Backlog," "Q1 - In Progress," "Q2 - Planned," "Done").

* Each column contains "Feature Cards."

* Feature Card: Displays Feature Name, Owner, Priority, Status, a small progress bar, and potentially a strategic theme tag.

* Drag-and-drop functionality to move feature cards between columns.

* "Add Feature" button at the top of each column.

* Clicking a feature card opens a "Feature Detail" modal.

2.4 Feature Detail Modal / Sidebar

  • Header: Feature Name, "Save" / "Cancel" buttons, "Delete Feature" button.
  • Main Content Area:

* Basic Info: Feature Name (editable), Description (rich text editor).

* Attributes: Dropdowns/inputs for Owner, Status, Priority, Effort Estimate, Due Date/Target Quarter, Strategic Theme.

* Dependencies: List of dependent features, with ability to add new dependencies.

* Risks: List of associated risks, with ability to add new risks.

* Attachments: Section to upload/view files.

* Comments: Chronological list of comments, with an input field to add new comments.

2.5 Prioritization Tool

  • Header: Roadmap Name, "Apply Prioritization" button.
  • Main Area:

* Table or matrix view of all features in the roadmap.

* Columns for prioritization criteria (e.g., Reach, Impact, Confidence, Effort for RICE).

* Input fields for users to score each feature against criteria.

* A calculated "Prioritization Score" column, automatically updated.

* Ability

gemini Output

Product Roadmap Builder: Detailed Design Specifications

This document outlines the comprehensive 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 supports strategic product planning, execution, and communication.


1. Detailed Design Specifications

The Product Roadmap Builder will be a web-based application designed for optimal usability on desktop browsers, with responsive considerations for larger screens.

1.1. Overall Application Structure & Layout

  • Top Header Bar:

* Logo/Product Name: Aligned left.

* Roadmap Selector: Dropdown to switch between different roadmaps (e.g., "Q3 2024 Product Roadmap", "Platform Team Roadmap").

* Global Search: Icon-based search bar for features, risks, milestones across the active roadmap.

* Notifications/Alerts: Icon displaying unread notifications (e.g., "Feature X status updated", "Risk Y escalated").

* User Profile: Avatar/icon with dropdown for user settings, logout, help.

  • Left Navigation Sidebar:

* Collapsible/Expandable: Allows users to maximize screen real estate.

* Main Sections (Icons + Text Labels):

* Dashboard: High-level overview.

* Features: Management of all product features/epics.

* Timeline: Visual Gantt-style roadmap view.

* Prioritization: Tools for feature prioritization.

* Resources: Team and capacity management.

* Risks: Risk identification and mitigation.

* Communication: Stakeholder engagement and reporting.

* Settings: Roadmap-specific and user preferences.

  • Main Content Area:

* Dynamic area displaying the content of the selected navigation item.

* Will include module-specific headers, filters, action buttons, and data visualizations.

  • Contextual Side Panels/Modals:

* Used for displaying detailed information (e.g., Feature Details) or for specific actions (e.g., "Add New Feature" form) without navigating away from the main view.

1.2. Key Modules & Functionality

##### 1.2.1. Dashboard (Overview)

  • Purpose: Provide a quick, customizable summary of the roadmap's health and progress.
  • Components:

* Configurable Widgets: Users can select, arrange, and resize widgets.

* Upcoming Milestones: List of next 3-5 critical milestones with dates, status, and linked features.

* Key Features in Progress: List of top 3-5 active features, showing status, owner, and progress bar.

* Critical Risks: List of top 2-3 high-impact/high-probability risks with status and owner.

* Overall Roadmap Progress: Donut chart or progress bar showing completion percentage.

* Resource Utilization Summary: High-level overview (e.g., "Team X at 90% capacity").

* Recent Activity Feed: Chronological list of recent changes (e.g., "John updated Feature A", "Milestone B completed").

##### 1.2.2. Features Management

  • Purpose: Central repository for all product features, epics, and user stories.
  • Components:

* Table View:

* Columns: Customizable and sortable (Feature ID, Name, Status, Priority, Owner, Target Release, Progress, Created Date, Last Updated).

* Filters: By Status (e.g., "Planned", "In Progress", "Completed"), Owner, Release, Tags.

* Search: Local search within the feature list.

* Bulk Actions: Select multiple features for status updates, owner assignment, etc.

* Card View (Optional): Kanban-style view for visual workflow management.

* Feature Detail Panel/Modal:

* Overview: Feature Name, ID, Status (dropdown), Priority (dropdown, e.g., P0-P3, High/Medium/Low), Owner (user select), Target Release (dropdown), Start Date, End Date, Progress Slider/Input.

* Description: Rich Text Editor (WYSIWYG) for detailed feature description, business case, goals.

* User Stories/Requirements: Sub-list of associated user stories with status, owner.

* Dependencies: Link to other features, external teams, or milestones. Visual representation of dependencies (e.g., "Blocks Feature Y", "Blocked by Feature Z").

* Resources: Assigned team members, estimated effort, actual effort.

* Risks: Link to associated risks in the Risk Register.

* Attachments: File upload for designs, specs, research.

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

* Action Buttons: Save, Cancel, Delete, Duplicate.

##### 1.2.3. Timeline View (Gantt Chart)

  • Purpose: Visualize the roadmap over time, showing releases, features, and milestones.
  • Components:

* Date Range Selector: Define the visible period (e.g., current quarter, next 6 months).

* Zoom Levels: Toggle between Quarterly, Monthly, Weekly, Daily views.

* Left Panel (Feature/Epic List): Hierarchical list of features/epics, with expand/collapse functionality.

* Main Chart Area:

* Timeline Grid: Horizontal bars representing features/epics, spanning their planned duration.

* Milestone Markers: Diamond or flag icons indicating key dates.

* Dependencies: Visual lines connecting dependent features.

* Drag-and-Drop: Reschedule features or adjust durations directly on the timeline.

* Progress Overlays: Visual indication of feature progress (e.g., shaded portion of the bar).

* Tooltip on Hover: Display feature name, dates, status, and owner.

##### 1.2.4. Prioritization Matrix

  • Purpose: Facilitate strategic feature prioritization based on various criteria.
  • Components:

* Configurable Axes: Users can define X and Y axes (e.g., "Value vs. Effort", "Impact vs. Feasibility", "Reach vs. Frequency").

* 2x2 or 3x3 Grid: Visual matrix displaying features.

* Feature Cards/Bubbles: Represent individual features, draggable across the matrix. Size of bubble could represent another metric (e.g., cost).

* Quadrant Labels: Clearly indicate the meaning of each section (e.g., "High Value, Low Effort").

* Filters: Filter features to be prioritized (e.g., "Unprioritized", "New Ideas").

* Auto-Categorization: Option to automatically place features based on predefined scores.

##### 1.2.5. Resource Allocation

  • Purpose: Plan and track resource capacity against feature demands.
  • Components:

* Team/Role List: List of teams or individual roles (e.g., "Frontend Devs", "UX Designers").

* Capacity Planning: Input estimated capacity (e.g., FTEs, hours per sprint/month) for each team/role.

* Feature Assignment: Assign features to teams/individuals.

* Utilization View (Heatmap/Bar Chart):

* Visual representation of resource load over time.

* Highlight over-allocated or under-allocated resources.

* Drill-down to see which features are consuming capacity.

* Skills Matrix (Optional):

gemini Output

Product Roadmap Builder: Final Design Assets & Specifications

This document outlines the comprehensive 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.


1. Overall Design Philosophy & Principles

Our design approach for the Product Roadmap Builder is centered around the following principles:

  • Clarity & Simplicity: Present complex roadmap data and planning tools in an easy-to-understand, uncluttered interface.
  • Functionality-First: Every design element serves a purpose, supporting efficient workflow and decision-making.
  • Professional & Modern Aesthetic: A clean, contemporary look that inspires confidence and is appealing to business professionals.
  • Interactive & Dynamic: Enable direct manipulation of data (drag-and-drop, inline editing) to foster engagement and efficiency.
  • Scalable & Flexible: The design system can accommodate future feature growth and varying levels of data complexity.
  • Data-Driven Visualization: Utilize effective data visualization techniques to make insights immediately apparent.

2. Key Design Elements & Specifications

2.1. Typography

A clear and consistent typographic hierarchy is crucial for readability and information organization.

  • Primary Font (Headings & UI Elements): Montserrat

* Usage: H1, H2, H3, navigation items, key labels.

* Weights: Semi-Bold (600), Bold (700)

  • Secondary Font (Body Text & Details): Lato

* Usage: Paragraphs, descriptions, table content, form inputs, captions.

* Weights: Regular (400), Light (300)

Typographic Scale:

  • H1 (Page Title): Montserrat Bold, 32px (Desktop), 28px (Tablet), 24px (Mobile)
  • H2 (Section Title): Montserrat Semi-Bold, 24px (Desktop), 20px (Tablet), 18px (Mobile)
  • H3 (Card/Widget Title): Montserrat Semi-Bold, 18px (Desktop), 16px (Tablet), 14px (Mobile)
  • Body Text: Lato Regular, 16px (Desktop), 14px (Tablet/Mobile)
  • Small Text/Captions: Lato Light, 12px
  • Button Text: Montserrat Semi-Bold, 14px

2.2. Color Palette

The color palette is designed to be professional, accessible, and to clearly distinguish interactive elements and data states.

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

* Usage: Primary call-to-action buttons, active navigation states, key accent elements, progress indicators.

  • Secondary Accent Color: #28A745 (A confident green)

* Usage: Success messages, positive indicators, secondary action buttons (e.g., "Add New").

  • Neutral Palette:

* Dark Text/Primary Content: #343A40

* Secondary Text/Icons: #6C757D

* Light Backgrounds/Card Backgrounds: #F8F9FA

* Borders/Dividers: #DEE2E6

* Disabled States: #E9ECEF

  • System Status Colors:

* Success: #28A745 (Green)

* Warning: #FFC107 (Amber)

* Error: #DC3545 (Red)

* Info: #17A2B8 (Cyan)

2.3. Iconography

  • Style: Line icons with a consistent stroke weight (1.5px-2px), simple and recognizable.
  • Library: Recommend using a well-established library like Font Awesome Pro or Material Icons for consistency and ease of implementation. Custom icons can be designed for unique product concepts if needed.
  • Usage: Navigation, feature types, status indicators, action buttons, data visualization legends.

2.4. Imagery & Illustrations

  • Style: Minimalist, abstract illustrations for onboarding, empty states, or celebratory moments. Avoid overly complex or realistic imagery.
  • Usage: Onboarding screens, "no data" states, marketing materials within the app, user profile avatars.

2.5. Component Library (Key Examples)

  • Buttons:

* Primary: Solid background (#007BFF), white text. Hover: darken.

* Secondary: Solid background (#28A745), white text. Hover: darken.

* Outline: Transparent background, primary color border and text. Hover: fill with primary color.

* Text: No background, primary color text. Hover: slight underline/background change.

* Sizes: Large, Medium, Small.

  • Input Fields:

* Clean, white background, light gray border (#DEE2E6).

* Focus state: Primary brand color border.

* Error state: Red border.

* Placeholder text: #ADB5BD.

  • Cards:

* White background, subtle shadow (box-shadow: 0 2px 4px rgba(0,0,0,0.05)), rounded corners (4px).

* Used for features, milestones, widgets, and encapsulated sections.

  • Modals/Drawers:

* Overlay background: semi-transparent dark gray (rgba(0,0,0,0.5)).

* Modal/Drawer background: white, rounded corners, shadow.

* Clear close button (X icon).

  • Navigation:

* Global (Left Sidebar): Dark background (#343A40 or a slightly darker shade), white/light gray text and icons. Active state highlights with primary brand color.

* Top Bar: Light background (#FFFFFF), search, user profile, notifications.

  • Data Tables:

* Clean, readable rows, subtle zebra striping (#F8F9FA) for alternating rows.

* Clear headers, sortable columns.

* Action buttons/icons within rows.


3. Wireframe Descriptions (Key Screens/Modules)

The following descriptions detail the layout and functionality of critical screens within the Product Roadmap Builder.

3.1. Dashboard / Roadmap Overview

  • Layout:

* Left Sidebar: Global navigation (Dashboard, Features, Milestones, Resources, Risks, Communication, Settings).

* Top Bar: Product selector, search, notifications, user profile/account.

* Main Content Area:

* Header: Current Roadmap Name, "Add New Feature/Milestone" CTA, Filter/Sort options (by product line, team, timeframe).

* Primary Visualization: A configurable timeline view (Gantt-chart like) displaying features and milestones.

* Features as colored bars, draggable to adjust dates.

* Milestones as distinct markers.

* Swimlanes can be configured by Product Area, Team, or Goal.

* Zoom levels (quarterly, monthly, weekly).

* Right Sidebar/Widgets (Optional): Key Metrics (e.g., "Features in Progress," "Upcoming Milestones," "Top Risks"), Quick Links.

  • Key Interactions: Drag-and-drop features/milestones, click to open detail view, filter/sort.

3.2. Feature Prioritization Matrix

  • Layout:

* Top Bar: Contextual filters (e.g., "Product Line," "Team," "Status").

* Main Content Area:

* Prioritization Grid: A 2x2 or custom matrix (e.g., Value vs. Effort, RICE Score matrix).

* Feature Cards: Small, interactive cards representing individual features. Each card shows feature name, owner, and a color-coded status.

* Unprioritized Features List: A sidebar or section displaying features not yet placed on the matrix.

  • Key Interactions: Drag-and-drop feature cards onto the matrix to prioritize. Tooltips on hover for quick info. Click feature card to open detail view.

3.3. Milestone & Timeline Editor

  • Layout:

* Top Bar: Timeframe selector (e.g., "Q1 2024," "Next 6 Months"), "Add New Milestone" CTA.

* Main Content Area:

* Interactive Gantt Chart:

* Left Panel: List of milestones and associated features (expandable).

* Right Panel (Timeline): Visual representation of milestones (diamond shapes) and features (bars) over time.

* Dependencies between features/milestones shown as connecting lines.

* Progress bars within feature bars.

  • Key Interactions: Drag-to-resize feature bars, drag-to-reposition, click to create/edit dependencies, inline editing of milestone/feature names.

3.4. Resource Allocation View

  • Layout:

* Top Bar: Filters (by Team, Skill Set, Project), "Add Resource" CTA.

* Main Content Area:

* Resource Cards/Profiles: Each card represents a team member or a generic resource.

* Shows name, role, skill sets, current availability/capacity.

* Lists assigned features/tasks, with progress indicators.

* Capacity Visualization: Bar charts or heatmaps showing aggregated team/individual workload over a selected period.

* Unassigned Tasks/Features Panel: A list of items awaiting resource allocation.

  • Key Interactions: Drag-and-drop unassigned features onto resource cards. Click on a resource to view detailed workload.

3.5. Risk Management Register

  • Layout:

* Top Bar: Filters (by Status, Likelihood, Impact, Owner), "Add New Risk" CTA.

* Main Content Area:

* Data Table: Displays risks in a sortable, filterable table.

* Columns: Risk ID, Description, Likelihood (dropdown), Impact (dropdown), Mitigation Plan, Owner, Status (dropdown), Date Identified, Last Updated.

* Color-coding: Rows or specific cells can be color-coded based on a calculated risk score (Likelihood x Impact).

  • Key Interactions: Inline editing for quick updates. Click row to open detailed risk modal. Bulk actions (e.g., "Change Status").

3.6. Stakeholder Communication Plan Editor

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