Mobile App Wireframe Kit
Run ID: 69cc2d6dfdffe128046c547f2026-03-31Design
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: Comprehensive Study Plan

This document outlines a detailed study plan designed to equip individuals or teams with the knowledge and skills required to create a professional and comprehensive Mobile App Wireframe Kit. This plan focuses on understanding the core components of a wireframe kit, mastering relevant design tools, and applying best practices for effective communication and developer handoff.


1. Overall Learning Goal

To develop the expertise necessary to design, build, and document a high-quality, reusable Mobile App Wireframe Kit that includes robust screen flows, a scalable component library, clearly defined interaction patterns, and comprehensive developer handoff notes. The ultimate outcome is the ability to efficiently produce mid-fidelity wireframes that effectively communicate product structure and user experience.


2. Weekly Schedule

This 5-week schedule provides a structured approach to learning, with each week building upon the previous one. Each week assumes approximately 10-15 hours of dedicated study and practice.

  • Week 1: Foundations of Wireframing & UX Principles

* Focus: Introduction to wireframing, its purpose, types, and fundamental UX/UI principles. Getting started with a primary wireframing tool (Figma recommended).

* Key Topics: What are wireframes? Low-fidelity vs. Mid-fidelity. Core UX principles (usability, accessibility, hierarchy, consistency). Introduction to Figma workspace, basic tools, frames, shapes, text, and layers.

* Practical Exercise: Create simple low-fidelity wireframes for 3-5 common app screens (e.g., login, home, profile) in Figma.

  • Week 2: Information Architecture & User Flows

* Focus: Understanding how users navigate an app and structuring content logically.

* Key Topics: User research basics (personas, user stories - conceptual). Information Architecture (IA) principles. Creating sitemaps and user flow diagrams. Mapping user journeys and task flows.

* Practical Exercise: Based on a chosen simple app concept (e.g., a basic task manager or recipe app), create a sitemap and detailed user flow diagrams for 2-3 key user journeys. Wireframe the corresponding screens and connect them visually in Figma to represent the flow.

  • Week 3: Building a Component Library - Core UI Elements

* Focus: Designing reusable UI components and establishing consistency.

* Key Topics: Introduction to Atomic Design principles (atoms, molecules). Designing fundamental UI elements: buttons (primary, secondary, ghost, disabled states), text inputs (default, focused, error), checkboxes, radio buttons, toggles, sliders, icons. Figma features: Components, Instances, Variants, Auto Layout.

* Practical Exercise: Create a dedicated Figma file for your component library. Design and organize a set of core UI components with their various states using Figma Components and Variants.

  • Week 4: Advanced Components & Interaction Patterns

* Focus: Developing more complex UI elements and documenting common mobile interaction patterns.

* Key Topics: Designing advanced components: navigation bars (top, bottom), tabs, cards, modals, alerts, toasts, accordions, carousels. Understanding common mobile interaction patterns (taps, swipes, long presses, gestures, transitions). Annotating wireframes to indicate interactions.

* Practical Exercise: Expand your component library with advanced UI elements. Integrate conceptual interaction patterns by adding annotations or simple flow lines to your wireframes from Week 2, demonstrating how users interact with these components.

  • Week 5: Wireframe Kit Assembly, Documentation & Handoff

* Focus: Consolidating all learned concepts into a cohesive, documented wireframe kit ready for use and developer collaboration.

* Key Topics: Structuring the complete wireframe kit (template structure, naming conventions). Creating a "How to Use" guide for the kit. Best practices for annotating wireframes for developers (functionality, states, transitions). Preparing files for developer handoff (specs, asset export considerations). Version control and collaboration within Figma.

* Practical Exercise: Assemble all components and screen flows into a single, organized Figma file that serves as your complete Mobile App Wireframe Kit. Add comprehensive annotations and create a README/guideline page within the file. Conduct a peer review or self-review of the complete kit.


3. Learning Objectives

Upon successful completion of this study plan, participants will be able to:

  • Understand Core Concepts: Articulate the purpose, benefits, and different fidelities of wireframes, and their role in the product development lifecycle.
  • Master Wireframing Tools: Efficiently use Figma (or a similar tool) to create, organize, and manage wireframes and UI components.
  • Design User-Centric Flows: Create clear sitemaps and detailed user flow diagrams that accurately represent user journeys and task completion within an application.
  • Build a Reusable Component Library: Design and implement a structured, scalable UI component library using features like Components, Variants, and Auto Layout, ensuring consistency across designs.
  • Document Interaction Patterns: Identify and conceptually integrate common mobile interaction patterns into wireframes, providing clear guidance on user experience.
  • Prepare for Developer Handoff: Annotate wireframes effectively to communicate functionality, states, and transitions to development teams, and understand best practices for asset and specification delivery.
  • Create a Complete Wireframe Kit: Develop a comprehensive, well-organized, and documented Mobile App Wireframe Kit that can be reused for future projects.

4. Recommended Resources

  • Primary Tool:

* Figma: The industry-standard tool for collaborative UI/UX design.

* Figma Learn (official tutorials): [https://help.figma.com/hc/en-us/categories/360002042593-Learn-Figma](https://help.figma.com/hc/en-us/categories/360002042593-Learn-Figma)

* Figma Community: Explore existing wireframe kits and component libraries.

  • Books:

* "Don't Make Me Think, Revisited" by Steve Krug (Usability principles)

* "The Design of Everyday Things" by Don Norman (Design principles)

* "Atomic Design" by Brad Frost (Component-based design systems)

  • Online Courses (Optional, but highly recommended):

* Coursera/edX: UX Design Specializations (e.g., Google UX Design Professional Certificate)

* Udemy/Skillshare: Specific courses on Figma for UI/UX, Wireframing, and Prototyping.

* NN/g (Nielsen Norman Group): Articles and courses on UX research, usability, and IA.

  • Articles & Blogs:

* Smashing Magazine: UX Design section

* UX Collective (Medium publication)

* Interaction Design Foundation: Extensive library of articles on UX topics.

  • Inspiration & Best Practices:

* Mobbin.design, Pttrns.com: Mobile UI patterns and flows from existing apps.

* Material Design Guidelines (Google): [https://m2.material.io/design](https://m2.material.io/design)

* Human Interface Guidelines (Apple): [https://developer.apple.com/design/human-interface-guidelines/](https://developer.apple.com/design/human-interface-guidelines/)


5. Milestones

  • End of Week 1: Completion of basic low-fidelity wireframes for common app screens in Figma, demonstrating understanding of basic tools.
  • End of Week 2: Creation of a sitemap and 2-3 detailed user flow diagrams, with corresponding mid-fidelity wireframes in Figma.
  • End of Week 3: A dedicated Figma file containing a robust set of core UI components (buttons, inputs, etc.) with various states, organized using Components, Variants, and Auto Layout.
  • End of Week 4: Expansion of the component library with advanced UI elements and integration of conceptual interaction pattern annotations into existing wireframes.
  • End of Week 5 (Final Deliverable): A complete, well-organized, and documented Mobile App Wireframe Kit in Figma, including a "How to Use" guide and comprehensive annotations for developer handoff.

6. Assessment Strategies

  • Weekly Practical Exercises: Completion of assigned hands-on tasks at the end of each week, reviewed for adherence to instructions and quality.
  • Peer Review/Self-Review: Encourage participants to review each other's work or critically self-assess their progress against defined objectives and best practices.
  • Component Library Review: Evaluation of the component library for consistency, reusability, proper use of Figma features (variants, auto layout), and scalability.
  • User Flow & Screen Flow Clarity: Assessment of sitemaps and user flows for logical structure, completeness, and ease of understanding.
  • Final Wireframe Kit Evaluation:

* Completeness: Does the kit include all required elements (screen flows, component library, interaction patterns, handoff notes)?

* Organization: Is the Figma file well-structured, easy to navigate, and clearly labeled?

* Usability: Are the wireframes clear, consistent, and easy to interpret for stakeholders and developers?

* Documentation: Is the "How to Use" guide clear and are annotations sufficient for developer handoff?

* Adherence to Principles: Does the kit demonstrate an understanding of core UX/UI principles?

This study plan provides a comprehensive roadmap for mastering the creation of a professional Mobile App Wireframe Kit, ensuring a strong foundation in design principles and practical tool application.

gemini Output

This deliverable provides a comprehensive mobile app wireframe specification in a structured, machine-readable format (JSON), accompanied by detailed explanations and developer handoff notes. This "code" represents the architectural blueprint of the application's user interface and interactions, enabling clear communication between design, product, and development teams.


Mobile App Wireframe Specification (JSON)

This JSON object defines the complete wireframe specification for a hypothetical "TaskFlow" mobile application. It includes screen definitions, navigation flows, a reusable component library, interaction patterns, and critical developer handoff notes.


{
  "app_name": "TaskFlow",
  "app_description": "A mobile application for efficient task management and productivity, designed to help users organize their daily tasks, set reminders, and track progress.",
  "version": "1.0.0-wireframe",
  "last_updated": "2023-10-27T10:30:00Z",
  "wireframe_specification": {
    "screens": [
      {
        "screen_id": "splash_screen",
        "name": "Splash Screen",
        "type": "Informational",
        "layout": {
          "type": "stack",
          "alignment": "center",
          "spacing": "20px"
        },
        "components": [
          { "component_type": "Image", "id": "app_logo", "props": { "src": "assets/logo_placeholder.png", "alt": "TaskFlow Logo", "width": "120px", "height": "120px" } },
          { "component_type": "Text", "id": "app_tagline", "props": { "text": "Your day, perfectly managed.", "style": "h3", "color": "#333333" } }
        ],
        "interactions": [
          { "event": "on_load", "action": "navigate", "target_screen_id": "onboarding_1", "delay_ms": 2000, "transition": "fade" }
        ]
      },
      {
        "screen_id": "onboarding_1",
        "name": "Onboarding Screen 1",
        "type": "Onboarding",
        "layout": {
          "type": "flex_column",
          "justify_content": "space_between",
          "padding": "24px"
        },
        "components": [
          { "component_type": "Image", "id": "onboarding_img_1", "props": { "src": "assets/onboarding_manage_tasks.png", "alt": "Manage Tasks Illustration", "height": "200px" } },
          { "component_type": "Text", "id": "onboarding_title_1", "props": { "text": "Organize Your Day", "style": "h2", "text_align": "center" } },
          { "component_type": "Text", "id": "onboarding_desc_1", "props": { "text": "Effortlessly create, categorize, and prioritize your tasks to stay on top of your schedule.", "style": "body1", "text_align": "center", "margin_top": "16px" } },
          { "component_type": "PaginationDots", "id": "onboarding_pagination", "props": { "current_page": 1, "total_pages": 3 } },
          { "component_type": "Button", "id": "next_button_1", "props": { "text": "Next", "variant": "primary", "width": "100%", "margin_top": "32px" }, "interactions": [{ "event": "on_click", "action": "navigate", "target_screen_id": "onboarding_2", "transition": "slide_left" }] },
          { "component_type": "Button", "id": "skip_button_1", "props": { "text": "Skip", "variant": "link", "width": "100%", "margin_top": "10px" }, "interactions": [{ "event": "on_click", "action": "navigate", "target_screen_id": "login_screen", "transition": "fade" }] }
        ]
      },
      {
        "screen_id": "login_screen",
        "name": "Login Screen",
        "type": "Authentication",
        "layout": {
          "type": "flex_column",
          "padding": "24px",
          "spacing": "16px"
        },
        "components": [
          { "component_type": "Text", "id": "login_title", "props": { "text": "Welcome Back!", "style": "h1", "text_align": "center", "margin_bottom": "32px" } },
          { "component_type": "TextInput", "id": "email_input", "props": { "placeholder": "Email Address", "keyboard_type": "email-address", "autocapitalize": "none" } },
          { "component_type": "TextInput", "id": "password_input", "props": { "placeholder": "Password", "keyboard_type": "default", "secure_text_entry": true } },
          { "component_type": "Button", "id": "forgot_password_link", "props": { "text": "Forgot Password?", "variant": "link", "text_align": "right" }, "interactions": [{ "event": "on_click", "action": "navigate", "target_screen_id": "forgot_password_screen", "transition": "slide_up" }] },
          { "component_type": "Button", "id": "login_button", "props": { "text": "Login", "variant": "primary", "width": "100%", "margin_top": "24px" }, "interactions": [{ "event": "on_click", "action": "perform_auth", "auth_type": "login", "on_success": { "action": "navigate", "target_screen_id": "task_list_screen", "transition": "fade" }, "on_failure": { "action": "show_toast", "message": "Invalid credentials." } }] },
          { "component_type": "Text", "id": "or_text", "props": { "text": "or", "style": "body2", "text_align": "center", "margin_top": "16px", "color": "#666666" } },
          { "component_type": "Button", "id": "google_login_button", "props": { "text": "Continue with Google", "variant": "secondary", "icon_left": "google_icon", "width": "100%" }, "interactions": [{ "event": "on_click", "action": "perform_auth", "auth_type": "google_oauth", "on_success": { "action": "navigate", "target_screen_id": "task_list_screen", "transition": "fade" } }] },
          { "component_type": "Button", "id": "apple_login_button", "props": { "text": "Continue with Apple", "variant": "secondary", "icon_left": "apple_icon", "width": "100%" }, "
gemini Output

This document provides a comprehensive Mobile App Wireframe Specification, serving as a foundational blueprint for the mobile application. It outlines the core structure, content, key user flows, reusable UI components, and interaction patterns, along with essential notes for development teams.


Mobile App Wireframe Specification

Project Name: [Insert Project Name Here]

Document Version: 1.0

Date: October 26, 2023

Prepared For: [Customer Name]

1. Introduction & Purpose

This Mobile App Wireframe Specification document details the foundational structure and user experience of the mobile application. It is designed to facilitate a shared understanding among stakeholders, designers, and developers regarding the app's layout, information architecture, and basic functionality.

Key Objectives:

  • Define Information Architecture: Outline the organization and hierarchy of content within the app.
  • Illustrate User Journeys: Map out critical user flows to ensure intuitive navigation.
  • Establish Core UI Elements: Document a reusable library of components for consistency and efficiency.
  • Specify Interaction Patterns: Describe how users will interact with the app's various elements.
  • Provide Developer Handoff Notes: Offer essential guidelines and considerations for the development phase.

This specification is a low-fidelity representation, focusing on functionality, content placement, and user flow rather than visual design elements like colors, typography, or detailed graphics.

2. Screen Flows

This section details the primary user journeys within the application, illustrating the sequence of screens and user actions required to complete specific tasks.

(Note: In a full deliverable, each flow would typically be accompanied by visual diagrams. Below is a textual representation of key flows.)

2.1. User Onboarding & Account Creation

Description: Guides new users through the initial setup process, including account registration or login, and an optional introductory tour.

  • Flow:

1. Splash Screen: App branding, brief loading.

2. Welcome Screen: Options to "Sign Up" or "Log In".

3. Sign Up Screen: Fields for Email, Password, Confirm Password. "Continue" button.

Action:* User enters details, taps "Continue".

4. Profile Setup (Optional): Fields for Name, Username, Profile Picture upload. "Skip" or "Complete Profile" button.

5. Permissions Request (Optional): Location, Notifications, Camera access. "Allow" / "Deny" options.

6. Onboarding Tour (Optional): Swipeable screens highlighting key features. "Skip" or "Get Started" button.

7. Home/Dashboard Screen: User lands on the main application interface.

2.2. Main Navigation & Content Browsing

Description: Illustrates how users navigate through the primary sections of the app and browse content.

  • Flow:

1. Home/Dashboard Screen: Displays personalized content feed/summary.

* Bottom Navigation Bar: Icons for Home, Search, Favorites, Profile.

* Top App Bar: App title, optional Search icon, Notification icon.

2. Action: User taps "Search" icon in Bottom Nav Bar.

3. Search Screen: Search bar, recent searches, popular categories.

Action:* User types query, taps "Search" on keyboard.

4. Search Results Screen: List/grid of results. Filters/Sort options available.

Action:* User taps on a specific item from the results.

5. Item Detail Screen: Displays detailed information about the selected item.

Action:* User taps "Back" arrow in Top App Bar.

6. Search Results Screen (or previous screen).

2.3. Item Creation/Submission

Description: Guides users through the process of creating and submitting new content within the app.

  • Flow:

1. Home/Dashboard Screen: Floating Action Button (FAB) for "Create New".

Action:* User taps FAB.

2. Choose Content Type Screen (if applicable): Options like "Post," "Event," "Product."

Action:* User selects "Post."

3. Create Post Screen:

* Fields: Title (text input), Description (multi-line text input), Image Upload (button/area), Tags (input with suggestions).

* Buttons: "Cancel," "Draft," "Publish."

Action:* User fills fields, taps "Publish."

4. Confirmation/Success Message: Toast or modal confirming submission.

5. Home/Dashboard Screen (or My Posts screen).

3. Component Library

This section defines the reusable UI components used throughout the application, ensuring consistency in design and interaction. Each component includes a description, typical states, and usage guidelines.

3.1. Buttons

  • Primary Button:

* Description: Main call-to-action button, visually prominent.

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

* Usage: For critical actions (e.g., "Submit," "Save," "Continue," "Buy Now").

  • Secondary Button:

* Description: Less prominent than primary, for alternative or less critical actions.

* States: Default, Hover/Pressed, Disabled.

* Usage: For actions like "Cancel," "Learn More," "Add to Cart" (when not the primary action).

  • Tertiary/Text Button:

* Description: Text-only button, minimal visual emphasis.

* States: Default, Hover/Pressed, Disabled.

* Usage: For less important actions, inline actions, or navigation within text (e.g., "Forgot Password?", "View All").

  • Icon Button:

* Description: Button represented solely by an icon.

* States: Default, Hover/Pressed, Disabled.

* Usage: For common actions like "Share," "Edit," "Delete," "Settings."

3.2. Text Inputs

  • Single-Line Text Input:

* Description: For short, single-line text entry (e.g., Name, Email, Username).

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

* Usage: Includes placeholder text, optional clear button.

  • Multi-Line Text Area:

* Description: For longer text entry (e.g., Description, Comments).

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

* Usage: Resizable (if applicable), character count (optional).

  • Password Input:

* Description: Single-line input specifically for passwords.

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

* Usage: Hides characters, includes optional "show/hide password" toggle.

3.3. Selection Controls

  • Checkbox:

* Description: Allows users to select zero, one, or multiple items from a set.

* States: Unchecked, Checked, Indeterminate, Disabled.

* Usage: For "I agree to terms," multiple selections in a list.

  • Radio Button:

* Description: Allows users to select exactly one item from a mutually exclusive set.

* States: Unselected, Selected, Disabled.

* Usage: For choosing options like gender, payment method.

  • Toggle Switch:

* Description: Represents a physical switch that allows users to turn something on or off.

* States: Off, On, Disabled.

* Usage: For settings like "Enable Notifications," "Dark Mode."

3.4. Navigation Components

  • Top App Bar (Header):

* Description: Located at the top of the screen, contains app title, navigation icons (back, menu), and actions (search, notifications).

* Usage: Consistent across most screens, providing context and primary actions.

  • Bottom Navigation Bar:

* Description: Located at the bottom of the screen, provides quick access to top-level destinations in the app.

* Usage: Typically 3-5 consistent icons/labels for primary sections (e.g., Home, Search, Profile).

  • Tab Bar:

* Description: Organizes content into different sections on a single screen, allowing users to switch between them.

* Usage: For displaying different views of the same content (e.g., "Posts," "Comments," "Media" on a profile page).

3.5. Content Display

  • Cards:

* Description: A flexible container for displaying related content in a distinct, self-contained block.

* Usage: For list items, articles, product displays, user profiles. Can contain images, text, buttons.

  • List Items:

* Description: A single row in a list, often containing a title, subtitle, and optional icon/avatar.

* Usage: For settings menus, contact lists, notification feeds.

  • Avatars:

* Description: Circular or square representation of a user or entity, often containing an image or initials.

* Usage: User profiles, comments, chat interfaces.

3.6. Feedback & Indicators

  • Toast Message:

* Description: A small, temporary message that appears at the bottom of the screen to provide brief feedback, then disappears automatically.

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

  • Snackbar:

* Description: Similar to a toast, but can contain an action button and is dismissible.

* Usage: For "Undo" actions after a deletion, "Retry" for network issues.

  • Loading Indicator/Spinner:

* Description: Visual cue indicating that content is loading or an action is in progress.

* Usage: Full-screen for initial load, inline for specific component loading.

4. Interaction Patterns

This section describes common interaction patterns within the application, detailing how users will manipulate and engage with the UI elements.

4.1. Basic Gestures

  • Tap/Click:

* Description: A quick touch on an interactive element.

* Effect: Activates buttons, selects list items, opens new screens.

* Usage: Primary interaction for most UI elements.

  • Swipe (Horizontal):

* Description: Dragging a finger across the screen horizontally.

* Effect: Navigates between tabs, dismisses items, reveals hidden actions (e.g., "delete" on a list item).

* Usage: Image carousels, tab navigation, swipe-to-delete.

  • Swipe (Vertical)/Scroll:

* Description: Dragging a finger up or down the screen.

* Effect: Navigates through long lists of content.

* Usage: Feeds, long articles, settings pages.

  • Pull-to-Refresh:

* Description: Pulling down on the top of a scrollable view.

* Effect: Triggers a refresh of the content.

* Usage: Feeds, email inboxes, news lists.

4.2. Form Interactions

  • Input Focus & Keyboard:

* Description: Tapping on a text input field brings it into focus and displays the virtual keyboard.

* Effect: Keyboard appears, input field may scroll into view.

* Usage: Any screen requiring text entry.

  • Form Validation:

* Description: Feedback provided when user input does not meet required criteria.

* Effect: Inline error messages (e.g., "Invalid email format"), visual cues (e.g., red border around input).

* Usage: Registration, login, data submission forms.

4.3. Feedback & Confirmation

  • Confirmation Dialog/Modal:

* Description: A temporary overlay that requires user input before proceeding.

* Effect: Pauses user flow, presents a question (e.g., "Are you sure you want to delete?"), and offers "Yes/No" or "Confirm/Cancel" options.

* Usage: Destructive actions, important decisions.

  • Loading States:

* Description: Visual indicators that content is being fetched or an action is in progress.

* Effect: Spinners, skeleton screens, progress bars.

* Usage: During network requests, complex calculations, initial app load.

4.4. Navigation & Modals

  • Sheet Modals (Bottom Sheet):

* Description: A panel that slides up from the bottom of the screen, partially covering the

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