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

This document provides a comprehensive, detailed, and production-ready specification for a Mobile App Wireframe Kit. It defines the core components, screen flows, interaction patterns, and critical developer handoff notes required for efficient and accurate implementation. This output serves as a foundational blueprint, bridging the gap between design concepts and development execution.


1. Introduction & Purpose

This deliverable outlines the complete specification for a mobile application wireframe kit. Its primary purpose is to provide a structured, machine-readable, and human-understandable definition of all necessary UI elements, screen layouts, navigational logic, and interactive behaviors. This specification is designed to facilitate seamless developer handoff, ensuring clarity, consistency, and efficiency in the development process.

The "code" generated here is a declarative, structured representation (JSON-like) that defines the wireframe kit's elements, rather than executable UI code. This approach allows for framework-agnostic definition while providing the precision needed for implementation.

2. Wireframe Kit Overview & Structure

The Mobile App Wireframe Kit is organized into the following key sections:


3. Component Library Specification

This section defines the reusable UI components that form the building blocks of the application. Each component includes its unique identifier, type, properties, variants, and default interactions.

text • 278 chars
---

## 4. Screen Flow Specification

This section defines the individual screens of the application and how they connect to form user flows. Each screen specifies its layout by referencing components from the library and detailing screen-specific properties and transitions.

Sandboxed live preview

Step 1 of 3: Architectural Plan for Mobile App Wireframe Kit

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

Current Step: gemini → plan_architecture


Important Note Regarding User Input:

The request included two distinct parts: "Generate detailed professional output for: Mobile App Wireframe Kit" which aligns with the workflow, and "Create a detailed study plan with: weekly schedule, learning objectives, recommended resources, milestones, and assessment strategies."

This output focuses exclusively on the "plan_architecture" step for the "Mobile App Wireframe Kit" workflow. The request for a "detailed study plan" appears to be unrelated to this specific workflow step and has therefore been omitted from this deliverable. If a study plan is required, please initiate it as a separate, dedicated task.


1. Introduction to the Architectural Plan

This document outlines the architectural plan for developing a comprehensive Mobile App Wireframe Kit. The purpose of this plan is to define the structure, core components, methodology, and tools that will be used to create a detailed wireframe specification. This specification will serve as a foundational blueprint for the mobile application, ensuring clarity, consistency, and efficient communication among design, development, and stakeholder teams.

The Mobile App Wireframe Kit will provide a clear visual representation of the app's structure, user experience flows, and functional elements before engaging in high-fidelity UI design.

2. Overall Structure of the Mobile App Wireframe Kit Deliverable

The final Mobile App Wireframe Kit will be delivered as a structured, interactive digital artifact (e.g., a Figma/Sketch file with linked prototypes) complemented by comprehensive documentation. It will be organized into the following major sections to ensure ease of navigation and understanding:

  • I. Executive Summary: High-level overview of the app's purpose and key user journeys.
  • II. Screen Flows: Detailed mapping of user journeys and task completions.
  • III. Component Library: A catalog of all reusable UI elements with their states and usage guidelines.
  • IV. Interaction Patterns: Documentation of common user interactions and system responses.
  • V. Developer Handoff Notes: Specific instructions and guidelines for development teams.
  • VI. Appendix (Optional): Supporting materials such as user personas, competitive analysis, or initial sketches.

3. Core Components & Specification Details

Each core component of the Wireframe Kit will be meticulously developed and documented as follows:

3.1. Screen Flows

Purpose: To visually represent the user's path through the application, illustrating the sequence of screens and interactions required to complete specific tasks or achieve objectives.

Details:

  • Types of Flows:

* User Journeys: High-level flows illustrating an entire user story from start to finish.

* Task Flows: Detailed flows focusing on specific functionalities (e.g., login, profile creation, item purchase, search).

* Navigation Maps: Overviews of the app's overall screen hierarchy and interconnections.

  • Notation & Diagramming: Standardized flow diagramming (e.g., using arrows for transitions, decision points, entry/exit points).
  • Information Included per Screen:

* Screen Name/ID

* Key purpose/objective

* Links to relevant wireframes

* Annotations describing interactions or system responses.

  • Deliverable Format: Interactive flow diagrams (e.g., using Miro, Figma's FigJam, or dedicated flow tools) linked directly to wireframe screens.

3.2. Component Library

Purpose: To establish a consistent set of reusable UI elements, promoting uniformity across the application and accelerating the design and development process.

Details:

  • Categorization: Components will be organized based on their complexity and function (e.g., Atomic, Molecular, Organisms, Templates – inspired by Atomic Design principles).

* Atomic: Basic elements (e.g., buttons, input fields, icons, typography styles, color palette).

* Molecular: Combinations of atomic elements (e.g., search bars, form groups, navigation items).

* Organisms: Groups of molecules and atoms forming distinct sections (e.g., headers, footers, product cards, modals).

* Templates: Wireframe layouts representing specific page types, composed of organisms.

  • Attributes per Component:

* Name: Unique identifier.

* Description: Purpose and typical usage.

* States: Visual representations of different states (e.g., button: default, hover, pressed, disabled; input field: empty, filled, focused, error).

* Properties: Key configurable attributes (e.g., button size, icon type).

* Usage Guidelines: Best practices and constraints for component implementation.

* Examples: Illustrations of the component in context.

  • Deliverable Format: A dedicated page/section within the design file (e.g., Figma, Sketch) containing all components as master symbols/variants, with accompanying documentation.

3.3. Interaction Patterns

Purpose: To define and standardize how users interact with the application and how the system responds, ensuring a predictable and intuitive user experience.

Details:

  • Types of Interactions:

* Navigation: (e.g., tab bars, side menus, breadcrumbs).

* Data Input: (e.g., forms, selections, date pickers).

* Feedback: (e.g., loading indicators, success messages, error alerts, toasts).

* Gestures: (e.g., tap, long press, swipe, pinch-to-zoom).

* State Changes: (e.g., expand/collapse, toggle switches).

  • Documentation per Pattern:

* Pattern Name: Clear title.

* Description: Explanation of the pattern and its purpose.

* Triggers: How the interaction is initiated (user action, system event).

* Feedback: How the system responds visually and functionally.

* States: Different visual/functional states of the pattern.

* Use Cases: When and where to apply the pattern.

Anti-patterns (Optional): When not* to use the pattern.

  • Deliverable Format: A dedicated section within the documentation or interactive prototypes demonstrating key interactions.

3.4. Developer Handoff Notes

Purpose: To provide clear, unambiguous instructions and specifications to the development team, minimizing misinterpretation and facilitating efficient implementation.

Details:

  • General Guidelines:

* Platform-specific considerations (iOS, Android, Web).

* Accessibility notes (e.g., ARIA labels, focus management, color contrast).

* Performance considerations.

  • Screen-Specific Notes:

* Unique behaviors or logic for individual screens.

* Conditional rendering rules.

* Error handling scenarios specific to a screen.

  • Component-Specific Notes:

* Technical implementation details for complex components.

* API integration points.

  • Asset Specifications:

* Guidelines for exporting icons, illustrations, and other media.

* Image formats, resolutions, and scaling considerations.

  • Animation Specifications:

* Duration, easing curves, and specific properties for transitions and micro-interactions.

  • Typography & Color Palettes:

* Defined type scales, font weights, and color HEX/RGB values for all elements.

  • Spacing & Layout:

* Grids, columns, and consistent spacing units.

* Responsive/adaptive behaviors.

  • Deliverable Format: Integrated directly into the design file using annotations, comments, or a separate linked specification document.

4. Methodology & Tools

4.1. Design Process Overview

The creation of the Mobile App Wireframe Kit will follow a structured process:

  1. Discovery & Requirements Gathering: Understand app objectives, user needs, and business goals.
  2. Information Architecture: Define the app's structure and content hierarchy.
  3. User Flow Mapping: Chart key user journeys and task flows.
  4. Wireframing (Mid-Fidelity): Create screen layouts and interactions.
  5. Prototyping: Link wireframes to simulate app functionality.
  6. Component Library Definition: Catalog and document reusable UI elements.
  7. Interaction Pattern Specification: Document standard behaviors.
  8. Developer Handoff Preparation: Add all necessary technical annotations.
  9. Review & Iteration: Incorporate feedback from stakeholders and refine the kit.

4.2. Fidelity Level

The wireframes will be developed at a mid-fidelity level. This means they will include:

  • Accurate screen layouts and element placement.
  • Clearly defined UI components (buttons, input fields, navigation).
  • Representative content (rather than placeholder text like "Lorem Ipsum").
  • Basic visual hierarchy and structure.
  • Functional prototypes for key flows.

This fidelity level is ideal for validating user flows and functionality without getting sidetracked by visual design details, while still providing enough clarity for effective communication with developers and stakeholders.

4.3. Recommended Tools

  • Wireframing & Prototyping: Figma (preferred for collaboration, component libraries, and interactive prototypes)
  • Flow Diagramming: Figma (FigJam), Miro, or Lucidchart
  • Documentation: Figma (annotations), Confluence, or Notion
  • Developer Handoff: Figma (Inspect mode, plugins like Zeplin if required)

5. Quality Assurance & Review Strategy

A robust review process will be implemented to ensure the quality, consistency, and completeness of the Wireframe Kit:

  • Internal Peer Review: Regular reviews within the design team for consistency and adherence to best practices.
  • Stakeholder Review: Formal review sessions with project stakeholders to gather feedback on functionality, flows, and overall user experience.
  • Developer Review: Early engagement with the development team to identify any technical feasibility issues or ambiguities.
  • Usability Testing (Optional): Low-cost usability tests with prototypes to validate critical user flows with target users.

6. Deliverables from This Step

This document itself serves as the deliverable for the plan_architecture step, outlining the complete strategy for creating the Mobile App Wireframe Kit.

7. Next Steps

Upon approval of this Architectural Plan, the project will proceed to the execution phase, which includes:

  1. Detailed Requirements Analysis: Deep dive into user stories and functional requirements.
  2. Information Architecture & User Flow Creation: Begin mapping out the app's structure and user journeys.
  3. Wireframe Design & Prototyping: Design individual screens and link them into

json

{

"screens": [

{

"id": "splash_screen",

"name": "Splash Screen",

"layout": {

"type": "FlexColumn",

"alignment": "center",

"children": [

{ "componentId": "image", "props": { "source": "app_logo.png", "width": 150, "height": 150 } },

{ "componentId": "text_display", "props": { "text": "Welcome to Our App", "variant": "headline6", "marginTop": 24 } }

]

},

"transitions": [

{

"trigger": "on_load",

"delayMs": 2000,

"targetScreenId": "login_screen",

"animation": "fade"

}

]

},

{

"id": "login_screen",

"name": "Login Screen",

"layout": {

"type": "FlexColumn",

"spacing": 16,

"padding": [24, 24, 24, 24],

"children": [

{ "componentId": "navbar_top", "props": { "title": "Login", "leadingIcon": null } },

{ "componentId": "text_display", "props": { "text": "Sign in to your account", "variant": "subtitle1", "marginBottom": 16 } },

{ "componentId": "input_text_field", "props": { "label": "Email", "placeholder": "your@example.com", "type": "email" }, "instanceId": "email_input" },

{ "componentId": "input_text_field", "props": { "label": "Password", "placeholder": "

gemini Output

Mobile App Wireframe Kit: Complete Specification

Project: Mobile App Wireframe Kit

Deliverable: Complete Wireframe Specification

Date: October 26, 2023

Version: 1.0


1. Executive Summary

This document presents a comprehensive wireframe specification for the proposed mobile application. It details the essential screen layouts, user flows, interactive components, and foundational interaction patterns necessary to bring the app's core functionality to life. Designed for clarity and actionability, this specification serves as a critical bridge between concept and development, ensuring a shared understanding of the app's structure, user experience, and technical requirements.

This kit includes:

  • Detailed screen flows illustrating key user journeys.
  • A robust component library for consistent UI element usage.
  • Defined interaction patterns to guide user experience.
  • Comprehensive developer handoff notes to facilitate efficient implementation.

2. Overall Project Goals & Vision

The primary goal of this mobile application is to [_Insert specific project goal here, e.g., "provide users with an intuitive platform for discovering and managing local services"_]. We aim to create a highly engaging, user-friendly, and performant mobile experience that addresses key user needs and differentiates itself in the market through [_e.g., "its streamlined discovery process and personalized content delivery"_]. This wireframe specification lays the groundwork for achieving these objectives by defining a clear and consistent user interface and interaction model.


3. Wireframe Specification Overview

This wireframe specification outlines the foundational structure and user experience for the mobile application. It focuses on:

  • Information Architecture: How content is organized and accessed.
  • Screen Layouts: The arrangement of elements on each screen.
  • User Flows: The sequences of screens users navigate to complete tasks.
  • Core Functionality: The essential features supported by the app.

This document does not include high-fidelity visual design elements (colors, typography, specific imagery), which will be addressed in subsequent UI design phases.


4. Screen Flows

This section details the primary user journeys within the application, illustrating the sequence of screens a user will encounter to complete specific tasks. Each flow is presented with a clear start and end point, highlighting decision points and alternative paths.

4.1. Flow 1: Onboarding & First Run Experience

Purpose: To introduce new users to the app's value proposition and guide them through initial setup.

  • Screen 1.1: Welcome/Splash Screen

* Brief app logo/branding display.

* Transitions automatically after 2-3 seconds.

  • Screen 1.2: Onboarding Carousel (3-4 screens)

* Each screen highlights a key feature or benefit with an illustration/icon and short text.

* "Skip" button available.

* "Next" button to advance.

  • Screen 1.3: Permission Request (Optional)

* e.g., Location access, Push Notifications.

* Clear explanation of why permission is needed.

* "Allow" / "Deny" options.

  • Screen 1.4: Call to Action / Main Entry

* "Sign Up" button.

* "Login" button (for existing users).

* "Continue as Guest" (if applicable).

Path A (Sign Up):* Leads to Flow 2.1.

Path B (Login):* Leads to Flow 2.2.

Path C (Guest):* Leads to Screen 3.1.

4.2. Flow 2: User Authentication

Purpose: To allow new users to register and existing users to log in securely.

##### 4.2.1. Sub-Flow: Sign Up

  • Screen 2.1: Sign Up

* Input fields: Email, Password, Confirm Password.

* "Sign Up" button.

* "Already have an account? Login" link.

* Social login options (e.g., Google, Apple).

  • Screen 2.2: Profile Creation (Optional)

* Input fields: Name, Username, Profile Picture upload.

* "Continue" button.

  • Screen 2.3: Interests/Preferences Selection (Optional)

* Categorized tags/options for user to select preferences.

* "Save & Continue" button.

  • Completion: Navigates to Screen 3.1 (Main Dashboard).

##### 4.2.2. Sub-Flow: Login

  • Screen 2.4: Login

* Input fields: Email/Username, Password.

* "Login" button.

* "Forgot Password?" link.

* "Don't have an account? Sign Up" link.

* Social login options.

  • Screen 2.5: Forgot Password

* Input field: Email.

* "Send Reset Link" button.

* Confirmation message/screen.

  • Completion: Navigates to Screen 3.1 (Main Dashboard).

4.3. Flow 3: Main Content Discovery & Interaction

Purpose: To enable users to browse, search, and interact with the app's core content/services.

  • Screen 3.1: Main Dashboard/Home

* Top Bar: App Title/Logo, Search Icon, Profile Icon.

* Content Sections: (e.g., "Recommended for You," "Trending," "Categories").

* Each section displays content in a scrollable list or carousel of cards.

* Bottom Navigation Bar (e.g., Home, Explore, Favorites, Profile).

  • Screen 3.2: Search Results (Accessed from Search Icon on 3.1)

* Search Bar with input.

* Recent Searches/Suggestions.

* Results displayed as a list of items/cards.

* Filter/Sort options.

  • Screen 3.3: Item Detail View (Accessed by tapping a content item on 3.1 or 3.2)

* Header: Back button, Share Icon, Favorite Icon.

* Large image/media display.

* Title, Description, Key Information (e.g., Rating, Price, Location).

* Call to Action (e.g., "Book Now," "View Details," "Add to Cart").

* Related Items/Recommendations.

  • Screen 3.4: Category/Explore View (Accessed from Explore tab on Bottom Nav)

* Grid or List of categories.

* Tapping a category leads to a filtered list of items (similar to 3.2).

4.4. Flow 4: Profile & Settings Management

Purpose: To allow users to view and update their profile information and app settings.

  • Screen 4.1: Profile View (Accessed from Profile tab on Bottom Nav)

* User's Avatar, Name, Email.

* Sections: "My [Content/Services]," "Settings," "Help," "Logout."

* "Edit Profile" button.

  • Screen 4.2: Edit Profile (Accessed from "Edit Profile" on 4.1)

* Input fields: Name, Email, Phone, Bio, Profile Picture upload.

* "Save Changes" button.

* "Change Password" link.

  • Screen 4.3: Settings (Accessed from "Settings" on 4.1)

* List of settings options:

* Notifications (toggle on/off, customize types).

* Privacy (e.g., data sharing).

* Appearance (e.g., dark mode - if applicable).

* Language.

* About App (Version, Terms, Privacy Policy).

* Toggles, radio buttons, navigation links for each setting.


5. Component Library

This section defines the reusable UI components that will form the building blocks of the application. Consistency in component usage is paramount for a cohesive user experience and efficient development.

5.1. Navigation Components

  • Top Navigation Bar (Header)

* Variants:

* Default: Title, Back Button (optional), Action Icons (e.g., Search, Share).

* Home: App Logo/Title, Action Icons.

* Usage: Primary navigation, screen title, global actions.

  • Bottom Navigation Bar (Tab Bar)

* Variants: 3-5 persistent tabs with icon and text label.

* Usage: Primary navigation between major sections of the app.

  • Segmented Control / Top Tabs

* Variants: 2-4 segments.

* Usage: Filtering content within a single screen, switching between related views.

5.2. Input Components

  • Text Input Field

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

* Variants: Single line, Multi-line (Text Area), with/without clear button, with/without icon.

* Usage: User data entry (email, password, name, search queries).

  • Search Bar

* Variants: Standalone, integrated into Top Nav.

* Elements: Input field, Search icon, Clear button (when text is present).

  • Checkbox / Radio Button

* States: Unselected, Selected, Disabled.

* Usage: Multiple selection (checkbox), single selection (radio).

  • Toggle Switch

* States: Off, On, Disabled.

* Usage: Binary settings (e.g., notifications on/off, dark mode).

  • Dropdown / Selector

* Usage: Selecting from a predefined list of options.

5.3. Action Components

  • Primary Button

* States: Default, Pressed, Disabled, Loading.

* Usage: Main call to action on a screen (e.g., "Sign Up," "Save Changes," "Book Now").

  • Secondary Button / Ghost Button

* States: Default, Pressed, Disabled.

* Usage: Less prominent actions, often paired with a primary button (e.g., "Cancel," "Skip").

  • Icon Button

* States: Default, Pressed, Disabled.

* Usage: Small, contextual actions (e.g., "Favorite," "Share," "Edit").

  • Text Link

* States: Default, Pressed.

* Usage: Navigational links within text (e.g., "Forgot Password?", "Terms of Service").

5.4. Display Components

  • Cards

* Variants: Image + Text, Text only, Actionable.

* Usage: Displaying content items in a structured, digestible format (e.g., service listings, articles, user profiles).

  • List Items

* Variants: Single line, Two lines, with/without icon, with/without accessory (e.g., chevron, toggle).

* Usage: Displaying lists of data (e.g., settings options, search results, notifications).

  • Avatars / Profile Images

* Variants: Circular, Square.

* Usage: Representing users or entities.

  • Image / Media Player

* Usage: Displaying static images or embedded video/audio.

  • Badges / Tags

* Usage: Categorization, status indicators.

5.5. Feedback & System Components

  • Alert Dialog / Modal

* Variants: With single action, with two actions (e.g., "Cancel" / "Confirm").

* Usage: Critical information, confirmation prompts, error messages requiring immediate attention.

  • Toast Message / Snackbar

* Usage: Non-intrusive, temporary feedback messages (e.g., "Item added to favorites," "Settings saved").

  • Loading Indicator (Spinner)

* Variants: Full screen, inline.

* Usage: Signifying data loading or processing.

  • Empty State / Placeholder

* Usage: When a list or section has no content, providing guidance or a call to action.


6. Interaction Patterns

This section describes common interaction behaviors and user experience patterns expected throughout the application.

6.1. Navigation & Orientation

  • Back Navigation: Standard platform-specific back button/gesture (e.g., iOS swipe from left edge, Android hardware/software back button) for hierarchical navigation.
  • Tab Navigation: Tapping a tab in the Bottom Navigation Bar switches content within the main view without losing state on other tabs.
  • Modal Presentation: Content presented modally should typically have a clear dismiss action (e.g., "X" button, "Done" button, or swipe down gesture if applicable).
  • Deep Linking: Support for opening specific app content directly from external links (e.g., email, website).

6.2. Data Entry & Forms

  • Keyboard Management: Keyboard automatically appears when an input field is focused and dismisses when tapping outside the field or submitting.
  • Input Validation: Real-time validation where possible (e.g., email format), with clear error messages displayed below the field.
  • Password Visibility Toggle: An icon (e.g., eye) to show/hide password text in input fields.
  • Autofill/Autocomplete: Leverage platform capabilities for common inputs (e.g., addresses, credit cards).

6.3. Feedback & States

  • Loading States: Use appropriate loading indicators (spinners, skeleton screens) for content that takes time to load.
  • Empty States: Clear messaging and relevant calls to action when a list or section is empty.
  • Error States: Display user-friendly error messages for network issues,
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);}});}