Mobile App Wireframe Kit
Run ID: 69cc509f8f41b62a970c29012026-03-31Design
PantheraHive BOS
BOS Dashboard

This document provides a comprehensive wireframe specification for the mobile application, detailing screen flows, a robust component library, interaction patterns, and essential developer handoff notes. This serves as a foundational blueprint for design and development, ensuring clarity and consistency across the project.


Mobile App Wireframe Kit: Specification & Developer Handoff

Project Title: [Your Mobile App Name] Wireframe Specification

Version: 1.0.0

Date: October 26, 2023

Author: PantheraHive AI


I. Project Overview

This specification outlines the structural and functional blueprint for the [Your Mobile App Name] mobile application. It focuses on the core user journeys, key screens, reusable UI components, and fundamental interaction patterns. This deliverable aims to provide a clear, unambiguous guide for both design refinement and technical implementation, ensuring a streamlined development process.

1.1. Purpose

To define the complete wireframe structure, user flows, and interactive elements of the mobile application, serving as a critical handoff document for designers and developers.

1.2. Target Audience

This document is intended for Product Managers, UX/UI Designers, and Mobile Application Developers involved in the [Your Mobile App Name] project.

1.3. Key Objectives


II. Screen Flows Specification

This section details the primary user journeys within the application, breaking them down into individual screens and their connections. Each flow is presented with a unique identifier, a description, and a sequence of screens, specifying their purpose and key elements.

The following core flows are documented:

  1. User Onboarding & Authentication Flow
  2. Main Feature: Product Browsing & Detail Flow
  3. Main Feature: Checkout & Order Confirmation Flow
  4. User Profile & Settings Flow

2.1. User Onboarding & Authentication Flow

Flow ID: FLOW_ONB_AUTH

Description: Guides new users through initial setup and allows existing users to log in or register.

text • 186 chars
---

#### 2.2. Main Feature: Product Browsing & Detail Flow

**Flow ID:** `FLOW_PROD_BROWSE`
**Description:** Enables users to discover products, view details, and add them to a cart.

Sandboxed live preview

Mobile App Wireframe Kit: Architectural Plan (Step 1 of 3)

This document outlines the architectural plan for developing a comprehensive Mobile App Wireframe Kit. This foundational step ensures a structured, consistent, and efficient approach to generating wireframes, enabling clear communication between design, product, and development teams.


Workflow Context Clarification

Please note: The primary instruction for this step, "plan_architecture" within the "Mobile App Wireframe Kit" workflow, is to generate an architectural plan for the wireframe kit itself. We also observed an additional instruction at the end of your prompt: "Create a detailed study plan with: weekly schedule, learning objectives, recommended resources, milestones, and assessment strategies."

Given the explicit workflow context, we will proceed with generating the architectural plan for the "Mobile App Wireframe Kit." The "study plan" instruction appears to be an unrelated request. If you intended a different deliverable or wish to pursue the study plan, please clarify in a subsequent instruction.


1. Purpose and Scope of the Wireframe Kit

The Mobile App Wireframe Kit will serve as a standardized, reusable set of design assets and documentation for rapidly prototyping and communicating mobile application layouts and user flows.

  • Target Audience: Product Managers, UX Designers, UI Designers, Developers, Stakeholders.
  • Key Objectives:

* Accelerate Design Process: Provide pre-built, standardized components to speed up wireframing.

* Ensure Consistency: Maintain a unified look, feel, and interaction model across all wireframes.

* Improve Collaboration: Offer a common language and set of assets for cross-functional teams.

* Streamline Handoff: Facilitate clear and concise communication of design intent to developers.

* Reduce Errors: Minimize misinterpretations and rework through detailed specifications.

  • Out of Scope (for this kit): High-fidelity UI design, branding guidelines (unless specified as part of a specific project kit), final production-ready assets (this kit focuses on structure and flow).

2. Core Architectural Components

The Wireframe Kit will be structured around five primary components, each serving a distinct purpose in the design and development lifecycle.

2.1. Screen Flows & User Journeys

This section will detail the sequential progression of user interactions within the application, illustrating the complete paths users take to achieve specific goals.

  • Description: Visual representation of how users navigate through different screens and states.
  • Contents:

* User Story Mapping: Linking specific user stories to corresponding flows.

* Flow Diagrams: Arrows indicating navigation paths, decision points, and alternative routes.

* Screen Annotations: Brief descriptions of each screen's purpose and key elements.

* Error States & Edge Cases: Documentation of how the app handles unexpected scenarios.

  • Deliverable Format: Interactive flow diagrams (e.g., within Figma/Sketch prototypes), static image exports, accompanying textual descriptions.

2.2. Comprehensive Component Library

A robust library of reusable UI elements, ensuring consistency and efficiency in wireframe creation.

  • Description: A collection of pre-designed, low-fidelity UI components that can be dragged, dropped, and configured to build screens.
  • Categories:

* Basic UI Elements: Buttons (primary, secondary, disabled), text fields (input, password, search), checkboxes, radio buttons, toggles, sliders.

* Navigation: Top bars, bottom navigation, tab bars, side drawers/menus, breadcrumbs, pagination.

* Data Display: Lists (simple, complex), cards, tables, data grids, charts (placeholder).

* Feedback & Communication: Alerts, toasts, modals, tooltips, loading indicators, progress bars.

* Media & Content: Image placeholders, video placeholders, avatars.

* Forms: Form layouts, input groups, validation messages.

  • States: Each component will include various states (e.g., default, hover, pressed, disabled, active, error).
  • Deliverable Format: Organized library within a design tool (e.g., Figma components, Sketch symbols, Adobe XD components) with clear naming conventions.

2.3. Interaction Patterns & Micro-interactions

Documentation and examples of how users will interact with the application and specific UI elements.

  • Description: Standardized ways users engage with the app, including gestures, animations, and feedback mechanisms.
  • Examples:

* Navigation: Tap, swipe (left/right for tabs, up/down for scrolling), pinch-to-zoom.

* Data Entry: Keyboard types, auto-completion, masked inputs.

* Feedback: Haptic feedback, visual confirmation of actions, loading animations.

* Gestures: Pull-to-refresh, long press, drag-and-drop.

  • Documentation: Written descriptions, animated GIFs or short video clips demonstrating the interaction, and relevant timing/easing details.
  • Deliverable Format: Dedicated section within the design file, linked to the component library, with rich media examples.

2.4. Developer Handoff Specifications

Detailed notes and specifications to ensure accurate implementation of the wireframed designs.

  • Description: A structured approach to providing developers with all necessary information to build the application as intended.
  • Key Information:

* Screen-level Annotations: Purpose of the screen, key user actions, data displayed.

* Component-level Specifications: Dimensions, spacing (margins, padding), font sizes (placeholder), color palette (placeholder for low-fidelity), responsive behavior (if applicable).

* Interaction Logic: When an action occurs, what happens next? (e.g., "On tap of 'Submit' button, show loading spinner, then navigate to 'Success' screen").

* Error Handling: Specific error messages and their triggers.

* Accessibility Notes: Basic considerations for screen readers, keyboard navigation.

  • Format: Integrated directly into the design file using annotation plugins, or exported to a dedicated specification document (e.g., Zeplin, Avocode, or PDF).

2.5. Documentation & Usage Guidelines

Comprehensive instructions on how to effectively use the Wireframe Kit.

  • Description: A guide for designers and other users on how to navigate, utilize, and contribute to the kit.
  • Contents:

* Getting Started: How to access and set up the kit.

* Kit Structure: Explanation of file organization, page hierarchy.

* Component Usage: Best practices for using components, customization options, limitations.

* Flow Creation Best Practices: Tips for building clear and comprehensive user flows.

* Contribution Guidelines: How to propose new components or update existing ones (if applicable).

* Version Control: Information on updates and changes to the kit.

  • Deliverable Format: Dedicated 'Read Me' page within the design file, or a separate markdown/PDF document.

3. Structural Organization & Naming Conventions

A consistent organizational structure is crucial for the kit's usability and maintainability.

  • File Structure:

* Main File: [App Name]_Wireframe_Kit_vX.X

* Pages/Tabs:

* 00_Read Me & Guidelines

* 01_Component Library (further broken down by category)

* 02_Interaction Patterns

* 03_Screen Flows (e.g., _Onboarding Flow, _User Profile Flow)

* 04_Example Screens (pre-built common screens for reference)

* 99_Sandbox (for experimentation)

  • Layer/Page Naming:

* Use clear, descriptive names (e.g., Login Screen, Product Detail Page).

* Prefix with numbers for logical ordering (e.g., 1.0 Onboarding, 1.1 Sign Up, 1.2 Login).

* Use slashes / for grouping in design tools (e.g., Components/Buttons/Primary).

  • Component Naming:

* Follow a consistent hierarchy: Category/Type/State (e.g., Button/Primary/Default, Input Field/Text/Error).

* Use PascalCase for component names.

4. Guiding Principles for Kit Development

These principles will underpin the creation and evolution of the Wireframe Kit.

  • Consistency: Every element and interaction within the kit will adhere to a unified set of rules.
  • Reusability: Components will be designed to be modular and easily adaptable across various screens and flows.
  • Scalability: The kit will be structured to allow for easy expansion with new components and patterns as the application evolves.
  • Clarity & Simplicity: Wireframes will prioritize clear communication of functionality over aesthetic detail.
  • Accessibility Considerations: Basic accessibility principles (e.g., touch target sizes, contrast for text placeholders) will be considered where appropriate for wireframing.

5. Recommended Tools & Technologies

The choice of tools is critical for efficient kit creation, collaboration, and handoff.

  • Primary Design Tool: Figma (recommended for its robust component system, real-time collaboration, and developer handoff capabilities). Alternatives include Sketch or Adobe XD.
  • Collaboration & Version Control: Built-in features of Figma (version history, commenting) will be leveraged.
  • Developer Handoff: Figma's Inspect panel, potentially augmented by plugins or dedicated handoff tools like Zeplin or Storybook for more complex interactions.

6. Phased Implementation Approach (Future Steps)

While this step focuses on architecture, a high-level implementation plan helps visualize the next stages.

  • Phase 1: Foundation & Core Components (Next Step: Design & Build)

* Create the basic file structure and documentation.

* Develop the essential UI components (buttons, inputs, navigation).

* Establish core interaction patterns.

  • Phase 2: Expansion & Specific Flows

* Build out more complex components and specific app features.

* Develop key user flows (e.g., onboarding, checkout, profile management).

* Integrate developer handoff annotations.

  • Phase 3: Refinement & Maintenance

* Gather feedback from users of the kit (designers, developers).

* Iterate and improve existing components and documentation.

* Regularly update the kit to reflect new design patterns or app features.

This architectural plan provides a solid framework for the subsequent steps in developing a professional and highly effective Mobile App Wireframe Kit.

json

// FLOW_PROD_BROWSE: Product Browsing & Detail Flow

[

{

"screen_id": "HOME_001_Dashboard",

"screen_name": "Home/Dashboard",

"purpose": "Provide an overview, quick access to categories, and featured products.",

"components": [

{"type": "NavigationBar", "id": "nav_bar", "title": "[App Name]", "right_button": "Search"},

{"type": "SegmentedControl", "id": "category_tabs", "items": ["For You", "New Arrivals", "Popular"]},

{"type": "Carousel", "id": "hero_carousel", "items": ["promo_banner_1.png", "promo_banner_2.png"]},

{"type": "SectionHeader", "id": "featured_header", "text": "

gemini Output

Mobile App Wireframe Kit: Complete Specification

This document provides a comprehensive wireframe kit for your mobile application, detailing the structure, user flows, reusable components, interaction patterns, and essential developer handoff notes. This kit serves as a foundational blueprint for the app's design and development, ensuring clarity and consistency across all stages.


1. Introduction

This Mobile App Wireframe Kit is a crucial deliverable designed to articulate the core functionality, layout, and user experience of your application at a structural level. It focuses on "what" the app does and "how" users navigate and interact with it, without delving into final visual aesthetics.

Purpose of this Deliverable:

  • To provide a clear, detailed understanding of the app's screen layouts and information architecture.
  • To map out key user journeys and navigation paths.
  • To define a consistent set of reusable UI components.
  • To specify interaction behaviors and expected system responses.
  • To furnish developers with actionable technical notes for implementation.

This document will guide the subsequent stages of UI design and development, fostering a shared understanding among all stakeholders.


2. Screen Flows & User Journeys

This section outlines the primary user journeys within the application, demonstrating how users navigate through different screens to achieve specific goals. Each flow describes the sequence of screens and the actions that trigger transitions.

2.1 Overall App Structure (High-Level Navigation)

The application utilizes a common navigation pattern to ensure ease of use.

  • Launch Screen / Splash Screen: Initial app load.
  • Onboarding / Sign-up / Login Flow: First-time user experience or returning user access.
  • Main Navigation: Typically a persistent bottom navigation bar or a hamburger menu for core sections.

* Home / Dashboard

* Explore / Search

* Activity / Notifications

* Profile / Settings

  • Detail Screens: Accessed from main sections (e.g., Product Detail, Task Detail, Article Detail).
  • Action / Form Screens: For creating content, submitting data (e.g., Create New Post, Edit Profile).

2.2 Key User Flows

##### 2.2.1 User Onboarding & Account Creation

Description: Guides a new user through the process of creating an account and getting started with the app.

  1. Splash Screen: App branding, brief loading.

Interaction:* Automatic transition after 2-3 seconds.

  1. Welcome Screen: Introduction to app benefits, options to "Sign Up" or "Log In."

Interaction:* Tap "Sign Up" button.

  1. Sign Up - Email/Password: Form for email, password, password confirmation.

Interaction:* Fill fields, tap "Continue."

Validation:* Email format, password strength.

  1. Sign Up - Profile Details (Optional): Fields for Name, Username, Profile Picture upload.

Interaction:* Fill fields, tap "Complete Profile" or "Skip."

  1. Permissions Request (Optional): Push Notifications, Location Access.

Interaction:* Tap "Allow" or "Deny."

  1. Onboarding Tour / First-Time Experience: Brief tutorial or highlight of key features.

Interaction:* Swipe through slides, tap "Got It!" or "Skip Tour."

  1. Home Screen: User lands on the main dashboard.

##### 2.2.2 Core Feature Flow: Browsing Items & Viewing Details

Description: Allows a user to discover items and view their detailed information.

  1. Home Screen / Dashboard: Displays a curated feed or categories of items.

Interaction:* Scroll vertically to browse. Tap on an item card.

  1. Item List Screen (Category View): Displays items within a selected category, often with filtering/sorting options.

Interaction:* Tap on an item card.

Interaction:* Tap filter icon to open filter options. Apply filters, tap "Show Results."

  1. Item Detail Screen: Shows comprehensive information about the selected item (image, description, price, related items).

Interaction:* Scroll vertically to view all details.

Interaction:* Tap "Add to Favorites" icon.

Interaction:* Tap "Contact Seller" button.

Interaction:* Tap back arrow in header to return to previous screen.

##### 2.2.3 User Profile Management

Description: Enables a user to view and edit their personal information and app settings.

  1. Profile Screen: Displays user's name, profile picture, and a list of options (Edit Profile, My Posts, Settings, Log Out).

Interaction:* Tap "Edit Profile."

Interaction:* Tap "Settings."

  1. Edit Profile Screen: Form fields for Name, Username, Email, Profile Picture upload, Bio.

Interaction:* Modify fields. Tap "Save Changes" button.

Validation:* Required fields, format checks.

Interaction:* Tap back arrow to discard changes and return to Profile Screen.

  1. Settings Screen: List of app settings (e.g., Notification Preferences, Privacy, Change Password, About).

Interaction:* Tap "Notification Preferences."

Interaction:* Tap "Change Password."

  1. Notification Preferences Screen: Toggles for various notification types.

Interaction:* Toggle switches ON/OFF. Changes saved automatically or with an explicit "Save" button.


3. Component Library

This section defines the reusable UI components that form the building blocks of the application. Standardizing these components ensures consistency, accelerates development, and improves maintainability.

3.1 Navigation Components

  • App Bar (Top Bar / Header):

* Description: Top-most bar providing context and primary actions.

* States: Default, with back button, with title, with action icons (e.g., search, menu, notifications).

* Usage: Present on most screens.

  • Bottom Navigation Bar:

* Description: Persistent navigation at the bottom of the screen for core app sections.

* States: Active (selected item), Inactive.

* Usage: For 3-5 primary destinations. Icons with optional text labels.

  • Tabs:

* Description: Used to organize content into distinct sections within a single screen.

* States: Selected, Unselected.

* Usage: For filtering content, switching views (e.g., "All" | "Favorites" | "Archived").

  • Hamburger Menu (Drawer Navigation):

* Description: Off-canvas menu typically accessed from an icon in the App Bar, for secondary navigation or settings.

* States: Closed, Open.

* Usage: For less frequently accessed sections, legal info, logout.

3.2 Input Components

  • Text Field:

* Description: Allows users to input text.

* States: Default, Focused, Filled, Error, Disabled.

* Variants: Single line, multi-line (textarea), password (with toggle for visibility), with leading/trailing icons.

* Usage: Forms, search bars.

  • Dropdown / Select:

* Description: Allows users to choose one option from a predefined list.

* States: Default, Open, Selected, Disabled.

* Usage: Category selection, sorting options.

  • Checkbox:

* Description: Allows users to select multiple options from a list or toggle a single setting.

* States: Unchecked, Checked, Indeterminate, Disabled.

* Usage: Terms & conditions, multiple choice filters.

  • Radio Button:

* Description: Allows users to select a single option from a group.

* States: Unselected, Selected, Disabled.

* Usage: Single choice questions, gender selection.

  • Toggle Switch:

* Description: Used to switch between two states (ON/OFF).

* States: OFF, ON, Disabled.

* Usage: Notification preferences, dark mode.

  • Search Bar:

* Description: Dedicated input for searching content within the app.

* States: Default (placeholder), Focused (with keyboard), With clear button (after typing).

* Usage: Global search, specific list search.

3.3 Buttons & Call-to-Actions (CTAs)

  • Primary Button:

* Description: Highest emphasis, for the most important action on a screen.

* States: Default, Hover/Pressed, Disabled, Loading.

* Usage: "Submit," "Save," "Add to Cart."

  • Secondary Button:

* Description: Medium emphasis, for less critical actions.

* States: Default, Hover/Pressed, Disabled.

* Usage: "Cancel," "Learn More."

  • Tertiary / Ghost Button:

* Description: Lowest emphasis, often text-only or outline.

* States: Default, Hover/Pressed, Disabled.

* Usage: "Skip," "View All," "Delete."

  • Icon Button:

* Description: Button composed solely of an icon.

* States: Default, Hover/Pressed, Disabled.

* Usage: "Back," "Menu," "Share," "Favorite."

  • Floating Action Button (FAB):

* Description: Prominent, circular button for a primary, constructive action.

* States: Default, Pressed.

* Usage: "Create New," "Add," "Compose."

3.4 Information Display Components

  • Card:

* Description: Container for related content, often with an image, title, and description.

* States: Default, Selectable.

* Usage: Item listings, news articles, user profiles.

  • List Item:

* Description: Displays rows of information, often with an icon, text, and an optional action.

* States: Default, Selected, Disabled.

* Usage: Settings menus, search results, message threads.

  • Alert / Dialog:

* Description: Interrupts the user with important information or requires a decision.

* States: Visible (with title, message, action buttons).

* Usage: Confirmation ("Are you sure?"), Error messages.

  • Toast / Snackbar:

* Description: Provides brief, non-intrusive feedback to the user.

* States: Visible (temporary).

* Usage: "Item added to cart," "Settings saved."

  • Badge:

* Description: Small indicator, usually numerical, for notifications or status.

* States: Visible (with number), Hidden.

* Usage: Notification counts on icons.

  • Progress Indicator:

* Description: Shows that an action is in progress.

* Variants: Circular (spinner), Linear (progress bar).

* Usage: Loading screens, form submissions.

3.5 Media Components

  • Image Placeholder:

* Description: A visual representation for where an image will be loaded.

* States: Loading (skeleton), Error.

* Usage: Before images load, or when an image fails to load.

  • Avatar:

* Description: Small circular or square image representing a user or entity.

* States: Default (initials/placeholder), With image.

* Usage: Profile pictures, comments.


4. Interaction Patterns

This section defines how users interact with the application and its components, specifying the expected gestures and system responses.

4.1 Basic Interactions

  • Tap / Click:

* Description: A single, brief touch on an interactive element.

* Outcome: Triggers an action (e.g., navigates to a new screen, submits a form, toggles a state).

* Application: Buttons, list items, icons, checkboxes, radio buttons.

  • Long Press:

* Description: Holding a finger down on an element for an extended period.

* Outcome: Reveals contextual menus, enables selection mode, or triggers a secondary action.

* Application: Deleting items, reordering lists, copying text.

  • Double Tap:

* Description: Tapping twice quickly on an element.

* Outcome: Zooms in/out, likes content, or triggers a specific action.

* Application: Image viewers, social

mobile_app_wireframe_kit.txt
Download source file
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);}});}