Infographic Creator
Run ID: 69cc85363e7fb09ff16a29ec2026-04-01Design
PantheraHive BOS
BOS Dashboard

Infographic Creator: Research & Design Requirements

This document outlines the comprehensive design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the Infographic Creator. Our goal is to develop an intuitive, powerful, and professional tool that empowers users to transform complex data and information into visually compelling and easily digestible infographics for a diverse audience.


1. Project Overview & Target Audience

The "Infographic Creator" aims to be the go-to platform for designing high-quality infographics. The tool will cater to a broad user base, including business professionals, educators, content creators, and researchers, enabling them to produce visuals for reports, presentations, social media, and academic papers. The output infographics themselves must prioritize clarity, professionalism, readability, and visual appeal.


2. Core Infographic Types Supported

The creator will support a versatile range of infographic types, allowing users to select the best format for their data and narrative:

  • Statistical Infographics: For presenting data-heavy visualizations like bar charts, line graphs, pie charts, area graphs, scatter plots, bubble charts, and pictograms.
  • Process Infographics: To illustrate sequential steps, workflows, or instructions.
  • Timeline Infographics: To visualize historical events, project milestones, or chronological data.
  • Comparison Infographics: To highlight differences and similarities between two or more items, concepts, or data sets.
  • Geographic Infographics: To incorporate maps and display location-based data.
  • List-Based Infographics: Visually enhanced lists for presenting tips, facts, or resources.
  • Hierarchical Infographics: To represent organizational structures, decision trees, or categorization (e.g., tree maps, pyramids).

3. Detailed Design Specifications

3.1. Layouts & Templates

  • Extensive Template Library: A rich
gemini Output

Infographic Creator: Detailed Design Specifications & UX Recommendations

This document outlines comprehensive design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Infographic Creator" tool. The goal is to develop an intuitive, powerful, and aesthetically pleasing platform that empowers users to create professional-grade infographics with ease.


1. Detailed Design Specifications

The Infographic Creator will be a web-based application, prioritizing a seamless user experience on desktop browsers.

1.1 Core Functionality

  • Dashboard/Home Screen:

* Displays recent projects.

* Access to template library.

* Option to start from scratch.

* User account management (profile, billing if applicable).

  • Template Library:

* Categorized templates (e.g., Marketing, Business, Education, Health, Process, Timeline, Comparison).

* Search functionality by keyword, industry, or style.

* Preview mode for templates.

* Option to filter by free/premium templates.

  • Infographic Editor (Canvas):

* Drag-and-Drop Interface: Users can easily add, move, resize, and rotate elements on the canvas.

* Layer Management: Ability to bring elements forward/backward, group/ungroup, lock/unlock.

* Alignment & Distribution Tools: Smart guides, snap-to-grid, horizontal/vertical alignment, equidistant distribution.

* Zoom & Pan: Control over the canvas view.

* Undo/Redo History: Robust history tracking for all actions.

* Auto-Save: Continuous saving of user progress.

  • Element Library:

* Text: Various pre-designed text blocks (headings, body text, quotes), rich text editing (font, size, color, bold, italic, underline, alignment, line spacing).

* Shapes: Basic geometric shapes (rectangles, circles, triangles) with customizable fill, stroke, and opacity.

* Icons: Extensive library of vector icons (categorized, searchable) with customizable color.

* Images:

* Upload functionality for user's own images (JPG, PNG, SVG).

* Basic image editing (crop, resize, opacity, filters).

* Integration with a stock photo library (e.g., Unsplash, Pixabay).

* Charts & Graphs:

* Types: Bar charts (horizontal/vertical), Line charts, Pie charts/Donut charts, Area charts, Scatter plots, Progress bars, Pictorial charts.

* Data Input: Manual data entry via a table editor, CSV/Excel upload, or integration with external data sources (e.g., Google Sheets - future consideration).

* Customization: Colors, labels, axes, legends, data series, chart titles.

* Infographic Specific Elements: Timelines, process flows, maps (basic, customizable regions), comparison tables, progress rings/bars.

  • Customization Panel (Right Sidebar):

* Context-sensitive, displaying properties of the selected element.

* General Properties: Position (X, Y), Width, Height, Rotation.

* Style Properties: Fill color, border color/thickness, shadow, opacity.

* Text Properties: Font family, size, color, weight, line height, letter spacing.

* Chart Properties: Data editor, chart type, color scheme, label visibility.

* Canvas Properties: Background color/image, canvas size (predefined aspect ratios or custom dimensions).

  • Top Bar/Header:

* Project Title (editable).

* "Save" button (manual save, alongside auto-save).

* "Preview" mode.

* "Export" options.

* "Undo/Redo" buttons.

* User profile/settings.

  • Export Options:

* Image Formats: PNG (with transparent background option), JPG (adjustable quality).

* Vector Formats: SVG (for scalability).

* Document Formats: PDF (single or multi-page).

* Sharing: Direct link sharing, social media integration.

1.2 Technical Considerations

  • Performance: Optimize asset loading and canvas rendering for a smooth experience.
  • Scalability: Design for future expansion of features and user base.
  • Security: Robust measures for data privacy and user account security.
  • Browser Compatibility: Support for modern browsers (Chrome, Firefox, Safari, Edge).

2. Wireframe Descriptions

Here are textual descriptions of key wireframes, focusing on layout and primary interactions.

2.1 Dashboard/Home Screen

  • Layout: Three main sections.

* Header (Top): Logo, search bar for projects, "Create New Infographic" button, User Profile icon.

* Left Sidebar: Navigation links: "My Infographics," "Templates," "Favorites," "Trash."

* Main Content Area:

* "Recent Projects" section: Grid or list view of recently edited infographics with thumbnails, titles, and last modified dates. "View All" button.

* "Start from Template" section: Curated selection of popular or featured templates with large preview cards and categories. "Browse All Templates" button.

* "Start from Scratch" card: A prominent card/button to begin with a blank canvas.

  • Interaction: Clicking a project thumbnail opens it in the editor. Clicking a template card leads to a template preview or directly to the editor with the template loaded.

2.2 Template Selection Screen

  • Layout:

* Header (Top): Logo, search bar for templates, "Back to Dashboard" button, User Profile icon.

* Left Sidebar: Template categories (e.g., Business, Marketing, Education, Timeline, Comparison). Each category is clickable to filter templates.

* Main Content Area:

* Search Results/Filtered Templates: A responsive grid displaying template thumbnails. Each thumbnail includes the template title and a "Preview" or "Use This Template" button on hover.

* Pagination/Infinite Scroll: For large template libraries.

  • Interaction: Users can browse categories, search for specific templates, and preview them before selecting to use.

2.3 Infographic Editor Screen (Primary Workspace)

  • Layout: This is the core interface, designed for maximum canvas visibility and efficient workflow.

* Top Header Bar:

* Logo, Infographic Title (editable), "Save" button, "Preview" button, "Share" button, "Export" button, "Undo" & "Redo" icons, User Profile icon.

* Left Sidebar (Tools Panel):

* Vertical tabs/icons for: "Templates," "Text," "Shapes," "Icons," "Images," "Charts," "Uploads."

* Clicking a tab expands it to show relevant assets/options (e.g., clicking "Text" shows various text block styles).

* Central Canvas Area:

* The main design workspace. Resizable and zoomable.

* Smart guides appear on element movement for alignment.

* Contextual mini-toolbar appears when an element is selected (e.g., duplicate, delete, lock, layer order).

* Right Sidebar (Properties Panel):

* Context-sensitive. When no element is selected, it shows canvas properties (background color, size).

* When an element is selected, it displays its specific customization options (e.g., for text: font, size, color; for shapes: fill, stroke; for charts: data editor, chart type, colors).

* Organized into collapsible sections (e.g., "Style," "Data," "Position").

* Bottom Bar (Optional):

* Zoom slider/percentage, current canvas size, "Fit to Screen" button.

  • Interaction: Drag elements from the left panel onto the canvas. Select elements on the canvas to edit properties in the right panel. Use top bar for project-level actions.

3. Color Palettes

We propose three distinct color palettes to cater to different user needs and infographic styles. Each palette includes primary, secondary, accent, and neutral colors, along with their hex codes.

3.1 Palette 1: Professional & Trustworthy

  • Theme: Corporate, clean, reliable. Ideal for business reports, data-heavy presentations.
  • Primary: #2E4057 (Dark Blue - for main headings, important buttons)
  • Secondary: #5D7B9B (Medium Blue - for subheadings, secondary elements)
  • Accent 1: #F7C500 (Vibrant Yellow - for highlights, calls to action)
  • Accent 2: #E76F51 (Terracotta - for contrast, specific data points)
  • Neutral 1 (Background): #F8F8F8 (Light Gray - clean canvas background)
  • Neutral 2 (Text/Borders): #4A4A4A (Dark Gray - body text, borders)
  • Neutral 3 (Light Text): #FFFFFF (White - text on dark backgrounds)

3.2 Palette 2: Modern & Creative

  • Theme: Engaging, vibrant, contemporary. Suitable for marketing, social media, educational content.
  • Primary: #4ECDC4 (Teal - for main sections, visual anchors)
  • Secondary: #FF6B6B (Coral - for contrasting elements, warnings)
  • Accent 1: #FFC65C (Sunny Yellow - for highlights, playful elements)
  • Accent 2: #7F6FEE (Lavender - for distinct categories, softer accents)
  • Neutral 1 (Background): #F0F4F8 (Very Light Blue-Gray - soft background)
  • Neutral 2 (Text/Borders): #3A4750 (Dark Slate - body text)
  • Neutral 3 (Light Text): #FFFFFF (White)

3.3 Palette 3: Minimalist & Earthy

  • Theme: Calm, organic, sophisticated. Best for elegant designs, lifestyle, or environmental topics.
  • Primary: #6D9773 (Forest Green - for grounding elements, main branding)
  • Secondary: #B5CAA0 (Sage Green - for supporting details, softer tones)
  • Accent 1: #D9B28C (Warm Beige - for highlights, textural feel)
  • Accent 2: #E0A37A (Terracotta Orange - for warmth, key data points)
  • Neutral 1 (Background): #FDFCF6 (Off-White - clean, warm background)
  • Neutral 2 (Text/Borders): #5E574D (Deep Brown - body text, natural feel)
  • Neutral 3 (Light Text): #FFFFFF (White)

4. UX Recommendations

User experience is paramount for an infographic creator. These recommendations aim to make the tool intuitive, efficient, and enjoyable to use.

4.1 Onboarding & First-Time User Experience

  • Interactive Tutorial: A brief, guided tour highlighting key features (template selection, adding elements, customization).
  • Empty State Guidance: When a user starts from scratch, provide clear prompts (e.g., "Drag elements from the left panel," "Click here to set canvas size").
  • Help Center/Knowledge Base: Easily accessible help resources with articles and video tutorials.

4.2 Intuitive Interface & Navigation

  • Consistent Layout: Maintain predictable placement of tools, panels, and actions across the application.
  • Clear Labeling: Use descriptive text labels for icons and buttons, especially for complex functions.
  • Visual Hierarchy: Use size, color, and placement to guide the user's eye to important information and actions.
  • Contextual Tools: Only display relevant options based on the currently selected element or active tool.
  • Keyboard Shortcuts: Implement common shortcuts (Ctrl/Cmd+C, V, Z, Y, S, Delete) to speed up workflow for power users.

4.3 Efficiency & Workflow

  • Drag-and-Drop Excellence: Ensure smooth, responsive drag-and-drop for all elements. Provide clear visual feedback during dragging (e.g., ghost image, drop zone indicators).
  • Smart Guides & Snapping: Implement intelligent guides for alignment, spacing, and distribution to assist with precise layout.
  • Bulk Actions: Allow users to select multiple elements to apply changes (e.g., change color, group, align).
  • Preset Styles/Themes: Offer quick application of pre-defined font pairings, color schemes, and element styles to an entire infographic or selected elements.
  • "Duplicate" Functionality: Easy duplication of elements or groups of elements.
  • Template Customization Flexibility: Ensure templates are fully editable, allowing users to modify every aspect without limitations.

4.4 Feedback & Error Handling

  • Real-time Feedback: Visual cues for actions (e.g., highlight on hover, loading spinners for data processing).
  • Clear Error Messages: Informative and actionable error messages, guiding users on how to resolve issues (e.g., "File too large, maximum 5MB").
  • Success Notifications: Brief, non-intrusive notifications for successful actions (e.g., "Project Saved," "Image Uploaded").
  • Confirmation Dialogs: For destructive actions (e.g., "Are you sure you want to delete this project?").

4.5 Accessibility

  • Color Contrast: Ensure sufficient contrast between text and background colors to meet WCAG guidelines.
  • Keyboard Navigation: All interactive elements should be reachable and operable via keyboard.
  • Alt Text for Images: Provide options for users to add alt text to images for screen readers.
  • Scalable Text: Allow browser-level text scaling without breaking the layout.

4.6 Performance & Reliability

  • Fast Loading Times: Optimize assets and code to ensure the application loads quickly.
  • Smooth Interactions: Minimize lag during element manipulation, zooming, and panel interactions.
  • Robust Auto-Save: Implement a reliable auto-save mechanism to prevent data loss, with clear indicators of save status.
  • Cloud Storage: Projects should
gemini Output

This deliverable outlines the finalized design assets and specifications for the "Infographic Creator" workflow. The goal is to ensure the generated infographics are professional, engaging, and highly customizable, while the creator tool itself is intuitive and powerful.


Finalized Design Assets & Specifications: Infographic Creator

1. Executive Summary

This document provides comprehensive design specifications, wireframe descriptions, color palettes, typography guidelines, and user experience (UX) recommendations for the "Infographic Creator" workflow. The focus is on creating a versatile tool that enables users to produce high-quality, professional infographics with ease, ensuring both aesthetic appeal and clear communication of information. The specifications cover both the output design principles for the infographics themselves and the interface design principles for the creator tool.

2. Overall Design Philosophy

The design philosophy for the Infographic Creator and its output revolves around three core pillars:

  • Clarity & Readability: Information must be easily digestible and visually organized, ensuring the core message is never lost. Data visualization should be precise and unambiguous.
  • Professionalism & Engagement: Infographics should exude a polished, modern aesthetic that captures attention and builds credibility. Visual elements will be sophisticated, not distracting.
  • Flexibility & User Control: The creator tool will empower users with extensive customization options while providing smart defaults and templates to streamline the design process. Users should feel in control of their output without being overwhelmed.

3. Infographic Output Design Specifications

These specifications define the visual characteristics and structural principles of the infographics generated by the creator.

3.1. Structure & Layout Principles

The Infographic Creator will support a range of common and effective infographic layouts, adaptable via templates:

  • Vertical Storytelling: A linear flow, ideal for processes, timelines, or step-by-step guides. Utilizes a clear top-to-bottom hierarchy.
  • Comparison/Versus: Two-column or side-by-side layouts for comparing data, features, or concepts. Distinct visual separation with unifying elements.
  • Statistical/Data-Heavy: Grid-based or modular layouts emphasizing charts, graphs, and key metrics. Focus on clean data presentation.
  • Process/Flowchart: Sequential layouts with directional cues (arrows, connectors) to illustrate steps or decision paths.
  • Geographic/Map-Based: Integration of maps with data overlays, ideal for regional statistics or global comparisons.
  • Timeline: Chronological arrangement of events with clear date markers and event descriptions.
  • List-Based: Visually enhanced lists for presenting tips, facts, or features.

Key Layout Elements:

  • Header Section: Clear, concise title, optional subtitle, and brand logo.
  • Main Content Blocks: Distinct sections for different points, using visual separators (lines, negative space, background colors).
  • Data Visualization Zones: Dedicated areas for charts, graphs, and numerical data.
  • Iconography & Imagery Integration: Strategic placement to break text and add visual interest.
  • Footer Section: Source attribution, contact information, and optional Call-to-Action (CTA).

3.2. Data Visualization Elements

The creator will offer a robust set of data visualization options, with emphasis on clarity and aesthetic appeal:

  • Bar Charts: Vertical and horizontal, stacked and grouped. Clean axes, clear labels.
  • Line Charts: For trends over time. Smooth lines, distinct markers.
  • Pie/Donut Charts: For proportions. Limited slices (max 6-8 for readability), clear percentage labels.
  • Area Charts: For cumulative totals over time.
  • Scatter Plots: For correlation between two variables.
  • Bubble Charts: For displaying three dimensions of data.
  • Progress Bars/Circles: For showing completion rates or single metrics.
  • Icon Arrays/Pictograms: Using icons to represent units of data (e.g., 1 icon = 100 people).
  • Geographic Maps: Choropleth (color-coded regions), bubble maps (size-coded regions/points).

Design Principles for Data Viz:

  • Minimalist Design: Avoid chart junk; focus on data ink.
  • Color Consistency: Use a consistent color palette for data series.
  • Clear Labeling: All axes, data points, and legends must be legible.
  • Scalability: Charts should render clearly at various resolutions.
  • Interactive (Optional for Web): Hover states for data points revealing more details.

3.3. Text & Typography Hierarchy

A clear typographic hierarchy is crucial for guiding the reader's eye and conveying importance.

  • H1 (Main Title): Large, bold, impactful. Primary brand font.
  • H2 (Section Titles): Prominent, slightly smaller than H1. Primary brand font or complementary secondary.
  • H3 (Sub-sections/Key Points): Clear, distinct, but less dominant. Secondary font.
  • Body Text: Highly legible, comfortable reading size. Secondary font.
  • Captions/Labels: Smaller, subtle, but clear. Secondary font.
  • Data Labels: Concise, directly associated with data points. Secondary font.

Typography Guidelines:

  • Font Pairing: Max 2-3 distinct font families per infographic (one for headings, one for body, optional accent).
  • Readability: Ensure sufficient line height (1.4-1.6x font size) and letter spacing.
  • Contrast: High contrast between text and background colors.

3.4. Imagery & Iconography Integration

Visual assets will enhance understanding and aesthetic appeal.

  • Icons:

* Style Consistency: All icons within an infographic should adhere to a consistent style (e.g., line art, filled, flat, duotone). The creator will offer curated icon sets.

* Purpose: To represent concepts, break text, or visualize data (pictograms).

* Scalability: Vector-based for crispness at any size.

  • Illustrations:

* Style: Modern, flat, or semi-flat vector illustrations are preferred for their versatility and scalability.

* Purpose: To set the tone, explain complex ideas, or add visual interest.

  • Photography:

* Quality: High-resolution, professionally sourced images.

* Purpose: Backgrounds, hero images, or specific contextual elements.

* Consistency: Consistent color grading or filter application if multiple photos are used.

3.5. Call-to-Action (CTA) Integration

CTAs will be seamlessly integrated into the footer or relevant sections.

  • Design: Clear, distinct button or text link. Uses accent color for prominence.
  • Placement: Strategically placed without being intrusive.
  • Text: Concise and action-oriented (e.g., "Learn More," "Download Report," "Visit Website").

3.6. Branding Elements

The creator will support robust branding options.

  • Logo Placement: Dedicated, customizable area in the header/footer.
  • Brand Colors: Ability to upload and apply brand-specific color palettes.
  • Custom Fonts: Option to upload and use specific brand fonts (premium feature).
  • Brand Guidelines Enforcement: Templates can be locked to brand standards.

3.7. Responsive Design Considerations

While infographics are primarily designed for static viewing, their presentation across various digital platforms requires consideration.

  • Export Formats: High-resolution images (PNG, JPG) and vector graphics (PDF, SVG).
  • Web Embedding: Generate embed codes with responsive scaling for web.
  • Mobile Optimization: Design principles encouraging vertical scrolling and stacked content for mobile-first consumption where possible. For complex infographics, a "zoom and pan" functionality or simplified mobile view will be considered.

4. Infographic Creator Interface (UI) Wireframe Descriptions

The user interface for the Infographic Creator will be intuitive, guiding users through a logical workflow.

4.1. Step 1: Content Input

  • Layout: Left sidebar for navigation/settings, central canvas, right panel for content input.
  • Elements:

* Text Editor: Rich text editor for headings, body text.

* Data Input Fields: Tables for manual data entry, CSV/Excel upload for bulk data.

* Image/Icon Uploader: Drag-and-drop or file selection for media assets.

* Asset Library: Pre-built library of icons, shapes, illustrations.

* AI Content Generation (Optional): Prompt-based text and data generation.

4.2. Step 2: Template & Style Selection

  • Layout: Gallery view of templates on the left, preview on the right.
  • Elements:

* Template Gallery: Filterable by category (e.g., Marketing, HR, Finance, Education), style (e.g., Modern, Minimalist, Vibrant).

* Theme/Style Presets: Pre-defined combinations of fonts, colors, and icon styles.

* Search Bar: To quickly find relevant templates.

* "Start from Scratch" Option: For advanced users.

4.3. Step 3: Customization & Editing

  • Layout: Central canvas (the infographic itself), left sidebar for element selection/layer management, right panel for property inspector.
  • Elements:

* Drag-and-Drop Canvas: Freely arrange elements (text blocks, images, charts, shapes).

* Contextual Toolbar: Appears when an element is selected, offering quick actions (duplicate, delete, align).

* Property Inspector (Right Panel):

* Text: Font family, size, color, weight, alignment, line height.

* Shapes: Color, border, opacity, corner radius.

* Images: Resize, crop, filters, opacity.

* Charts: Data editing, chart type selection, color scheme, axis labels, legends.

* Layout/Alignment Tools: Grid snapping, distribution, alignment guides.

* Layer Panel (Left Sidebar): Manage element stacking order, visibility, locking.

* Color Picker: Hex, RGB, HSL input, eyedropper tool, saved palettes.

* Undo/Redo: Standard functionality.

* Zoom & Pan: For detailed editing.

4.4. Step 4: Preview & Export

  • Layout: Full-screen preview of the infographic, with export options in a sidebar or modal.
  • Elements:

* Preview Mode: High-fidelity rendering of the final infographic.

* Export Options:

* Image Formats: PNG (transparent/opaque background), JPG (compressed).

* Vector Formats: PDF (print-ready), SVG (web-ready).

* Resolution Selector: Standard (72 DPI), Print (300 DPI).

* Quality Settings: Compression levels for JPG/PNG.

* Embed Code Generator: For web integration.

* Social Sharing Options: Direct share to platforms.

* "Save Draft" / "Publish" Buttons: For ongoing work management.

5. Color Palettes

A curated set of professional and versatile color palettes will be available, with the ability for users to define custom palettes.

5.1. Primary Interface Palette (for the Creator Tool UI)

  • Primary: #2C3E50 (Dark Navy - for primary navigation, main headers)
  • Secondary: #34495E (Dark Slate Gray - for secondary navigation, background panels)
  • Accent: #3498DB (Bright Blue - for interactive elements, primary buttons)
  • Success: #2ECC71 (Emerald Green)
  • Warning: #F39C12 (Orange)
  • Error: #E74C3C (Red)
  • Text: #ECF0F1 (Light Gray - on dark backgrounds), #333333 (Dark Gray - on light backgrounds)
  • Background: #F8F9FA (Light Off-White)

5.2. Standard Infographic Output Palettes (Examples)

Users can choose from these or create their own. All palettes will ensure sufficient contrast for accessibility (WCAG 2.1 AA compliant).

Palette 1: "Professional & Corporate"

  • Primary: #0A2463 (Deep Blue)
  • Secondary: #3E92CC (Sky Blue)
  • Accent 1: #A3B3CC (Light Steel Blue)
  • Accent 2:
infographic_creator.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);}});}