Mobile App Wireframe Kit
Run ID: 69cb4c6b61b1021a29a87c012026-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: Detailed Study Plan

This comprehensive study plan is designed to guide you through the process of mastering mobile app wireframing, from foundational UX principles to creating complete, developer-ready wireframe specifications. By following this plan, you will gain the skills necessary to translate app concepts into structured visual blueprints, ensuring clear communication and efficient development.


1. Introduction & Goal

This study plan aims to equip individuals with the knowledge and practical skills required to generate a complete mobile app wireframe specification. This includes developing screen flows, establishing a component library, defining interaction patterns, and preparing detailed developer handoff notes. The ultimate goal is to enable you to effectively plan and communicate the structure and functionality of a mobile application before moving into high-fidelity design.

Target Audience: Aspiring UI/UX designers, product managers, developers seeking to enhance design communication, or anyone interested in the foundational aspects of mobile app design.

Duration: 4 Weeks (approx. 10-15 hours per week, adjustable based on prior experience and learning pace).


2. Weekly Schedule

This schedule provides a structured learning path. It is recommended to dedicate consistent time each week, breaking down daily tasks as needed.

Week 1: Foundations of UX & Wireframing

  • Learning Objectives:

* Understand the purpose, benefits, and different types of wireframes.

* Grasp core User-Centered Design (UCD) principles and usability heuristics.

* Learn basic Information Architecture (IA) concepts relevant to mobile apps.

* Familiarize yourself with the mobile-first approach and common UI elements.

  • Key Activities:

* Days 1-2: Wireframing Fundamentals

* Readings: "What are wireframes?", "Low-fidelity vs. High-fidelity wireframes," "Why wireframe?"

* Explore various wireframing tools (Figma, Sketch, Adobe XD, Balsamiq) – choose one to focus on.

* Days 3-4: UX Principles

* Readings: Nielsen's 10 Usability Heuristics, Introduction to UCD, Basics of IA (navigation, content hierarchy).

* Analyze existing popular mobile apps for their navigation and information structure.

* Days 5-7: Mobile UI Basics & Sketching

* Readings: Mobile-First Design, Common mobile UI patterns (tabs, navigation bars, lists, cards).

* Practice sketching basic mobile app screens on paper (e.g., a login, a home screen, a profile screen) for a hypothetical app idea.

  • Milestone: Completed initial sketches for a simple app concept (3-5 screens) and a foundational understanding of UX principles.

Week 2: Digital Wireframe Creation & Screen Flows

  • Learning Objectives:

* Proficiently use a chosen design tool (e.g., Figma) to create digital low-fidelity wireframes.

* Develop a clear understanding of user flows and screen flows.

* Map out comprehensive user journeys and connect individual wireframes logically.

  • Key Activities:

* Days 1-2: Tool Mastery & Core Screens

* Tutorials: Master the basics of your chosen tool (setting up projects, artboards/frames, basic shapes, text, alignment).

* Translate your Week 1 sketches into digital low-fidelity wireframes.

* Focus on consistency in layout and spacing.

* Days 3-4: User Flows vs. Screen Flows

* Readings/Videos: Differentiating user flows from screen flows.

* Identify key user tasks for your app concept (e.g., "create an account," "search for a product").

* Days 5-7: Building Screen Flows

* Using your wireframes, create screen flow diagrams within your design tool or a dedicated flow tool (e.g., Miro, Whimsical).

* Connect screens with arrows, clearly labeling actions and decisions.

* Hands-on Project: Create digital wireframes and a complete screen flow for a 5-7 screen mobile app (e.g., a simple task manager or recipe app).

  • Milestone: Completed digital low-fidelity wireframes for core screens and a clear screen flow diagram for your chosen app concept.

Week 3: Component Library & Interaction Patterns

  • Learning Objectives:

* Understand the principles of component-based design (e.g., Atomic Design).

* Create reusable UI components with different states within your design tool.

* Identify and apply standard mobile interaction patterns and gestures.

* Develop basic interactive prototypes to simulate user experience.

  • Key Activities:

* Days 1-2: Component System

* Readings: Introduction to Atomic Design, Benefits of component libraries.

* Identify common UI elements in your wireframes (buttons, input fields, cards, headers, navigation).

* Convert these elements into reusable components/symbols/masters in your design tool.

* Define component states (default, hover, active, disabled, error).

* Days 3-4: Interaction Patterns

* Readings: Common mobile gestures (tap, swipe, pinch), Navigation patterns (tab bars, hamburger menus), Form interactions (validation, keyboards).

* Analyze how popular apps handle user feedback (toasts,

gemini Output

This document provides a comprehensive wireframe specification for a mobile application, serving as a blueprint for design and development. It outlines core user flows, defines reusable UI components, details interaction patterns, and includes crucial notes for developers to ensure accurate implementation.


1. Introduction & Project Overview

1.1 Project Name

Mobile App Wireframe Kit - General Purpose Application

1.2 Document Purpose

This specification details the structure, functionality, and user experience of the mobile application at a wireframe level. It aims to provide a clear, unambiguous guide for UI/UX designers, product managers, and development teams.

1.3 Target Audience

  • Product Managers
  • UI/UX Designers
  • Front-end Developers (iOS, Android, React Native, Flutter)
  • QA Testers

1.4 Scope

This document covers the foundational elements of the mobile application's user interface and core interactions, focusing on structure and functionality rather than final visual design (colors, typography, specific imagery).

1.5 Revision History

| Version | Date | Author | Description |

| :------ | :--------- | :----- | :------------------------------------------- |

| 1.0 | 2023-10-27 | Gemini | Initial comprehensive wireframe specification |


2. Core User Flows

This section details the primary user journeys within the application, illustrating the sequence of screens and key user actions.

2.1 User Onboarding & Authentication Flow

Flow Name: User Sign Up / Login / Forgot Password

Goal: Allow new users to register and existing users to log in or recover their account.

Screens & Interactions:

  1. Splash Screen (Initial Load)

* Description: Displays app logo briefly.

* Transition: Auto-advances after 2 seconds to Welcome Screen.

  1. Welcome Screen

* Description: Greets the user, offers options to Sign Up or Log In.

* Components:

* Image: App Logo / Onboarding Illustration

* Text: "Welcome to [App Name]!"

* Button (Primary): "Sign Up" -> Navigates to Sign Up Screen

* Button (Secondary): "Log In" -> Navigates to Log In Screen

* Gesture: Swipe left/right (optional) for onboarding slides.

  1. Sign Up Screen

* Description: Collects user information for registration.

* Components:

* Header: "Create Account"

* Text Input: "Email Address" (Keyboard: email, Validation: email format)

* Text Input: "Password" (Keyboard: default, secure text entry, Validation: min 8 chars, 1 uppercase, 1 number)

* Text Input: "Confirm Password" (Keyboard: default, secure text entry, Validation: matches Password field)

* Checkbox: "I agree to the Terms of Service and Privacy Policy" (Link to external web view)

* Button (Primary): "Sign Up" -> On success, navigates to Home Screen. On error, displays Toast message.

* Text Link: "Already have an account? Log In" -> Navigates to Log In Screen

* Interaction: Form validation on blur/submit.

  1. Log In Screen

* Description: Allows existing users to authenticate.

* Components:

* Header: "Welcome Back!"

* Text Input: "Email Address" (Keyboard: email, Validation: email format)

* Text Input: "Password" (Keyboard: default, secure text entry)

* Button (Primary): "Log In" -> On success, navigates to Home Screen. On error, displays Toast message.

* Text Link: "Forgot Password?" -> Navigates to Forgot Password Screen

* Text Link: "Don't have an account? Sign Up" -> Navigates to Sign Up Screen

* Interaction: Form validation on blur/submit.

  1. Forgot Password Screen

* Description: Enables users to request a password reset.

* Components:

* Header: "Forgot Password"

* Text: "Enter your email address to receive a password reset link."

* Text Input: "Email Address" (Keyboard: email, Validation: email format)

* Button (Primary): "Send Reset Link" -> On success, displays Modal "Check your email." On error, displays Toast message.

* Interaction: After sending, navigates back to Log In Screen or shows success message.


2.2 Main Content Browsing / Discovery Flow (Example: E-commerce Product Listing)

Flow Name: Product Discovery & Detail View

Goal: Allow users to browse products, filter them, and view product details.

Screens & Interactions:

  1. Home Screen

* Description: Main landing screen after login, featuring curated content or categories.

* Components:

* Top Bar: App Logo/Title, Icon Button (Search), Icon Button (Notifications)

* Carousel: Featured Products/Promotions

* Section Header: "Categories"

* Category Grid/List: Tappable Card items (e.g., "Electronics", "Clothing") -> Navigates to Product Listing Screen (filtered by category)

* Section Header: "Recommended for You"

* Product Card List: Scrollable list of Product Card items -> On tap, navigates to Product Detail Screen

* Bottom Navigation: Icon Button (Home - active), Icon Button (Search), Icon Button (Cart), Icon Button (Profile)

  1. Search Results Screen

* Description: Displays products based on user search query.

* Entry Point: From Home Screen via Search Icon Button.

* Components:

* Top Bar: Icon Button (Back), Text Input (Search Bar, pre-filled with query), Icon Button (Filter)

* Text: "Showing results for '[Search Query]'"

* Product Card List: Scrollable list of Product Card items -> On tap, navigates to Product Detail Screen

* Empty State: If no results, displays Image (No Results Icon), Text ("No results found for '[Search Query]'."), Button ("Browse All Products").

* Interaction: Icon Button (Filter) opens Filter/Sort Modal.

  1. Product Listing Screen

* Description: Displays a list of products, often filtered by a category or search.

* Entry Point: From Home Screen (Category Tap) or Search Results Screen (Filter applied).

* Components:

* Top Bar: Icon Button (Back), Text (Category Name/Title), Icon Button (Search), Icon Button (Filter)

* Product Card List: Scrollable list of Product Card items -> On tap, navigates to Product Detail Screen

* Loading Indicator: Displays while fetching more products on scroll (pagination).

* Interaction: Pull-to-refresh to reload list. Infinite scroll to load more items.

  1. Filter / Sort Modal

* Description: Allows users to refine product listings.

* Components:

* Header: "Filter & Sort"

* Section Header: "Sort By"

* Radio Button Group: "Price: Low to High", "Price: High to Low", "Newest", "Popularity"

* Section Header: "Price Range"

* Slider: Min/Max price selection

* Section Header: "Brand"

* Checkbox List: List of brands (e.g., "Brand A", "Brand B")

* Button (Secondary): "Clear All"

* Button (Primary): "Apply Filters" -> Applies filters and closes modal, refreshing Product Listing Screen.

* Interaction: Modal slides up from bottom.

  1. Product Detail Screen

* Description: Displays detailed information about a single product.

* Components:

* Top Bar: Icon Button (Back), Icon Button (Share), Icon Button (Favorite)

* Image Carousel: Multiple product images (swipeable)

* Text: Product Name (Large, Bold)

* Text: Price (Prominent)

* Text: Product Description (Scrollable)

* Rating Component: Stars, Number of Reviews

* Dropdown/Selector: "Select Size", "Select Color"

* Button (Primary): "Add to Cart" -> On tap, displays Toast "Added to cart", updates Cart Icon badge.

* Button (Secondary): "Buy Now" -> Navigates directly to Checkout Flow.

* Section Header: "Related Products"

* Product Card List: Horizontal scrollable list of Product Card items.

* Interaction: Tapping Add to Cart updates the cart state.


2.3 Cart & Checkout Flow

Flow Name: Purchase Flow

Goal: Allow users to review their cart, proceed to checkout, and complete a purchase.

Screens & Interactions:

  1. Cart Screen

* Description: Displays items added to the user's shopping cart.

* Entry Point: From Bottom Navigation (Cart Icon) or Product Detail Screen (Add to Cart).

* Components:

* Top Bar: Icon Button (Back), Text ("Your Cart")

* Cart Item List: For each item:

* Image: Product Thumbnail

* Text: Product Name

* Text: Price

* Quantity Selector: Increment/Decrement buttons, displays current quantity

* Icon Button: "Remove" (deletes item from cart)

* Text: "Subtotal: [Amount]"

* Button (Primary): "Proceed to Checkout" -> Navigates to Checkout - Shipping Screen.

* Empty State: If cart is empty, displays Image (Empty Cart Icon), Text ("Your cart is empty."), Button ("Start Shopping").

* Interaction: Quantity updates dynamically. Removing an item updates subtotal.

  1. Checkout - Shipping Screen

* Description: Collects shipping address and delivery preferences.

* Components:

* Top Bar: Icon Button (Back), Text ("Checkout"), Progress Indicator (Step 1 of 3: Shipping)

* Section Header: "Shipping Address"

* Text Input: "Full Name"

* Text Input: "Address Line 1"

* Text Input: "Address Line 2 (Optional)"

* Text Input: "City"

* Dropdown: "State/Province"

* Text Input: "Zip/Postal Code"

* Section Header: "Delivery Options"

* Radio Button Group: "Standard (3-5 days)", "Express (1-2 days)" (with price difference)

* Button (Primary): "Continue to Payment" -> Navigates to Checkout - Payment Screen.

* Interaction: Form validation. Auto-fill options (if available).

  1. Checkout - Payment Screen

*

gemini Output

Mobile App Wireframe Kit: Complete Specification

This document provides a comprehensive wireframe specification for your mobile application, serving as a functional blueprint for its design and development. It outlines the core user experience, screen flows, reusable UI components, interaction patterns, and essential notes for the development team.


1. Introduction & Overview

This Mobile App Wireframe Kit is a foundational deliverable aimed at clearly defining the structure, content, and functionality of your mobile application. It focuses on the user experience (UX) and information architecture, laying out the "what" and "how" of the app's core features without delving into visual aesthetics (which will be covered in subsequent UI design phases).

Key Objectives:

  • To visualize the app's user journeys and screen sequences.
  • To define the layout and essential elements of each screen.
  • To establish a consistent set of reusable UI components.
  • To detail key user interaction patterns.
  • To provide clear instructions and considerations for the development team.

2. Screen Flows & User Journeys

This section details the primary user flows within the application, illustrating the sequence of screens a user will navigate to complete specific tasks. Each flow is described sequentially, outlining the screens involved and the user's actions.

(Note: For a full project, these flows would be accompanied by visual flowcharts or diagrams.)

2.1. Flow 1: Onboarding & Account Creation

Objective: Guide new users through initial app setup and account registration.

  1. Splash Screen (Optional): App logo and branding.

Action:* Automatic transition after 2-3 seconds.

  1. Welcome/Introduction Screens (x3): Brief feature highlights or value proposition.

Elements:* Image/Illustration, Title, Description, "Skip" button, "Next" button, Progress Indicator (dots).

Action:* Tap "Next" to advance, "Skip" to go to Login/Signup.

  1. Login/Signup Screen:

Elements:* Email/Password input fields, "Forgot Password" link, "Login" button, "Register" button, Social login options (e.g., Google, Apple).

Action:* Tap "Login" (if existing user), Tap "Register" (if new user).

  1. Registration Form (if "Register" tapped):

Elements:* Name, Email, Password, Confirm Password, "Agree to T&C" checkbox, "Register" button.

Action:* Fill form, tap "Register".

  1. Account Verification (Optional): Screen for email or SMS verification code entry.

Elements:* Input field for code, "Resend Code" link, "Verify" button.

Action:* Enter code, tap "Verify".

  1. Profile Setup (Optional): Initial profile details (e.g., avatar, preferences).

Elements:* Photo upload, Name, Bio (optional), "Save" button.

Action:* Complete details, tap "Save".

  1. Home Screen: Navigate to the main app dashboard.

2.2. Flow 2: Main Feature X (e.g., Creating a New Task)

Objective: Allow users to easily create and save a new task.

  1. Home Screen:

Elements:* List of existing tasks, "Add New Task" (Floating Action Button - FAB) or similar button.

Action:* Tap "Add New Task" FAB.

  1. New Task Screen:

Elements:* Task Title (text input), Description (multiline text input), Due Date Picker, Priority Selector (dropdown/radio buttons), Category Selector, "Add Tags" (optional), "Save Task" button, "Cancel" button.

Action:* Fill in task details.

  1. Date Picker Modal:

Elements:* Calendar view, time selector, "Set Date" button, "Cancel" button.

Action:* Select date/time, tap "Set Date".

  1. Category Selector Screen/Modal:

Elements:* List of categories (checkboxes or radio buttons), "Done" button.

Action:* Select category, tap "Done".

  1. Confirmation/Success Message: Brief toast or snackbar message indicating task saved.
  2. Home Screen: Return to the Home Screen with the new task added to the list.

2.3. Flow 3: Profile Management

Objective: Enable users to view and update their profile information.

  1. Home Screen:

Elements:* Navigation bar/Drawer with "Profile" access.

Action:* Tap "Profile" icon/menu item.

  1. Profile Screen:

Elements:* User avatar, Name, Email, Editable fields (e.g., Phone, Address, Bio), "Edit Profile" button, "Change Password" button, "Logout" button.

Action:* Tap "Edit Profile".

  1. Edit Profile Screen:

Elements:* Editable Name, Phone, Address, Bio fields, "Save Changes" button, "Cancel" button.

Action:* Modify fields, tap "Save Changes".

  1. Confirmation/Success Message: Toast/snackbar confirming updates.
  2. Profile Screen: Return to updated Profile Screen.

3. Wireframe Specifications (Example Screen)

This section provides a detailed breakdown of an example screen's structure, content, and interactive elements. Each screen in the wireframe kit would have a similar specification.

Example: Home Screen (Screen ID: HS-001)

Purpose: Display an overview of the user's main tasks/content and provide quick access to key actions.

Key Elements & Layout:

  • Top Navigation Bar (Header):

* Left: Hamburger Menu Icon (Toggles Side Navigation Drawer)

* Center: App Logo / Screen Title ("My Tasks")

* Right: Search Icon (Navigates to Search Screen)

  • Main Content Area:

* Greeting/Summary: "Hello [User Name], you have X tasks due today."

* Quick Filters/Categories (Horizontal Scroll):

* "All Tasks" (Default)

* "Today"

* "Upcoming"

* "Completed"

* "Work"

* "Personal"

* Task List (Vertical Scroll):

* Each item: Checkbox (for completion), Task Title, Due Date, Priority Indicator, Category Tag.

State:* Tasks can be marked as complete (strike-through text, faded).

Behavior:* Tap on a task item to view/edit Task Details Screen.

Behavior:* Swipe left/right on a task item for quick actions (e.g., Delete, Snooze).

  • Floating Action Button (FAB):

* Icon: Plus (+)

* Position: Bottom Right

* Purpose: Quickly create a new task.

Interaction Notes:

  • Hamburger Menu: Tapping opens the left-aligned navigation drawer (see Component Library: Navigation Drawer).
  • Search Icon: Tapping navigates to the "Search Screen" (SCR-005).
  • Quick Filters: Tapping a filter updates the task list below without full screen refresh.
  • Task Item Tap: Navigates to "Task Details Screen" (SCR-003), passing the selected task ID.
  • Task Item Swipe:

* Swipe Left: Reveals "Delete" and "Snooze" buttons.

* Swipe Right: Reveals "Mark Complete" button.

  • FAB Tap: Navigates to "New Task Screen" (SCR-002).
  • Pull-to-Refresh: Pulling down on the task list refreshes the data.

Navigation Notes:

  • Outgoing:

* To Navigation Drawer (Component)

* To Search Screen (SCR-005)

* To Task Details Screen (SCR-003)

* To New Task Screen (SCR-002)

  • Incoming:

* From Login/Signup Screen (SCR-001)

* From New Task Screen (SCR-002) after saving

* From Task Details Screen (SCR-003) after editing/deleting


4. Component Library

This section defines the reusable UI components that will be consistently used throughout the application. Each component includes its purpose, states, and general behavior.

4.1. Buttons

  • Primary Button:

Purpose:* Main call-to-action (e.g., "Save", "Submit", "Login").

States:* Default, Hover (web only), Pressed, Disabled, Loading.

Behavior:* Triggers primary action on tap.

  • Secondary Button:

Purpose:* Less prominent actions (e.g., "Cancel", "Back", "More Info").

States:* Default, Pressed, Disabled.

Behavior:* Triggers secondary action on tap.

  • Text Button (Link):

Purpose:* Navigational links or tertiary actions (e.g., "Forgot Password?", "Skip").

States:* Default, Pressed.

Behavior:* Navigates or triggers a minor action.

  • Floating Action Button (FAB):

Purpose:* Prominent action, often for creation (e.g., "Add New", "Compose").

States:* Default, Pressed.

Behavior:* Fixed position, triggers primary action.

4.2. Text Input Fields

  • Single-Line Text Input:

Purpose:* Short text entries (e.g., "Name", "Email", "Password").

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

Elements:* Label, Placeholder Text, Input Area, Optional Clear button, Optional Helper/Error Text.

Behavior:* Displays keyboard on tap, validates input.

  • Multi-Line Text Area:

Purpose:* Longer text entries (e.g., "Description", "Comments").

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

Elements:* Label, Placeholder Text, Input Area, Optional Character Count.

Behavior:* Displays keyboard on tap, expands vertically if needed.

4.3. Navigation Elements

  • Top App Bar (Header):

Purpose:* Displays screen title, actions, and navigation controls.

Elements:* Back button, Hamburger menu, Screen Title, Action Icons (e.g., Search, Share, More Options).

Behavior:* Sticky to top, provides global actions.

  • Bottom Navigation Bar:

Purpose:* Persistent navigation for 3-5 primary destinations.

Elements:* 3-5 icons with optional text labels.

States:* Selected, Unselected.

Behavior:* Tapping navigates to the respective section; active item is highlighted.

  • Navigation Drawer (Side Menu):

Purpose:* Houses less frequent navigation links, settings, or user profile access.

Elements:* Header (user info), List of menu items (e.g., Home, Profile, Settings, Logout).

Behavior:* Slides in from the left/right, dismisses on tap outside or on "X" button.

4.4. Information Display

  • Cards:

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

Elements:* Title, Image, Description, Buttons/Actions.

Behavior:* Can be tappable, swipeable, or contain interactive elements.

  • Lists:

Purpose:* Display a series of related items (e.g., tasks, messages, settings).

Elements:* Item icon, Primary text, Secondary text, Accessory (e.g., arrow, checkbox).

Behavior:* Tappable for detail view, swipeable for quick actions.

  • Toast/Snackbar:

Purpose:* Provide brief, non-intrusive feedback or notifications.

Elements:* Short message, optional action button.

Behavior:* Appears temporarily, disappears automatically.

  • Modals/Dialogs:

Purpose:* Interrupt user flow for critical information, confirmation, or input.

Elements:* Title, Message, Action Buttons (e.g., "OK", "Cancel").

Behavior:* Overlays content, requires user interaction to dismiss.

4.5. Selectors

  • Checkboxes:

Purpose:* Select multiple options from a list.

States:* Checked, Unchecked, Disabled.

  • Radio Buttons:

Purpose:* Select a single option from a list.

States:* Selected, Unselected, Disabled.

  • Switches/Toggles:

Purpose:* Turn an option on or off.

States:* On, Off, Disabled.

  • Dropdown Selectors:

Purpose:* Select one option from a predefined list.

Elements:* Current selection display, Pop-up list of options.


5. Interaction Patterns

This section describes common interaction patterns used throughout the application, ensuring consistency and predictability for the user.

5.1. Form Submission

  • Pattern: User fills out fields and taps a "Submit" or "Save" button.
  • Feedback:

* Loading State: Button changes to a loading spinner or text changes to "Saving..."

* Success: Toast/Snackbar message (e.g., "Task Saved Successfully!") or transition to a confirmation screen.

* Error: Inline error messages below affected input fields, or a modal for general errors.

  • Validation: Real-time validation where possible (e.g., email format), or on submission.

5.2. Item Selection

  • Pattern: User selects one or more items from a list.
  • Single Selection:

Method:* Radio buttons, single tap on item (for navigation/detail view).

Feedback:* Highlight selected item.

  • Multiple Selection:

Method:* Checkboxes, long press to activate

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