Infographic Creator
Run ID: 69cbd57761b1021a29a8cb2f2026-03-31Design
PantheraHive BOS
BOS Dashboard

As part of the "Infographic Creator" workflow, this deliverable outlines the comprehensive design requirements necessary to produce professional, engaging, and highly informative infographics. This detailed specification will guide the subsequent steps in developing a robust and user-friendly creation tool.


1. Infographic Design Specifications

These specifications define the core structural and content elements for effective infographic generation, ensuring clarity, impact, and versatility.

1.1 Core Infographic Elements

Every infographic generated will support the following key components:

  • Headline/Title: Prominent, concise, and engaging to immediately capture attention and convey the main topic.
  • Subtitle/Introduction: A brief lead-in that sets the context, outlines the infographic's purpose, or presents a compelling overview.
  • Key Data Points/Statistics: Clearly presented numerical data, percentages, or facts, often highlighted visually for quick comprehension.
  • Visualizations: A diverse range of chart types (bar, line, pie, donut, area, scatter), graphs, pictograms, and custom illustrations to represent data effectively.
  • Text Blocks/Explanations: Concise paragraphs or bullet points that provide context, elaborate on visuals, or offer deeper insights.
  • Process/Timeline Sections (Optional): Structured visual flows for depicting steps, sequences, or historical progression.
  • Comparison Sections (Optional): Side-by-side or stacked layouts for contrasting multiple items, concepts, or data sets.
  • Geographic Data (Optional): Integration of maps or location-based visuals to represent spatial information.
  • Iconography: A library of relevant, high-quality icons to enhance visual communication and reduce text load.
  • Call to Action (Optional): A clear directive (e.g., "Learn More," "Visit Website," "Download Report") if the infographic serves a marketing or lead generation purpose.
  • Sources/Credits: Legible attribution for all data, statistics, and external content to ensure credibility.
  • Branding Elements: Dedicated areas for user-uploaded logos, brand colors, and specified typography to maintain corporate identity.

1.2 Output Formats & Dimensions

The system will support the generation of infographics in various formats and aspect ratios to suit diverse distribution channels:

  • Image Files:

* PNG: High-quality, lossless compression for web and digital presentations.

* JPG: Efficient compression for web display where file size is critical.

  • PDF: Vector-based for print-ready quality and universal shareability.
  • SVG (Scalable Vector Graphics): (Advanced Feature Consideration) For infinitely scalable, high-quality graphics on the web.
  • Standard Dimensions/Aspect Ratios:

* Vertical (Standard): 800px-1200px width, 2000px-5000px height (ideal for blogs, Pinterest, long-form content).

* Horizontal (Presentation/Report): 1920x1080px (16:9) or 1024x768px (4:3) (suitable for presentations, reports, slides).

* Square (Social Media): 1080x1080px (optimized for Instagram, Facebook, LinkedIn feeds).

* Custom Dimensions: Users will have the flexibility to define exact width and height specifications.

1.3 Content Input Requirements

The system will facilitate easy input for all infographic components:

  • Text Input: Dedicated fields for headlines, body copy, data descriptions, and source information.
  • Numerical Data Input: Structured fields for entering data points, percentages, and values, supporting direct input or CSV/Excel upload for charts and graphs.
  • Visual Asset Selection: Integration with an icon library, illustration library, and the ability for users to upload their own images.
  • Theme/Template Selection: A curated set of pre-designed templates and style themes to kickstart creation.

2. Wireframe Descriptions

Wireframes define typical layout structures, ensuring optimal information hierarchy, visual flow, and ease of customization. All templates will be built using a modular design approach, allowing users to reconfigure and combine blocks.

2.1 General Wireframe Principles

  • Logical Flow: Information will progress naturally, typically from top-to-bottom, guiding the viewer through the narrative.
  • Visual Grouping: Related content will be grouped using proximity, distinct background colors, or subtle dividers to enhance comprehension.
  • Whitespace Optimization: Ample negative space will be maintained around elements to prevent visual clutter and improve readability.

2.2 Proposed Wireframe Templates

Template 1: "The Narrative Flow" (Vertical)

  • Header Block:

* Optional Brand Logo (top-left/right).

* Main Title: Large, bold, centered.

* Subtitle: Smaller, descriptive text below the title.

  • Introduction Block:

* Large hero image or prominent icon.

* Concise introductory paragraph setting the stage.

  • Data Section A (Visual Focus):

* Heading: Clear and descriptive.

* Primary Data Visualization (e.g., Bar Chart, Line Graph).

* Brief supporting text/key takeaway.

  • Data Section B (Icon/Statistic Focus):

* Heading: Clear and descriptive.

* Prominent statistic or icon array.

* Short explanatory text.

  • **Process/Steps Block (Optional):
gemini Output

Infographic Design Specifications: A Comprehensive Guide

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for your upcoming infographic. The goal is to create a visually engaging, highly informative, and professional infographic that effectively communicates complex information in an easily digestible format.


1. Detailed Design Specifications

These specifications define the visual language and core aesthetic principles for the infographic.

  • Overall Theme & Style:

* Modern & Clean: Emphasize clarity, simplicity, and a contemporary aesthetic. Avoid clutter and overly ornate elements.

* Professional & Authoritative: Maintain a credible and trustworthy tone suitable for business or educational contexts.

* Data-Driven & Engaging: Visually prioritize data and key insights while ensuring the design captivates the audience.

  • Layout & Structure:

* Grid-Based System: Utilize a consistent grid to ensure alignment, balance, and modularity across all elements.

* Clear Information Hierarchy: Employ visual cues (size, color, placement, white space) to guide the viewer's eye through the content in a logical flow (typically top-to-bottom).

* Ample White Space: Strategic use of negative space is crucial for improving readability, reducing visual fatigue, and highlighting key information.

* Sectional Breakdown: Divide the infographic into distinct, digestible sections, each focusing on a specific point or data set.

  • Typography:

* Heading Font (H1, H2, H3): A strong, legible sans-serif font (e.g., Montserrat, Lato, Poppins, Open Sans Bold). Use varying weights and sizes to establish hierarchy.

Example:* H1: 36-48pt (bold); H2: 24-32pt (semi-bold); H3: 18-22pt (medium).

* Body Text Font: A highly readable sans-serif font (e.g., Open Sans Regular, Roboto, Lato Light). Ensure sufficient line height (1.4-1.6x font size) for optimal legibility.

Example:* Body Text: 12-14pt; Captions/Sources: 10-11pt.

* Font Pairing: Limit to 2-3 distinct fonts (one for headings, one for body, an optional accent font for numbers or specific callouts) to maintain consistency and professionalism.

  • Iconography:

* Style: Flat, line-art, or minimalist filled icons. Consistency in style is paramount across the entire infographic.

* Purpose: To visually represent concepts, break up text, enhance understanding, and add visual interest without distracting from the data.

* Relevance: Icons must directly relate to the information they accompany.

  • Imagery & Illustrations:

* Style: Vector-based illustrations, abstract shapes, or high-quality, relevant photography (if applicable, ensure consistent filter/style).

* Purpose: To create visual appeal, explain complex ideas, reinforce the narrative, and break monotony.

* Data Visualization Elements: Professionally designed charts, graphs, maps, and diagrams that are clear, concise, and easy to interpret. Avoid 3D effects or excessive embellishments.

  • Color Usage: (Detailed palettes provided in Section 3)

* Functional Use: Colors will be used to define sections, highlight key data points, differentiate categories in charts, and guide the viewer's eye.

* Brand Alignment: The chosen palette will align with your brand identity or the desired mood of the infographic.


2. Wireframe Descriptions

The following describes common sections and their arrangement within a typical infographic wireframe, providing a flexible template.

2.1. Header Section

  • Objective: Capture attention, state the topic, and provide immediate context.
  • Elements:

* Brand Logo (Optional): Top-left or top-right corner.

* Infographic Title (H1): Prominent, concise, and engaging title.

* Subtitle/Hook (H2): A brief, compelling statement that clarifies the infographic's value or main takeaway.

* Hero Visual: A large, captivating image, abstract graphic, or key data visualization that visually represents the central theme.

  • Layout: Full-width banner, clearly distinguishing it as the entry point.

2.2. Introduction / Key Takeaway Section

  • Objective: Provide a quick overview or highlight the most impactful statistic upfront.
  • Elements:

* Main Statistic/Fact (H2/Large Number): A single, powerful data point or a concise summary of the infographic's core message.

* Brief Introduction (Body Text): 1-3 sentences setting the context or explaining the problem/opportunity addressed.

* Supporting Icon/Illustration: A small, relevant visual element.

  • Layout: Often a single column below the header, serving as a bridge to the detailed content.

2.3. Core Data & Information Sections (Modular & Repeatable)

  • Objective: Present specific data points, statistics, and explanations in digestible chunks. These sections will form the bulk of the infographic.
  • Elements (per module):

* Section Title (H2/H3): Clearly states the topic of the current module.

* Key Statistic/Fact (H3 or Large Number): Highlight a critical piece of data within the section.

* Supporting Text (Body Text): Concise explanations, context, or further details, often using bullet points.

* Visual Element:

* Data Visualization: A chart (bar, line, pie, area, pictogram), graph, or map relevant to the section's data.

* Icon Set: A group of icons visually representing points.

* Custom Illustration: A bespoke graphic to explain a concept.

  • Layout Variations:

* Single Column: Title at top, followed by text and visual.

* Two-Column: Text on one side, visual on the other, for a balanced look.

* Multi-Panel: Smaller, distinct blocks within a section, each with a mini-title, icon, and short text.

* Process Flow: For showing steps or timelines, using arrows and numbered points.

* Comparison: Side-by-side layout for contrasting data points or options.

2.4. Call to Action (CTA) / Conclusion Section

  • Objective: Summarize the findings, provide a clear next step, and attribute sources.
  • Elements:

* Concluding Thought (H2/H3): A final summary statement or key takeaway.

* Clear Call to Action: A prominent, actionable phrase (e.g., "Download the Full Report," "

gemini Output

Finalized Design Assets: Infographic Creator

This document outlines the comprehensive design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Infographic Creator" platform. The goal is to deliver a professional, intuitive, and highly functional tool that empowers users to create compelling infographics with ease and efficiency.


1. Design Specifications

The Infographic Creator aims to be a modern, clean, and highly customizable platform. The design principles prioritize clarity, usability, and visual appeal, ensuring both the interface and the output infographics are professional and engaging.

1.1. Target Audience

The primary users include:

  • Marketers: Creating visual content for campaigns, social media, and reports.
  • Educators & Students: Designing educational materials, presentations, and project summaries.
  • Small Business Owners: Developing promotional materials, business reports, and internal communications.
  • Content Creators: Producing engaging visuals for blogs, websites, and presentations.
  • General Users: Individuals seeking to visualize information effectively without extensive design skills.

1.2. Core Functionality (Brief Overview)

The platform will support:

  • Template-Based Creation: A rich library of professionally designed, categorized templates.
  • Drag-and-Drop Editor: Intuitive interface for adding, moving, and resizing elements.
  • Data Visualization Tools: Customizable charts (bar, line, pie, area, scatter) and graphs.
  • Rich Asset Library: Icons, shapes, illustrations, stock photos, and background patterns.
  • Text & Typography Tools: Extensive font options, text effects, and formatting controls.
  • Image & Media Upload: Support for user-uploaded images, logos, and branding elements.
  • Collaboration Features: Sharing, commenting, and team editing (optional advanced feature).
  • Export & Sharing: Multiple formats (PNG, JPG, PDF, SVG) and direct sharing options.

1.3. Key Design Principles

  • Clarity & Simplicity: Minimalistic UI to reduce cognitive load, focusing user attention on the creation canvas.
  • Intuitive & Accessible: Easy-to-learn interactions, logical workflows, and adherence to accessibility standards (WCAG 2.1 AA).
  • Modern & Professional: Clean aesthetics, contemporary typography, and consistent visual language.
  • Customizable & Flexible: Empowering users with extensive customization options while maintaining design integrity.
  • Performance-Oriented: Fast loading times, smooth transitions, and responsive interactions.

1.4. Typography

  • Primary Font (UI & Headings): A modern sans-serif typeface, highly readable at various sizes (e.g., Inter, Roboto, Open Sans).

* Usage: Interface elements, primary headings within infographics.

* Weights: Light, Regular, Medium, Semi-Bold, Bold.

  • Secondary Font (Body Text): A versatile sans-serif or a complementary serif font for readability in longer content (e.g., Lato, Source Sans Pro, Merriweather).

* Usage: Body text, captions, data labels within infographics.

* Weights: Regular, Semi-Bold.

  • Font Sizing:

* H1: 48-64px (Infographic Titles)

* H2: 36-48px (Section Titles)

* H3: 24-32px (Sub-headings)

* Body: 16-20px (Main text content)

* Captions/Labels: 12-14px

1.5. Iconography

  • Style: Consistent outline or filled-flat style. Prioritize clarity and immediate recognition.
  • Usage: Navigation, toolbar actions, asset categories, feature indicators.
  • Source: Utilize a well-maintained icon library (e.g., Font Awesome, Material Icons, Feather Icons) or custom-designed sets.

1.6. Imagery & Illustrations

  • Stock Photos: Integration with high-quality, diverse stock photo libraries (e.g., Unsplash, Pexels) for direct access.
  • Illustrations: Provide a library of vector illustrations in various styles (e.g., flat, isometric, duotone) to enhance visual storytelling.
  • User Uploads: Clear guidelines and tools for image cropping, resizing, and basic adjustments (brightness, contrast).

1.7. Responsiveness

  • Editor Interface: Optimized for desktop and larger tablet screens. A simplified "view-only" mode or mobile-specific editor for minor edits might be considered for mobile.
  • Generated Infographics: Exported infographics should be readable and visually appealing across different devices, with scalable vector graphics (SVG) being a preferred export option.

1.8. Accessibility

  • Color Contrast: All text and interactive elements must meet WCAG 2.1 AA contrast ratios.
  • Keyboard Navigation: Full keyboard navigability for all interactive UI elements.
  • Screen Reader Support: Proper ARIA attributes and semantic HTML for screen reader compatibility.
  • Descriptive Alt Text: Prompt users to add alt text for uploaded images.

2. Wireframe Descriptions

The following outlines the structure and key interactions for the primary screens of the Infographic Creator.

2.1. Dashboard / Project Selector

  • Layout:

* Header (Top): Logo, User Profile/Account menu, "Create New Infographic" button.

* Sidebar (Left): Main navigation (e.g., "My Infographics," "Templates," "Brand Kits," "Tutorials," "Settings").

* Main Content Area:

* Search Bar & Filters: For finding specific infographics or templates.

* Project Cards/List: Displays user's existing infographics with thumbnails, title, last modified date, and quick actions (Edit, Duplicate, Share, Delete).

* "Recent Projects" section: Prominent display of recently edited infographics.

* "Recommended Templates" / "Popular Templates" section: To inspire new creations.

  • User Flow: Users land here after login, can browse existing projects, start new ones from scratch or templates, and manage their account.

2.2. Template Selection

  • Layout:

* Header (Top): Logo, "Back to Dashboard" link, Search bar for templates.

* Sidebar (Left): Template categories (e.g., Business, Education, Marketing, Healthcare, Personal, Data Visualization). Filters (e.g., Free/Premium, Orientation: Vertical/Horizontal, Color Schemes).

* Main Content Area:

* Template Gallery: Grid view of high-resolution template thumbnails. Each thumbnail shows title, brief description, and a "Preview" or "Use This Template" button on hover.

  • User Flow: Users navigate through categories, filter options, preview templates, and select one to start editing.

2.3. Editor Interface (Main Canvas)

  • Layout:

* Top Toolbar:

* Logo/Home button, Infographic Title (editable), Undo/Redo, Zoom controls, Responsive View toggles (desktop/tablet/mobile preview), "Share" and "Export" buttons.

* Left Panel (Asset/Tool Panel):

* Tabbed interface for:

* Templates: Quick access to template library.

* Text: Add text boxes (headings, subheadings, body), font presets.

* Elements: Shapes, lines, icons, illustrations, stickers.

* Charts: Bar, line, pie, area, scatter, progress rings.

* Photos: Stock photos, user uploads.

* Backgrounds: Solid colors, gradients, patterns, images.

* Uploads: User's uploaded images, logos, brand assets.

* Brand Kit: Access to user-defined brand colors, fonts, logos.

* Central Canvas:

* The main workspace where the infographic is built. Drag-and-drop enabled. Rulers, grid lines, and snapping guides for precise placement.

* Contextual selection handles for resizing, rotating, and moving elements.

* Right Panel (Contextual Properties Panel):

* Dynamically changes based on the selected element.

* Text: Font family, size, color, bold/italic/underline, alignment, line height, letter spacing, effects.

* Shapes/Icons: Color fill, border, opacity, shadow.

* Images: Crop, mask, filters, adjustments (brightness, contrast, saturation).

* Charts: Data input table, chart type selector, color scheme, axis labels, legends.

* Canvas: Background color/image, canvas size, grid settings.

  • User Flow: Users select elements from the left panel, drag them onto the canvas, and use the right panel to customize their properties. Undo/redo for quick corrections.

2.4. Data Input / Visualization Panel (within Editor)

  • Layout: Integrated within the Right Panel when a chart element is selected.

* Data Table: Spreadsheet-like interface for entering or pasting data.

* Import Data: Button to upload CSV, Excel, or connect to Google Sheets.

* Chart Type Selector: Dropdown or visual icons to change chart type (e.g., bar to pie).

* Data Mapping: Drag-and-drop fields for X-axis, Y-axis, Series, etc.

* Chart Customization: Color palette for chart segments, axis labels, legend visibility, data labels, animation options.

  • User Flow: Users select a chart, input data manually or import, and customize its appearance to visualize their information effectively.

2.5. Export & Share Options

  • Layout: A modal window triggered by "Export" or "Share" buttons.

* Export Tab:

* File Format: Dropdown (PNG, JPG, PDF, SVG).

* Quality/Resolution: Slider or options (e.g., Standard, High, Print).

* Page Range: For multi-page infographics.

* Download Button.

* Share Tab:

* Public Link: Toggle to generate a shareable URL, copy button.

* Embed Code: For website integration.

* Social Media Sharing: Direct links to Facebook, Twitter, LinkedIn, Pinterest.

* Email Sharing: Option to send via email.

* Collaboration Invite: Input field for email addresses, permission levels (View, Comment, Edit).

  • User Flow: Users select their desired output format or sharing method, configure options, and finalize the process.

3. Color Palettes

3.1. UI Interface Palette (Creator Platform)

This palette ensures a clean, professional, and intuitive user interface for the Infographic Creator itself.

  • Primary Accent:

* Name: Panthera Teal

* Hex: #00B5AD

* RGB: 0, 181, 173

* Use: Primary calls to action (buttons), active states, key highlights, branding elements.

  • Secondary Accent:

* Name: Deep Teal

* Hex: #008C86

* RGB: 0, 140, 134

* Use: Hover states for primary actions, subtle branding accents, progress indicators.

  • Backgrounds & Neutrals:

* Name: Light Gray Background

* Hex: #F8F9FA

* RGB: 248, 249, 250

* Use: Main application background, panel backgrounds.

* Name: Medium Gray

* Hex: #E9ECEF

* RGB: 233, 236, 239

* Use: Borders, separators, disabled states, secondary backgrounds.

* Name: Dark Gray Text

* Hex: #343A40

* RGB: 52, 58, 64

* Use: Primary text, headings, icons.

* Name: Light Gray Text

* Hex: #6C757D

* RGB: 108, 117, 125

* Use: Secondary text, captions, placeholder text.

  • Semantic Colors:

*

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