Mobile App Wireframe Kit
Run ID: 69cc88ee3e7fb09ff16a2cb02026-04-01Design
PantheraHive BOS
BOS Dashboard

Generate a complete mobile app wireframe specification with screen flows, component library, interaction patterns, and developer handoff notes.

Mobile App Wireframe Kit: Architectural Plan

This document outlines the architectural plan for developing a comprehensive Mobile App Wireframe Kit. The goal is to create a robust, reusable, and standardized resource that accelerates the wireframing process, ensures consistency across projects, and facilitates clear communication between design and development teams.


1. Introduction & Objectives

The Mobile App Wireframe Kit will serve as a foundational resource for quickly sketching and iterating on mobile application layouts and user flows. It will provide a standardized set of UI components, interaction patterns, and screen templates, enabling designers to focus on user experience and information architecture rather than individual pixel placement.

Key Objectives:

  • Efficiency: Drastically reduce the time required for wireframe creation.
  • Consistency: Ensure a uniform look, feel, and interaction across all wireframes and projects.
  • Clarity: Improve communication of design intent to stakeholders and developers.
  • Reusability: Provide a modular system of components and patterns that can be easily adapted.
  • Maintainability: Design for easy updates and expansion as design trends and platform guidelines evolve.

2. Core Principles & Design Philosophy

The kit will be built upon the following principles:

  • Atomic Design Methodology: Organizing components from smallest (atoms) to largest (pages) for maximum reusability and scalability.
  • Platform Agnosticism (with specific considerations): While aiming for general mobile patterns, the kit will acknowledge and provide options for key iOS Human Interface Guidelines (HIG) and Android Material Design principles where necessary.
  • Grayscale & Minimalist: Wireframes will primarily use grayscale to focus on layout, hierarchy, and functionality, avoiding premature aesthetic decisions. Limited accent colors may be used for interactive elements or states.
  • Annotated & Documented: Every component and pattern will include clear annotations regarding its purpose, usage, and intended interaction.
  • Scalable: Designed to easily accommodate new components, patterns, and platform-specific variations.

3. Kit Structure & Organization

The Wireframe Kit will be meticulously organized within the chosen design tool (e.g., Figma, Sketch) to ensure easy navigation and discoverability.

3.1. File Structure (within design tool project):

  • Page 1: 🏠 Home / Overview: Introduction, instructions, link to documentation.
  • Page 2: πŸ“š Component Library: All individual UI components (atoms, molecules, organisms).
  • Page 3: 🧩 Interaction Patterns: Common interaction flows and behaviors.
  • Page 4: πŸ–ΌοΈ Screen Templates: Pre-built common screen layouts.
  • Page 5: πŸ—ΊοΈ Screen Flows / User Journeys: Area for assembling wireframes into user flows.
  • Page 6: πŸ“ Annotations & Handoff: Legend for annotations, developer notes guidelines.
  • Page 7: βš™οΈ Utilities / Styles: Typography, color palette, spacing guides, grid systems.

3.2. Naming Conventions:

  • Components: [Category]/[Component Name]/[State] (e.g., Button/Primary/Default, Input Field/Text/Active)
  • Pages: Clear, descriptive names as listed above.
  • Layers: Use logical, human-readable names to identify elements.

4. Key Components & Categories

The kit will be structured to provide a comprehensive range of elements, categorized for easy access.

4.1. Utilities & Foundations:

  • Grid System: Standardized 8pt/4pt base grid for consistent spacing and alignment.
  • Typography Scale: Defined heading, body, and caption styles (grayscale).
  • Color Palette: Primarily grayscale with limited accent colors for interactive elements, errors, and success states.
  • Spacing Tokens: Pre-defined spacing values (e.g., small, medium, large).
  • Iconography: A basic set of common mobile icons (outline style, grayscale).

4.2. Component Library (Atomic Design Hierarchy):

  • Atoms (Basic UI Elements):

* Buttons: Primary, secondary, tertiary, text-only, icon buttons (various states: default, pressed, disabled, loading).

* Input Fields: Text, password, number, email, search (various states: empty, filled, focused, error, disabled).

* Checkboxes & Radio Buttons: Single and group selections (various states).

* Toggles/Switches: On/off states.

* Sliders: Single and range sliders.

* Progress Indicators: Linear, circular.

* Avatars: User profile images (placeholder shapes).

* Chips/Tags: Small interactive labels.

* Icons: Core set of functional icons.

  • Molecules (Groups of Atoms):

* Forms: Simple login, registration, search forms.

* Navigation Bars: Top app bars (header), bottom navigation bars, tab bars.

* Cards: Content containers with various layouts (image + text, text only).

* List Items: Single-line, two-line, with/without icons, avatars, actions.

* Dialogs/Modals: Basic alert, confirmation, input dialogs.

* Toasts/Snackbars: Temporary notifications.

* Date/Time Pickers: Basic calendar and time selection.

  • Organisms (Groups of Molecules & Atoms):

* Headers & Footers: More complex app headers with search, profile, notifications.

* Complex Forms: Multi-step forms, settings pages.

* Item Details Views: Comprehensive display of product or user details.

* Empty States: Placeholder components for empty lists, search results, etc.

* Onboarding Flows: Basic welcome screens and walkthrough indicators.

4.3. Interaction Patterns:

  • Navigation:

* Drawer/Hamburger Menu (collapsed/expanded states).

* Tab Bar navigation (active/inactive states).

* Bottom Navigation (active/inactive states).

* Breadcrumbs (if applicable for deeper hierarchies).

* Back button behavior.

  • Data Entry:

* Form validation feedback (error messages).

* Text input focus states and keyboard display.

* Dropdown/Picker interactions.

  • Feedback & Confirmation:

* Loading states for data fetching.

* Success/Error messages (toasts, alerts).

* Confirmation dialogs for destructive actions.

  • Gestures:

* Swipe to delete/archive.

* Pull to refresh.

* Long press actions.

* Pinch to zoom (represented by annotations).

4.4. Screen Templates:

  • Common Layouts:

* Login/Signup screen.

* Home/Dashboard screen.

* List/Feed screen.

* Detail screen.

* Settings screen.

* Profile screen.

* Search results screen.

* Onboarding carousel.

  • These templates will be built using the kit's components and serve as starting points for new wireframes.

5. Screen Flows & User Journeys Strategy

The kit will provide a dedicated area and methodology for assembling individual wireframes into coherent user flows.

  • Flow Connectors: Standardized arrows and labels to indicate navigation paths and actions between screens.
  • User Scenarios: Each flow will be prefaced with a brief description of the user persona and the task they are trying to accomplish.
  • State Representation: Clearly show different states of a screen within a flow (e.g., empty state, loaded state, error state).
  • Annotations: Critical for explaining conditional logic, specific interactions, and system responses within a flow.

6. Platform-Specific Considerations

While aiming for a largely platform-agnostic base, the kit will include options or guidelines for adapting to iOS and Android nuances:

  • Navigation Bars: Separate components for iOS-style (centered title, left back button) and Android-style (left-aligned title, hamburger/back icon).
  • Alerts/Modals: Distinct visual styles for native iOS and Android alerts.
  • Input Fields: Subtle differences in styling (e.g., rounded corners for iOS, underline for Android).
  • System Icons: Option to use platform-specific icons where appropriate (e.g., share sheets).

7. Tooling Strategy

The Mobile App Wireframe Kit will be developed in Figma.

Rationale for Figma:

  • Collaboration: Real-time multi-user editing is essential for team projects.
  • Component Library: Robust component system with variants, properties, and auto-layout.
  • Prototyping: Built-in prototyping capabilities for demonstrating interaction patterns and flows.
  • Developer Handoff: Excellent developer handoff features, including inspect mode and code snippets.
  • Accessibility: Web-based, making it accessible to team members regardless of OS.

8. Version Control & Maintenance Strategy

  • Main File: A single, authoritative "Source of Truth" Figma file for the Wireframe Kit.
  • Versioning: Utilize Figma's built-in version history for tracking changes and allowing rollbacks. Major updates will be clearly documented.
  • Release Cycles: Establish a clear process for reviewing, approving, and releasing updates to the kit.
  • Documentation: Maintain a separate, linked documentation (e.g., Notion, Confluence) for detailed usage guidelines, update logs, and design principles.
  • Feedback Loop: Establish channels for designers to provide feedback and suggest new components or improvements.

9. Developer Handoff Strategy

Effective communication with developers is paramount. The kit will facilitate this through:

  • Clear Annotations:

* Interaction Notes: Describe how elements behave (e.g., "On tap, navigate to X," "Swipe left to delete").

* Conditional Logic: Explain when elements appear or disappear (e.g., "Error message appears if input is invalid").

* Edge Cases: Notes on empty states, loading states, and error states.

  • Figma Inspect Mode: Developers can directly access CSS/iOS/Android code snippets, measurements, spacing, and color values.
  • Component Naming: Consistent naming in the design tool will map directly to potential code component names.
  • Style Guide Integration: Link to the kit's typography, color, and spacing guidelines, which should ideally align with development's design tokens.
  • Exportable Assets: Icons and other necessary graphics will be easily exportable from Figma in appropriate formats (SVG, PNG).
  • Dedicated Handoff Screens: Create specific pages within the Figma file for developer-focused details, explaining complex interactions or specific implementation notes.

This architectural plan provides a solid foundation for the development of a professional and highly effective Mobile App Wireframe Kit. The next steps will involve the detailed design and implementation of each section outlined above within the chosen design tool.

gemini Output

This document provides a comprehensive wireframe specification for the TaskFlow mobile application, detailing screen flows, a reusable component library, interaction patterns, and critical developer handoff notes. The aim is to provide a clear, actionable blueprint for development, ensuring consistency and a high-quality user experience.


Mobile App Wireframe Specification: TaskFlow

Project Title: TaskFlow - Mobile Task Management Application

Version: 1.0.0

Date: October 26, 2023

Designer: [PantheraHive AI]


1. Screen Flows

This section outlines the primary user journeys within the TaskFlow application, detailing the sequence of screens and transitions. Each screen is identified by a unique screen_id.

gemini Output

Mobile App Wireframe Kit: Complete Specification

Project: [Your Project Name Here]

Version: 1.0

Date: October 26, 2023

Prepared For: [Customer Name/Team]

Prepared By: PantheraHive


1. Introduction & Overview

This document provides a comprehensive wireframe specification for the [Your Mobile App Name] mobile application. It serves as a foundational blueprint, outlining the core user experience, key screen layouts, interactive elements, and overall information architecture. This "Wireframe Kit" is designed to facilitate clear communication between design, product, and development teams, ensuring a shared understanding of the app's functionality and user flows before detailed visual design begins.

Purpose of this Document:

  • To define the structural and functional aspects of the mobile application.
  • To visualize the user journey through key screen flows.
  • To establish a consistent component library for reusable UI elements.
  • To detail essential interaction patterns for user engagement.
  • To provide actionable notes for developers during implementation.

Scope:

This specification covers the initial set of features and user flows identified for the [Your Mobile App Name] application, focusing on core functionality and primary user journeys. It represents a low-fidelity representation, prioritizing usability and functionality over final aesthetics.


2. Screen Flows

This section details the primary user flows within the application, illustrating the sequence of screens a user will navigate to complete specific tasks. Each flow is described with its purpose and the key screens involved.

(Note: In a live deliverable, each flow would be accompanied by a visual diagram or linked wireframe mockups for each screen.)

2.1. Onboarding & Account Setup Flow

  • Purpose: To guide new users through the initial setup, highlight key app benefits, and create an account.
  • Screens Involved:

* Splash Screen: App logo and loading indicator.

* Welcome/Intro Screens (x3): Swipeable screens highlighting core features with short descriptions and illustrations.

* Sign Up/Log In Screen: Options to register via email/password, Google, Apple, or log in if existing user.

* Profile Creation (Optional): Input for name, profile picture, preferences.

* Permissions Request: Push notifications, location access (if applicable).

* Home Screen (First View): Landing page upon successful onboarding.

2.2. Main Feature X (e.g., Task Creation Flow)

  • Purpose: To allow users to create and manage a new task efficiently.
  • Screens Involved:

* Home Screen: Access point (e.g., "+" button or dedicated section).

* New Task Screen:

* Input field for task title.

* Text area for description.

* Date/Time Picker for due date.

* Category/Tag Selector (multi-select).

* Priority Selector (Low, Medium, High).

* Attachment option (photo/file).

* "Save" button.

* Confirmation/Success Toast: Brief feedback upon saving.

* Home Screen (Updated): Displaying the newly added task.

2.3. Profile Management & Settings Flow

  • Purpose: To enable users to view and update their personal information and app settings.
  • Screens Involved:

* Profile Icon/Menu Item: Access point from Home or Navigation.

* Profile View Screen: Displays user's name, email, profile picture, and summary info. Edit button available.

* Edit Profile Screen: Editable fields for name, email, password change, profile picture upload. "Save Changes" button.

* Settings Screen:

* Notification preferences (toggle switches).

* App theme (light/dark mode).

* Language selection.

* Privacy settings.

* "About Us" / "Help" / "Log Out" options.

* Confirmation Dialogs: For sensitive actions like "Log Out" or "Delete Account."


3. Component Library

This section defines the reusable UI components that will form the building blocks of the application. Each component is described with its purpose, common states, and usage guidelines. This promotes consistency and accelerates development.

(Note: In a live deliverable, each component would be accompanied by a visual wireframe example.)

3.1. Navigation Elements

  • Top Bar/App Bar:

* Purpose: Provides global navigation, branding, and contextual actions.

* Elements: App logo/title, back button, menu icon (hamburger), action icons (e.g., search, notifications).

* States: Default, with back button, with action icons.

  • Bottom Navigation Bar:

* Purpose: Persistent navigation for primary app sections.

* Elements: 3-5 iconic tabs with optional text labels.

* States: Active tab, inactive tab.

  • Side Drawer (Hamburger Menu):

* Purpose: For secondary navigation or less frequently accessed features.

* Elements: List of menu items, user profile summary, logout.

3.2. Input Controls

  • Text Input Field:

* Purpose: Allows users to enter text.

* States: Default, focused, filled, error, disabled.

* Variations: Single line, multi-line (text area), secure (password).

* Guidelines: Use clear labels, placeholder text, and appropriate keyboard types.

  • Buttons:

* Purpose: To trigger actions.

* Types:

* Primary Button: Main call to action (e.g., "Save," "Submit").

* Secondary Button: Less prominent actions (e.g., "Cancel," "Learn More").

* Ghost/Outline Button: Tertiary actions, often for navigation or less critical actions.

* Icon Button: Button with only an icon (e.g., "Delete," "Share").

* States: Default, hover (if applicable), pressed, disabled, loading.

  • Checkboxes & Radio Buttons:

* Purpose: To allow single or multiple selections from a list of options.

* States: Unchecked, checked, disabled.

  • Toggle Switch:

* Purpose: To switch between two states (on/off).

* States: Off, On, Disabled.

  • Date/Time Picker:

* Purpose: To select specific dates and/or times.

* Variations: Calendar view, spinner view.

3.3. Information Display

  • Cards:

* Purpose: To group related content into a distinct, actionable container.

* Elements: Title, subtitle, image, description, action buttons/icons.

* Usage: Lists of items, dashboards, notifications.

  • Lists:

* Purpose: To display a series of related items.

* Variations: Simple text lists, lists with icons, lists with avatars, swipeable lists (for actions).

  • Modals / Dialogs:

* Purpose: To grab user attention for important information or critical actions.

* Types: Alert dialogs, confirmation dialogs, full-screen modals for complex input.

* Elements: Title, message, primary action button(s), secondary action button(s), close icon.

  • Toasts / Snackbars:

* Purpose: Brief, non-intrusive feedback messages.

* Elements: Short text message, optional action button (e.g., "Undo").

* Behavior: Appears temporarily, disappears automatically.


4. Interaction Patterns

This section outlines common interaction patterns that users will employ to navigate and engage with the application. Consistency in these patterns enhances usability and learnability.

4.1. Navigation Interactions

  • Tap: Primary interaction for activating buttons, selecting items, opening links.
  • Swipe:

* Horizontal Swipe: For navigating between tabs, dismissing items (e.g., swiping left to delete a list item), or viewing carousels.

* Vertical Swipe: For scrolling content.

  • Pull-to-Refresh: Pulling down on a list or feed to load new content.
  • Long Press: To reveal contextual menus or activate multi-select modes.

4.2. Feedback & States

  • Loading States:

* Spinners/Progress Indicators: For short waits (e.g., submitting a form).

* Skeleton Screens: For longer waits, showing a placeholder structure of the content to come.

  • Error States:

* Inline Error Messages: Below input fields for validation errors.

* Error Toasts/Snackbars: For non-critical, temporary errors.

* Full-Screen Error Pages: For critical errors (e.g., no internet connection, server error), with retry options.

  • Empty States:

* Purpose: To inform users when a section has no content (e.g., "No tasks yet").

* Elements: Illustration, descriptive text, clear call to action (e.g., "Create your first task").

  • Success States:

* Success Toasts/Snackbars: Brief confirmation of successful actions.

* Confirmation Dialogs: For critical success messages requiring user acknowledgment.

4.3. Data Entry Interactions

  • Form Validation: Real-time feedback for invalid inputs (e.g., red border, error text).
  • Auto-Save/Drafts: For complex forms, automatically saving user input to prevent data loss.
  • Search:

* Instant Search: Results update as the user types.

* Search History/Suggestions: Displaying recent searches or popular queries.


5. Developer Handoff Notes

This section provides critical information and considerations for the development team to ensure a smooth and accurate implementation of the wireframe specification.

5.1. General Implementation Guidelines

  • Platform Agnostic Approach: Wireframes are designed with a mobile-first, platform-agnostic approach. Specific platform UI guidelines (iOS Human Interface Guidelines, Android Material Design) will be applied during the high-fidelity design phase or by developers where appropriate, especially for native components.
  • Responsiveness: All layouts should be designed to be responsive and adapt gracefully to various screen sizes and orientations (portrait/landscape) within the mobile ecosystem.
  • Accessibility:

* Ensure all interactive elements have appropriate touch target sizes (minimum 44x44 dp/pt).

* Implement proper semantic HTML/component roles for screen readers.

* Consider color contrast for text and interactive elements (WCAG 2.1 AA standards as a goal).

  • Performance:

* Prioritize smooth transitions and animations.

* Lazy loading for images and lists should be considered to optimize initial load times.

* Minimize redundant network requests.

5.2. Component Usage & States

  • Reusability: Developers should leverage a component-based architecture to build the UI elements defined in Section 3.
  • State Management: Pay close attention to all defined component states (default, focused, pressed, disabled, error, loading, empty). Each state must be visually distinct and correctly implemented.
  • Interaction Logic: The interaction patterns described in Section 4 are critical. Developers should ensure these are implemented consistently across the application.

5.3. Data & API Considerations

  • Placeholder Data: The wireframes use placeholder text and imagery. Developers will integrate with actual data from the backend APIs.
  • Error Handling: Implement robust error handling for API calls, network issues, and invalid data, displaying user-friendly messages as outlined in the Interaction Patterns.
  • Data Loading: Implement appropriate loading indicators (spinners, skeleton screens) for data fetching operations.

5.4. Navigation & Routing

  • Deep Linking: Consider support for deep linking to specific screens or content within the app.
  • Back Stack Management: Ensure correct navigation stack behavior, especially for complex flows or when returning from external links.
  • Authentication: Implement secure user authentication and session management.

5.5. Future Considerations

  • Localization: Design considerations for text expansion in different languages should be kept in mind for future localization efforts.
  • Theming: While not explicitly defined in wireframes, the structure should allow for easy implementation of dark mode or custom themes if planned for future releases.

6. Conclusion & Next Steps

This wireframe specification serves as the essential groundwork for the [Your Mobile App Name] mobile application. It provides a detailed functional and structural outline, enabling a clear path forward for subsequent design and development phases.

Next Steps:

  1. Review & Feedback: The project team will review this document and provide feedback to refine any aspects of the wireframes, screen flows, or component definitions.
  2. High-Fidelity Design: Upon approval, this specification will guide the creation of high-fidelity mockups and a detailed UI design system, incorporating branding, colors, typography, and refined visual aesthetics.
  3. Prototyping: Interactive prototypes will be developed based on the high-fidelity designs to test user flows and gather user feedback.
  4. Development Planning: The development team will use this document, alongside the high-fidelity designs, to plan implementation, estimate effort, and commence coding.

We look forward to collaborating closely with your team to bring this vision to life.

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