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

As a professional AI assistant, I have generated a comprehensive Mobile App Wireframe Specification based on your request. This document outlines the key aspects of a mobile application's user interface, user experience, and technical considerations, serving as a critical deliverable for developers and stakeholders.


Mobile App Wireframe Specification

Project: Simple Task Manager App

Version: 1.0

Date: October 26, 2023

Author: PantheraHive AI


1. Introduction & Project Overview

This document provides a detailed wireframe specification for a "Simple Task Manager" mobile application. The goal of this application is to enable users to efficiently manage their daily tasks, offering features for viewing, adding, and marking tasks as complete. This specification focuses on the core user experience and visual layout, serving as a blueprint for the design and development teams.

Target Audience: Individuals seeking a straightforward, intuitive tool to organize their personal or work-related tasks.

Key Objectives:


2. Key User Flows (Screen Flows)

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

2.1. Flow: View and Manage Tasks

Goal: User wants to see their current tasks and interact with them (mark complete, view details).

  1. Start: User opens the app.
  2. Screen 1: Task List (Home Screen)

* User sees a list of tasks.

* Action: User scrolls through the list.

* Action: User taps a checkbox next to a task.

* Transition: Task is marked as complete and visually updated (e.g., struck through, moved to a "Completed" section).

* Action: User taps the "Add Task" FAB (Floating Action Button).

* Transition: Navigates to Screen 2: Add New Task.

* Action: User taps the "Filter" icon (top right).

* Transition: Opens a filter modal/sheet (e.g., "All," "Active," "Completed").

* Action: User selects a filter option.

* Transition: Task list updates based on the selected filter.

2.2. Flow: Add a New Task

Goal: User wants to create a new task.

  1. Start: User is on Screen 1: Task List.
  2. Action: User taps the "Add Task" FAB.
  3. Transition: Navigates to Screen 2: Add New Task.
  4. Screen 2: Add New Task

* User sees an input field for the task title.

* User sees an optional input field for task description.

* User sees a "Due Date" picker (optional).

* User sees a "Priority" selector (optional).

* User sees "Cancel" and "Save" buttons.

* Action: User types a task title.

* Action: User taps "Save".

* Transition: Task is added, and the user navigates back to Screen 1: Task List. The new task appears in the list.

* Action (Alternative): User taps "Cancel" or the back arrow.

* Transition: Navigates back to Screen 1: Task List without saving the task.


3. Component Library

This section defines reusable UI components, their states, and properties, ensuring consistency across the application.

text • 1,675 chars
---

### 4. Interaction Patterns

This section describes common interaction behaviors within the application, ensuring a consistent and intuitive user experience.

*   **Tap/Press:**
    *   **Purpose:** Activate a button, select a list item, toggle a checkbox.
    *   **Feedback:** Visual feedback (e.g., ripple effect, slight color change) on tap.
*   **Scroll:**
    *   **Purpose:** Navigate through lists or content longer than the screen height.
    *   **Behavior:** Standard vertical scrolling for task lists.
*   **Keyboard Input:**
    *   **Purpose:** Enter text into input fields.
    *   **Behavior:** On tapping a text input field, the software keyboard appears. The UI should adjust (e.g., scroll, resize) to ensure the focused input field is visible above the keyboard.
*   **Modals/Bottom Sheets:**
    *   **Purpose:** Present temporary, contextual information or actions (e.g., filter options, date picker).
    *   **Behavior:** Appears from the bottom or center, overlays the current screen, and can be dismissed by tapping outside or using a dedicated close/cancel action.
*   **System Back Navigation:**
    *   **Purpose:** Navigate back to the previous screen or dismiss a modal/keyboard.
    *   **Behavior:** Utilizes the device's native back button (Android) or a dedicated back arrow in the App Bar (iOS/Android).

---

### 5. Screen Specifications (Detailed Wireframes)

This section provides detailed specifications for each primary screen, outlining its structure, components, and interactions.

#### 5.1. Screen 1: Task List (Home Screen)

**Purpose:** Display all tasks, allow users to mark tasks complete, and navigate to add new tasks.

Sandboxed live preview

Project: Mobile App Wireframe Kit

Step: 1 of 3 - plan_architecture

Output: Architectural Planning Guide for Mobile App Wireframe Kit


Architectural Planning Guide for Mobile App Wireframe Kit

This document outlines the comprehensive architectural planning phase for your Mobile App Wireframe Kit. The goal of this step is to define the foundational structure, core functionalities, user flows, and key components of your mobile application before diving into detailed wireframe creation. This ensures a robust, scalable, and user-centric design process, setting the stage for efficient development and a cohesive user experience.


1. Introduction & Objectives

The plan_architecture step is crucial for establishing a solid blueprint for your mobile application. It involves understanding user needs, defining the app's core purpose, mapping out user journeys, and identifying reusable UI elements. This guide serves as your roadmap for this foundational phase.

1.1 Overall Goal:

To generate a detailed architectural plan that clearly defines the mobile app's structure, functionality, user interactions, and the preliminary considerations for its wireframe kit, ensuring alignment with user and business requirements.

1.2 Architectural Definition Objectives:

By the end of this planning phase, we aim to achieve the following:

  • Clearly Define Core Functionalities: Identify and articulate the primary features and capabilities of the mobile application.
  • Map Primary User Journeys: Document the essential paths users will take to achieve their goals within the app.
  • Establish Consistent Screen Hierarchy & Navigation: Outline the app's information architecture (IA) and main navigation structure.
  • Identify Key Screen Types: Determine the critical screens required to support the defined functionalities and user flows.
  • Inventory Reusable UI Components & Interaction Patterns: Begin cataloging common UI elements (buttons, inputs, cards) and interaction paradigms (swipes, taps, modals) that will form the basis of the wireframe kit.
  • Lay Groundwork for Efficient Wireframe Creation: Provide a clear structure and set of guidelines for the subsequent wireframing and prototyping steps.
  • Prepare Preliminary Developer Handoff Notes: Document initial technical considerations and assumptions to facilitate a smoother transition to development.

2. Phased Schedule for Architecture Planning (4 Weeks)

This schedule outlines a phased approach to systematically develop the architectural plan. Each phase builds upon the previous one, ensuring a comprehensive and iterative process.

2.1 Phase 1: Discovery & Requirements Gathering (Week 1)

  • Focus: Understanding the problem, user needs, business goals, and defining the app's core purpose.
  • Activities:

* Kick-off Meeting: Align all stakeholders on project goals and scope.

* User Research Synthesis: Review existing user research, personas, and pain points. If none exist, define target user segments and primary use cases.

Functional Requirements Definition: Document what the app must do*.

* Non-Functional Requirements Identification: Consider performance, security, accessibility, etc., at a high level.

* Competitive Analysis: Analyze existing apps in the market to identify best practices, gaps, and differentiation opportunities.

  • Key Deliverables:

* Project Scope Document (high-level)

* User Stories / Use Cases (initial draft)

* Functional & Non-Functional Requirements List

* Competitive Analysis Summary

2.2 Phase 2: Core Structure & Flow Definition (Week 2)

  • Focus: Translating requirements into a logical structure and user journeys.
  • Activities:

* Information Architecture (IA) Design: Create a sitemap or content hierarchy to define how information will be organized and navigated.

* Key User Flow Mapping: Diagram the most critical user paths through the application (e.g., onboarding, main task completion, profile management).

* Identify Key Screens: Based on IA and user flows, list the essential screens required for the app.

* Navigation Model Definition: Determine the primary navigation patterns (e.g., tab bar, hamburger menu, progressive disclosure).

  • Key Deliverables:

* Detailed Sitemap / Information Architecture Diagram

* Annotated User Flow Diagrams (for 3-5 core flows)

* Preliminary Key Screen List

2.3 Phase 3: Component & Interaction Pattern Identification (Week 3)

  • Focus: Identifying reusable UI elements and common interaction paradigms.
  • Activities:

* UI Component Inventory (Initial): List common UI elements needed across the app (e.g., buttons, text fields, cards, lists, modals, alerts).

* Interaction Pattern Definition: Document how users will interact with the app (e.g., tap, swipe, long press, drag-and-drop, form submission, search).

* Platform Guidelines Review: Consult iOS Human Interface Guidelines and Android Material Design principles to inform component and interaction choices.

* Accessibility Considerations: Begin to integrate accessibility best practices into component and interaction design.

  • Key Deliverables:

* Initial UI Component Inventory (categorized)

* List of Core Interaction Patterns

* Accessibility Checklist (initial)

2.4 Phase 4: Technical & Handoff Considerations / Architectural Plan Finalization (Week 4)

  • Focus: Consolidating the plan, adding preliminary technical notes, and preparing for wireframing.
  • Activities:

* Consolidate Architectural Plan: Compile all documentation from previous phases into a cohesive "Architectural Specification Document."

* Preliminary Developer Handoff Notes: Add high-level technical considerations (e.g., API dependencies, data structures, animation principles, platform-specific behaviors).

* Review & Refine: Conduct internal reviews with design and product teams.

* Stakeholder Presentation: Present the finalized architectural plan to key stakeholders for feedback and approval.

  • Key Deliverables:

* Complete Architectural Specification Document (including all previous deliverables)

* Preliminary Developer Handoff Notes

* Approved Architectural Plan


3. Recommended Tools & Methodologies

Leveraging the right tools and methodologies can significantly enhance the efficiency and quality of your architectural planning.

3.1 Methodologies:

  • User-Centered Design (UCD): Emphasize understanding user needs and incorporating feedback throughout the process.
  • Agile Principles: Adopt an iterative approach, allowing for flexibility and adaptation as new insights emerge.
  • Design Thinking: Utilize empathize, define, ideate, prototype, and test stages (even at a conceptual level in this phase).

3.2 Tools:

  • Discovery & Documentation:

* Confluence/Notion/Google Docs: For centralizing requirements, user stories, and general documentation.

* Miro/FigJam/Lucidchart: For collaborative whiteboarding, brainstorming, and initial flow mapping.

  • Information Architecture & User Flows:

* Figma/Sketch/Adobe XD: While primarily for UI design, their prototyping features can be used for basic flow mapping.

* Miro/Lucidchart: Excellent for creating sitemaps and detailed user flow diagrams.

  • Component & Interaction Identification:

* Existing Design Systems (Material Design, iOS Human Interface Guidelines): Essential references for platform-specific components and best practices.

* Figma/Sketch/Adobe XD Libraries: For starting to build a preliminary component inventory.

  • Communication & Collaboration:

* Slack/Microsoft Teams: For real-time team communication.

* Zoom/Google Meet: For virtual meetings and presentations.


4. Validation & Review Strategies

Ensuring the architectural plan is sound and meets project objectives requires continuous validation and strategic reviews.

4.1 Internal Team Reviews:

  • Peer Reviews: Design team members review each other's work for consistency, completeness, and adherence to best practices.
  • Cross-Functional Team Reviews: Involve product managers, developers, and QA to gather diverse perspectives and identify potential challenges early.
  • Design Critiques: Structured sessions to present work, receive constructive feedback, and iterate.

4.2 Stakeholder Reviews & Approvals:

  • Formal Presentations: Schedule dedicated sessions to present the architectural plan to key business stakeholders.
  • Feedback Loops: Establish clear channels for stakeholders to provide feedback and ensure their input is addressed.
  • Sign-off: Obtain formal approval from key stakeholders on the finalized architectural plan before proceeding to wireframing.

4.3 Early User Feedback (Conceptual):

  • Card Sorting (for IA): If the app has complex content, conduct card sorting exercises to validate the proposed information architecture with target users.
  • Concept Testing: Present high-level concepts or simplified user flows to a small group of users to gauge initial reactions and validate core value propositions.

4.4 Consistency & Best Practice Checks:

  • Platform Guideline Adherence: Verify that the proposed architecture respects iOS Human Interface Guidelines and Android Material Design principles where applicable.
  • Accessibility Audit (Preliminary): Conduct a preliminary review of proposed components and interactions against basic accessibility standards.
  • Scalability & Future-Proofing: Consider how the architecture can accommodate future features and growth without requiring major overhauls.

This Architectural Planning Guide provides a structured framework for defining the core elements of your mobile application. By diligently following these steps, you will establish a clear and robust foundation for the subsequent wireframing and development phases, leading to a successful and user-friendly mobile app.

json

{

"screen_name": "Task List",

"purpose": "Main screen to view and manage tasks.",

"components": [

{

"type": "App Bar",

"properties": {

"title": "My Tasks",

"trailing_icons": [

{"icon": "Filter (e.g., 3 lines with circle)", "action": "Open Filter Options"}

]

}

},

{

"type": "List (Scrollable)",

"component_type": "Task List Item",

"data_source": "User's tasks",

"empty_state_message": {

"type": "Text",

"content": "No tasks yet! Tap the '+' button to add one.",

"style": "Body 1",

"color": "#757575",

"alignment": "center"

},

"item_actions": [

{"element": "Checkbox", "action": "Toggle Task Completion State"},

{"element": "Entire Item", "action": "View Task Details (Future Scope/Placeholder)"}

]

},

{

"type": "Floating Action Button (FAB)",

"properties": {

"icon": "Add (Plus sign)",

"position": "Bottom-right"

},

"interaction": {

"on_tap": "Navigate to 'Add New Task' screen"

}

}

],

"interactions_from_screen": [

{"target": "Filter Options (Modal/Sheet)", "trigger": "Tap Filter Icon"},

{"target": "Add New Task Screen", "trigger": "Tap FAB"},

{"target": "Task List Item (state change)", "trigger": "Tap Checkbox"}

],

"developer_notes": [

"Implement a RecyclerView/UITableView for efficient list rendering.",

"Ensure smooth scrolling performance

gemini Output

Mobile App Wireframe Kit: Comprehensive Specification

Project: [Your Mobile App Name/Project Name]

Version: 1.0

Date: October 26, 2023

Prepared for: [Client Name/Team Name]

Prepared by: PantheraHive


1. Introduction

This document serves as a comprehensive wireframe specification for the [Your Mobile App Name] mobile application. It outlines the core user experience, defines the underlying UI components, details interaction patterns, and provides essential notes for the development team. The purpose of this kit is to establish a clear foundation for the application's structure, functionality, and user flow before proceeding to high-fidelity design and development.

This deliverable aims to foster a shared understanding among product managers, designers, and developers, ensuring a cohesive and efficient progression of the project.

2. Executive Summary

The [Your Mobile App Name] is designed to [briefly state the app's primary purpose, e.g., "streamline task management for small teams," "provide a personalized fitness tracking experience," "facilitate quick and secure online payments"]. This wireframe kit covers the essential user journeys, including [list 2-3 key features, e.g., "user onboarding, main dashboard navigation, and core feature X functionality"]. It provides a detailed blueprint that will enable the immediate commencement of technical planning and initial development efforts, laying the groundwork for a robust and intuitive mobile application.

3. Screen Flow Specifications

This section details the primary user flows within the application, outlining the sequence of screens and key interactions for critical tasks.

3.1. User Onboarding & Account Creation

Description: This flow guides new users through the initial setup process, including account registration or login, and an optional introductory tour of the app's main features.

Goal: Successfully register/log in a user and prepare them for core app usage.

  • Screen 1: Welcome/Splash Screen

* Content: App logo, tagline, "Sign Up" button, "Log In" button.

* Navigation:

* Tap "Sign Up" → Screen 2: Create Account.

* Tap "Log In" → Screen 3: Login.

  • Screen 2: Create Account

* Content: Input fields for Name, Email, Password (with "Show/Hide" toggle), "Agree to Terms" checkbox, "Sign Up" button.

* Navigation:

* Tap "Sign Up" (on valid input) → Screen 4: Profile Setup (Optional) or Screen 5: Home/Dashboard.

* Tap "Already have an account? Log In" → Screen 3: Login.

  • Screen 3: Login

* Content: Input fields for Email, Password (with "Show/Hide" toggle), "Forgot Password" link, "Log In" button.

* Navigation:

* Tap "Log In" (on valid input) → Screen 5: Home/Dashboard.

* Tap "Forgot Password" → Screen 6: Password Reset Request.

* Tap "Don't have an account? Sign Up" → Screen 2: Create Account.

  • Screen 4: Profile Setup (Optional)

* Content: Input fields for Profile Picture upload, Username, Bio, Interests (multi-select), "Skip" button, "Continue" button.

* Navigation:

* Tap "Continue" → Screen 5: Home/Dashboard.

* Tap "Skip" → Screen 5: Home/Dashboard.

  • Screen 5: Home/Dashboard

* Content: Main content area (e.g., personalized feed, task list, summary), Bottom Navigation Bar.

* Navigation: Entry point for core app functionality.

3.2. [Core Feature Name] Flow (e.g., "Product Search & Details")

Description: This flow allows users to search for items, view their details, and perform relevant actions (e.g., add to cart, save).

Goal: Enable users to efficiently find and interact with specific items.

  • Screen 1: Home/Dashboard

* Content: Search Bar (top), main content.

* Navigation: Tap Search Bar → Screen 2: Search Results/Input.

  • Screen 2: Search Results/Input

* Content: Search input field, recent searches, suggested items, search results list (dynamically updates with input).

* Navigation:

* Tap on a search result item → Screen 3: Item Details.

* Tap "X" button in search bar → Return to Screen 1: Home/Dashboard.

  • Screen 3: Item Details

* Content: Item image, name, description, price, "Add to Cart" button, "Save for Later" button, related items section.

* Navigation:

* Tap "Add to Cart" → Confirmation (Toast/Snackbar) and update cart icon.

* Tap "Save for Later" → Confirmation (Toast/Snackbar).

* Tap Back button (top left) → Screen 2: Search Results/Input.

(Repeat for other critical flows, e.g., "Checkout Process," "Settings Management," etc.)

4. Component Library

This section defines the reusable UI components that form the building blocks of the application, ensuring consistency and efficiency in design and development.

4.1. Navigation Components

  • Top App Bar (Header)

* Purpose: Displays screen title, actions (e.g., search, notifications), and navigation controls (e.g., back button, menu icon).

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

* Properties: Title text, leading icon (optional), trailing icons (optional).

* Usage: Present on most screens for context and primary actions.

  • Bottom Navigation Bar

* Purpose: Provides quick access to top-level destinations in the app.

* States: Default, active tab.

* Properties: 3-5 distinct tabs, each with an icon and optional text label.

* Usage: Used for primary navigation on the Home/Dashboard and other main sections.

  • Tabs (Segmented Control)

* Purpose: Organizes and allows navigation between content at the same level of hierarchy.

* States: Active, Inactive.

* Properties: Text label for each tab.

* Usage: Within a screen to switch between different views of related content (e.g., "All," "Active," "Completed" tasks).

4.2. Input Components

  • Text Field (Single Line)

* Purpose: Allows users to input short text.

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

* Properties: Placeholder text, Label, Helper text, Leading/Trailing icon (optional), Keyboard type (e.g., text, email, number, password).

* Usage: Usernames, emails, search queries, short answers.

  • Text Area (Multi-Line Text Field)

* Purpose: Allows users to input longer text.

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

* Properties: Placeholder text, Label, Helper text, Min/Max rows.

* Usage: Descriptions, comments, messages.

  • Primary Button

* Purpose: Triggers the most important action on a screen.

* States: Default, Pressed, Disabled, Loading.

* Properties: Text label, Icon (optional), Background color, Text color.

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

  • Secondary Button

* Purpose: Triggers a less prominent action, often complementary to the primary action.

* States: Default, Pressed, Disabled.

* Properties: Text label, Icon (optional), Border color, Text color (often transparent background).

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

  • Checkbox

* Purpose: Allows users to select one or more options from a list.

* States: Unchecked, Checked, Indeterminate, Disabled.

* Properties: Label text.

* Usage: Agreeing to terms, multi-selection filters.

  • Radio Button

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

* States: Unselected, Selected, Disabled.

* Properties: Label text.

* Usage: Single-selection options (e.g., gender, payment method).

  • Toggle Switch

* Purpose: Toggles the state of a single setting on/off.

* States: On, Off, Disabled.

* Properties: Label text.

* Usage: Notification settings, dark mode.

4.3. Information Display Components

  • Card

* Purpose: Groups related content and actions in a visually distinct container.

* Properties: Title, subtitle, image/icon, body text, action buttons/links.

* Usage: Displaying individual items in a list, news articles, product previews.

  • List Item

* Purpose: Presents rows of information, often with an icon, text, and an optional action.

* Properties: Leading icon/image, Primary text, Secondary text, Trailing icon/action.

* Usage: Settings menus, contact lists, itemized data.

  • Progress Indicator (Spinner/Bar)

* Purpose: Informs users about the status of ongoing processes.

* Types: Indeterminate (spinner for unknown duration), Determinate (bar for known progress).

* Usage: Loading content, submitting forms, downloading files.

4.4. Feedback Components

  • Toast/Snackbar

* Purpose: Provides brief, non-intrusive messages about an operation's outcome.

* Properties: Message text, Action button (optional).

* Usage: "Item added to cart," "Settings saved," "No internet

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