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

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

The following details the comprehensive design requirements for the "Product Roadmap Builder" tool, focusing on user experience, visual design, and core functionalities. This output serves as the foundational design specification for development, ensuring a clear, actionable, and customer-centric approach.


Product Roadmap Builder: Design Requirements

The Product Roadmap Builder is envisioned as a powerful, intuitive platform enabling product teams to strategically plan, visualize, prioritize, and communicate their product development journey. The design prioritizes clarity, collaboration, and actionable insights to transform complex strategies into clear, executable roadmaps.


1. Design Specifications

1.1. Core Design Principles

  • User-Centric Simplicity: Prioritize ease of use and minimize cognitive load. Interfaces should be clean, uncluttered, and
gemini Output

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Product Roadmap Builder" tool. The aim is to create a professional, intuitive, and highly functional platform that empowers product teams to strategically plan and execute their roadmaps.


1. Design Specifications

1.1 Overall Aesthetic & Principles

The design will embody a modern, clean, and professional aesthetic, prioritizing usability and clarity.

  • Minimalist & Flat Design: Clean lines, subtle shadows, and a focus on content.
  • Intuitive Navigation: Clear, consistent, and easy-to-understand navigation across all modules.
  • Data Visualization: Emphasis on visual representation of data (charts, graphs, timelines) to convey complex information quickly.
  • Responsiveness: Fully optimized for various screen sizes (desktop, tablet, mobile) to ensure a consistent experience.
  • Accessibility (WCAG 2.1 AA): Adherence to accessibility standards for color contrast, keyboard navigation, screen reader compatibility, and clear focus states.

1.2 Typography

A clean, sans-serif font family will be used to ensure readability and a modern feel.

  • Primary Font Family: 'Inter' or 'Roboto' (for headers and body text)
  • Fallback Fonts: sans-serif
  • Font Sizes (Examples):

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

* H2: 24px - 30px (Section Titles)

* H3: 20px - 24px (Sub-section Titles)

* Body Text: 14px - 16px

* Labels/Small Text: 12px - 13px

  • Font Weights: Regular (400), Medium (500), Semi-bold (600), Bold (700) for hierarchy.

1.3 Iconography

A consistent and easily recognizable icon set will be used throughout the application.

  • Icon Library: Material Design Icons or Font Awesome (Pro version for consistency and variety).
  • Style: Outline or filled, consistent stroke weight.
  • Usage: For navigation, actions (add, edit, delete), status indicators, and feature representations.

1.4 Layout & Grid System

A standard 12-column grid system will be used to ensure consistent spacing and responsiveness.

  • Container Widths: Max-width of 1280px for desktop, adapting to smaller breakpoints.
  • Gutters: 20px - 30px between columns.
  • Spacing: Consistent use of a 4px or 8px base unit for margins, padding, and component spacing.

1.5 Component Library

A reusable set of UI components will be developed to ensure consistency and accelerate development.

  • Buttons: Primary, secondary, tertiary, icon buttons, disabled states.
  • Forms: Text inputs, text areas, dropdowns, checkboxes, radio buttons, date pickers, file uploaders.
  • Cards: Used for displaying information snippets, widgets, or individual items.
  • Tables: For displaying structured data with sorting, filtering, and pagination.
  • Modals & Drawers: For focused tasks or displaying additional details without navigating away.
  • Navigation: Side navigation, top navigation, tabs, breadcrumbs.
  • Data Visualization: Charts (bar, line, pie), Gantt charts, matrices.

2. Wireframe Descriptions (Key Modules)

This section describes the layout, key elements, and interactions for the core modules of the Product Roadmap Builder.

2.1 Dashboard / Overview Screen

Purpose: Provide a high-level summary of the product roadmap's status.

  • Layout:

* Left Sidebar Navigation: Persistent navigation with product selection, and links to core modules (Dashboard, Features, Milestones, Resources, Risks, Communication, Settings).

* Top Header: Product name, user profile, notifications, quick search.

* Main Content Area: Grid-based layout displaying various summary widgets.

  • Key Elements:

* Roadmap Snapshot Widget: A mini-timeline or visual representation of upcoming features/milestones.

* Prioritized Features Widget: Top N features by priority score, with quick status updates.

* Upcoming Milestones Widget: List of the next 3-5 critical milestones with their dates and status.

* Resource Utilization Summary: High-level overview of team capacity and current allocation (e.g., "75% capacity utilized").

* Top Risks Widget: List of high-severity risks requiring immediate attention.

* Recent Activity/Notifications Feed: Chronological log of recent changes, comments, and alerts.

  • Interactions:

* Clicking on any widget navigates to the respective detailed module or opens a relevant modal.

* Filtering options (e.g., by product line, time frame) to customize dashboard view.

2.2 Feature Prioritization Module

Purpose: Manage and prioritize product features based on strategic criteria.

  • Layout:

* Top Control Bar: Filters (status, owner, product area), Sort options (priority score, creation date), Search bar, "Add Feature" button.

* Main Content Area (Split View):

* Left Pane: Feature list (table or card view) with key attributes (Name, Status, Priority Score, Owner, Due Date).

* Right Pane (Collapsible): Detail panel for selected feature or "New Feature" form.

* Prioritization Matrix (Optional View): A 2x2 matrix (e.g., Value vs. Effort, Impact vs. Feasibility) for visual prioritization.

  • Key Elements:

* Feature List/Table: Each row/card represents a feature. Columns include Feature Name, Description Snippet, Status (e.g., Backlog, Prioritized, In Progress, Done), Priority Score (calculated RICE/WSJF), Owner, Dependencies.

* "Add Feature" Button: Opens the right-pane detail panel in creation mode.

* Feature Detail Panel:

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

* Prioritization Criteria: Input fields for Value, Effort, Risk, Reach (RICE model) or similar.

* Metadata: Status dropdown, Owner assignment (user picker), Product Area, Release/Milestone linkage, Tags.

* Dependencies: Links to other features or external items.

* Attachments: File upload for specs, mockups.

* Comments/Activity Log: For collaboration and tracking changes.

  • Interactions:

* Drag-and-Drop: On the Prioritization Matrix view, features can be dragged between quadrants.

* Inline Editing: Quick updates to status, owner, or priority directly from the list view.

* Bulk Actions: Select multiple features to change status, assign owner, or delete.

* Filtering & Sorting: Dynamic updates to the list based on applied filters.

2.3 Milestone Planning Module

Purpose: Define, track, and visualize key product milestones and their associated features.

  • Layout:

* Top Control Bar: View switcher (Gantt, List), Filters (status, owner, product), Search, "Add Milestone" button.

* Main Content Area:

* Gantt Chart View: Primary view, visualizing milestones and linked features on a timeline.

* List View: Table of milestones with details.

  • Key Elements:

* Gantt Chart:

* Timeline Scale: Customizable (weeks, months, quarters).

* Milestone Markers: Distinct visual markers on the timeline, often with a summary popup on hover.

* Feature Bars: Representing features, linked to milestones, showing start/end dates.

* Dependencies Lines: Visual connectors between dependent features/milestones.

* Milestone List (Table): Milestone Name, Description Snippet, Start Date, End Date, Status, Owner, Associated Features (count).

* "Add Milestone" Button: Opens a modal or sidebar form for creating a new milestone.

* Milestone Detail Modal/Sidebar:

* Milestone Name, Description.

* Start Date, End Date (date picker).

* Status, Owner.

* Associated Features: A multi-select dropdown or search interface to link existing features.

* Dependencies: Link to other milestones.

* Attachments, Comments.

  • Interactions:

* Drag-and-Drop (Gantt): Adjust milestone or feature dates and durations directly on the timeline.

* Click to Edit: Clicking a milestone or feature bar on the Gantt opens its detail panel.

* Zoom/Pan: Navigate through the timeline.

* Filter & Sort: Customize the visible milestones and features.

2.4 Resource Allocation Module

Purpose: Manage team resources and allocate them to features or projects.

  • **Layout
gemini Output

Product Roadmap Builder: Final Design Assets & UX Recommendations

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 facilitates strategic product planning and communication.


1. Overall Design Philosophy

The design philosophy centers on Clarity, Control, and Collaboration.

  • Clarity: Information should be presented clearly and concisely, minimizing cognitive load. Visual hierarchy and consistent UI patterns will guide users.
  • Control: Users should feel in control of their roadmap, with easy access to editing, prioritization, and filtering options. Direct manipulation (e.g., drag-and-drop) will be prioritized.
  • Collaboration: The design will inherently support team collaboration through shared views, commenting features, and clear status indicators.

The aesthetic will be modern, clean, and professional, utilizing a subtle color palette with strategic accents to highlight key information and actions.


2. Detailed Design Specifications

2.1. Layout & Grid System

  • Responsive Grid: Utilizes a 12-column grid system for adaptability across various screen sizes (desktop, tablet, potentially mobile for viewing).
  • Fixed Sidebar Navigation: A persistent left-hand navigation bar for primary sections (Dashboard, Features, Milestones, Resources, Risks, Settings).
  • Header Bar: A fixed top bar for global actions (Search, Notifications, User Profile, Share/Export).
  • Content Area: The main dynamic area where roadmap data and tools are displayed.
  • Spacing:

* Base Unit: 8px for consistent spacing (margins, padding).

* Component Spacing: Multiples of 8px (e.g., 8px, 16px, 24px, 32px).

* Section Spacing: 40px - 64px for clear separation between major content blocks.

2.2. Typography

A sans-serif typeface family will be used for readability and a modern feel.

  • Primary Font: Inter (or a similar highly readable, versatile sans-serif like Open Sans, Lato).

* Headings (H1-H4): Bold or Semi-Bold weights for emphasis.

* H1 (Page Title): 32px / 40px line height, Semi-Bold

* H2 (Section Title): 24px / 32px line height, Semi-Bold

* H3 (Subsection Title): 18px / 24px line height, Medium

* H4 (Card Title): 16px / 24px line height, Medium

* Body Text: Regular weight.

* Large Body: 16px / 24px line height, Regular

* Standard Body: 14px / 20px line height, Regular

* Small Text (Labels, Captions): 12px / 16px line height, Regular

* Buttons/Navigation: 14px / 20px line height, Medium

  • Monospace Font (Optional, for code snippets or IDs): Roboto Mono or Source Code Pro

2.3. Iconography

  • Style: Line-based, minimalist, consistent stroke weight (e.g., Feather Icons, Material Icons outline style).
  • Size: Standard 24x24px, with smaller variants (16x16px) for inline use and larger (32x32px) for hero elements.
  • Color: Inherit text color by default, or use a subtle gray for inactive states, and accent color for active/interactive states.
  • Key Icons:

* Dashboard: Home or Dashboard icon

* Features: List or Feather icon

* Milestones: Calendar or Flag icon

* Resources: Users or Team icon

* Risks: Alert-triangle or Shield-off icon

* Settings: Settings or Gear icon

* Add New: Plus-circle

* Edit: Edit or Pencil

* Delete: Trash

* Filter: Filter

* Sort: Sort

* Share: Share

* Export: Download

2.4. Imagery & Illustrations

  • Purpose: Minimalist, functional illustrations for empty states, onboarding, or celebratory moments.
  • Style: Flat or isometric, aligning with the clean aesthetic, using the primary and accent colors. Avoid complex or overly detailed imagery that could distract.
  • Example: A stylized roadmap illustration for an empty roadmap state.

2.5. Animations & Transitions

  • Subtle & Functional: Animations should enhance the user experience, not distract.
  • Examples:

* Hover States: Slight background color change or subtle lift effect on cards/buttons (150ms ease-out).

* Modal Transitions: Fade-in/scale-up effect for modals (200ms ease-out).

* Sidebar Collapse/Expand: Smooth width transition (250ms ease-in-out).

* Drag-and-Drop: Visual feedback for dragging (e.g., shadow, slight opacity change).

* Loading States: Skeleton loaders for content areas, subtle spinners for specific actions.


3. Wireframe Descriptions (Key Screens)

3.1. Dashboard / Roadmap Overview

  • Layout: Grid-based dashboard with customizable widgets.
  • Header: Page title "Roadmap Overview," "Add New Feature" CTA, "Share/Export" buttons.
  • Widgets:

* Roadmap Progress Bar: Visualizing overall completion against milestones.

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

* Feature Status Breakdown: Donut chart or bar chart showing features by status (e.g., "Planned," "In Progress," "Completed," "On Hold").

* Risk Summary: Count of open risks by severity (High, Medium, Low).

* Team Workload: High-level overview of resource allocation or team capacity.

* Recent Activity Feed: Log of recent changes, comments, and updates.

  • Interactivity: Widgets can be rearranged, resized, and configured. Clickable elements lead to detailed views.

3.2. Feature Detail / Prioritization View

  • Layout:

* Left Pane: Filter and sort options (e.g., by status, owner, priority, release).

* Main Content:

* Kanban Board View: Features represented as cards, organized by columns (e.g., "Backlog," "Next Up," "In Progress," "Done," "Future"). Drag-and-drop functionality to move features between columns.

* List View: Tabular display of features with columns for Name, Status, Priority, Owner, Estimate, Release. Sortable and filterable.

  • Feature Card (Kanban):

* Feature Name (H4)

* Priority Label (e.g., P1, P2)

* Status Tag

* Assigned Avatar(s)

* Estimate (e.g., "2 weeks," "M")

* Due Date (optional)

* Clicking a card opens a detailed side panel/modal.

  • Feature Detail Panel (Side Panel/Modal):

* Tabs: Overview, Description, Acceptance Criteria, Dependencies, Risks, Comments, Activity Log.

* Fields: Feature Name, Description (rich text editor), Status dropdown, Priority dropdown, Release dropdown, Owner(s) multi-select, Estimate, Due Date, Attachments.

* Collaboration: Comment section with @mentions.

3.3. Milestone / Timeline View

  • Layout: Gantt chart-style visualization.
  • Header: "Add New Milestone" CTA, view toggles (e.g., Day, Week, Month, Quarter), filter by release.
  • Left Pane: List of milestones with expand/collapse functionality to show associated features.
  • Main Content: Timeline axis (dates/quarters) with horizontal bars representing milestones and nested features.

* Milestone Bar: Color-coded by status, showing name and start/end dates.

* Feature Bar: Nested under milestone, showing name and duration.

  • Interactivity:

* Drag-and-drop to adjust milestone/feature dates and durations.

* Hover to see detailed information (tooltip).

* Click to open milestone/feature detail panel.

* Zoom in/out on the timeline.

3.4. Resource Allocation View

  • Layout:

* Left Pane: List of team members/roles.

* Main Content:

* Calendar/Timeline View: A weekly or monthly view showing assigned tasks/features per team member.

* Workload Summary: Bar chart or heat map showing estimated workload vs. capacity per team member.

  • Resource Card (Calendar View): Shows assigned feature, status, and estimated effort.
  • Interactivity:

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

* Filter by team, role, or feature status.

* View individual team member's capacity and allocated work.

3.5. Risk Management View

  • Layout: Table-based or Kanban-style view for risks.
  • Header: "Add New Risk" CTA, Filter by Severity, Status, Owner.
  • Table View:

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

* Sortable and filterable columns.

  • Kanban View (Optional): Columns for "Identified," "Mitigating," "Monitoring," "Closed."
  • Risk Detail Panel (Side Panel/Modal):

* Fields: Risk Name, Description, Severity (dropdown), Likelihood (dropdown), Impact (dropdown), Mitigation Plan (rich text), Contingency Plan, Owner, Status, Associated Feature(s).

* Activity log for risk updates.


4. Color Palettes

A professional, clean, and accessible color palette.

4.1. Primary & Accent Colors

  • Primary Blue (Brand/Interactive): #3B82F6 (A vibrant, trustworthy blue for primary actions, links, and branding elements).
  • Primary Blue Darker (Hover/Active): #2563EB
  • Accent Green (Success/Positive): #22C55E (For "Completed" status, success messages).
  • Accent Orange (Warning/Caution): #F97316 (For "On Hold" status, warning messages).
  • Accent Red (Error/Critical): #EF4444 (For "High Severity" risks, error messages).
  • Accent Purple (Categorization/Info): #A855F7 (For specific categories or informational elements).

4.2. Neutral Colors (Text, Backgrounds, Borders)

  • Text Primary: #1F2937 (Dark charcoal for main body text, strong contrast).
  • Text Secondary: #4B5563 (Softer gray for labels, secondary information).
  • Text Tertiary/Disabled: #9CA3AF (Light gray for inactive elements, placeholders).
  • Background Primary: #FFFFFF (Clean white for main content areas).
  • Background Secondary: #F9FAFB (Light off-white for sidebars, card backgrounds, alternating table rows).
  • Border/Divider: #E5E7EB (Subtle light gray for separators, borders).
  • Shadow: rgba(0, 0, 0, 0.05) (Subtle shadow for cards, modals).

4.3. Semantic Colors (Status, Priority)

  • Status - Planned: #60A5FA (Light blue)
  • Status - In Progress: #FACC15 (Yellow)
  • Status - On Hold: #F97316 (Orange)
  • Status - Completed: #22C55E (Green)
  • Status - Deferred: #9CA3AF (Gray)
  • Priority - P1 (Critical): #EF4444 (Red)
  • Priority - P2 (High): #F97316 (Orange)
  • Priority - P3 (Medium): #FACC15 (Yellow)
  • Priority - P4 (Low): #60A5FA (Light Blue)

5. UX Recommendations

5.1. Navigation & Information Architecture

  • Persistent Global Navigation: Left-hand sidebar for easy access to main sections.
  • Breadcrumbs: To indicate current location within deeper views (e.g., Dashboard > Features > Feature Name).
  • Contextual Actions: Buttons and actions should be placed near the content they affect (e.g., "Add Feature" button near feature list).
  • Search Functionality: A global search bar in the header to quickly find features, milestones, risks, or team members.

5.2. Interactivity & Direct Manipulation

  • Drag-and-Drop:

* Reordering features within a list or Kanban column.

* Moving features between Kanban columns to change status.

* Adjusting dates/durations on the timeline view.

* Assigning resources by dragging features to team members.

  • Inline Editing: Allow users to directly edit fields (e.g., feature name, status, priority) in table or card views without opening a full modal, where appropriate.
  • Quick Actions: Hover states on cards/rows revealing common actions (e.g., "Edit," "Delete," "Change Status").

5.3. Feedback & Error Handling

  • Instant Feedback: Visual cues for successful actions (e.g., "Saved!" toast message), pending actions (spinners), and errors (inline error messages, red borders).
  • Clear Error Messages: Specific and actionable error messages (e.g., "Feature name cannot be empty" instead of "Error").
  • Confirmation Dialogs: For destructive actions (e.g., deleting a feature, roadmap).

5.4. Data Visualization & Reporting

  • Clear Visuals: Charts and graphs should be easy to interpret, using appropriate chart types for the data (e.g., donut for proportions, bar for comparisons, line for trends).
  • Interactive Charts: Hover states to display specific data points, click-through to filtered views.
  • Customizable Dashboards: Allow users to select, arrange, and configure widgets to personalize their overview.
  • Export Options: Provide options to export data and reports in various formats (CSV, PDF, image).

5.5. Collaboration & Communication

  • Commenting System: Integrated comment sections on features, milestones, and risks with support for @mentions to notify team members.
  • Activity Logs: Detailed logs of changes made to any item (who, what, when).
  • Notifications: In-app and optional email notifications for mentions, status changes, and critical updates.
  • Shareable Views: Ability to generate read-only links for stakeholders who don't need full access, with configurable visibility of information.

5

product_roadmap_builder.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

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

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/**(.+?)**/g,"$1"); hc=hc.replace(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); }function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}