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

This document outlines a comprehensive 4-week self-study plan designed to equip you with the knowledge and practical skills required to generate a complete mobile app wireframe specification, including screen flows, component libraries, interaction patterns, and developer handoff notes. This plan focuses on a practical, hands-on approach, leveraging industry-standard tools and best practices.


1. Overall Learning Objectives

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

  • Understand Wireframing Principles: Grasp the core concepts, purpose, and benefits of wireframing in the mobile app development lifecycle.
  • Master a Wireframing Tool: Become proficient in using a chosen wireframing/prototyping tool (e.g., Figma, Sketch, Adobe XD) to create low-fidelity and mid-fidelity wireframes.
  • Design Core UI Components: Identify, design, and organize a reusable library of standard mobile UI components.
  • Map User Flows: Create clear and logical screen flows that represent user journeys through a mobile application.
  • Define Interaction Patterns: Specify basic interaction patterns and states for UI elements within wireframes.
  • Generate Wireframe Specifications: Document wireframes comprehensively with annotations, states, and descriptions.
  • Prepare for Developer Handoff: Understand and apply best practices for preparing wireframe documentation for efficient developer implementation.
  • Critique and Iterate: Develop the ability to evaluate wireframes and incorporate feedback for iterative improvements.

2. Weekly Schedule & Detailed Learning Plan

This schedule is designed for approximately 10-15 hours of dedicated study and practice per week. Adjust as necessary based on your prior experience and learning pace.

Week 1: Fundamentals of Wireframing & Tool Proficiency

  • Learning Objectives:

* Define wireframing, its purpose, and different fidelity levels.

* Understand the role of wireframes in UX/UI design.

* Set up and navigate a chosen wireframing tool (Figma recommended for its collaborative features and web-based accessibility).

* Create basic shapes, text, and organize layers within the tool.

* Begin sketching and digitizing simple UI elements.

  • Topics:

* Introduction to UX/UI Design & the Design Process

* What are Wireframes? Low-fidelity vs. Mid-fidelity vs. High-fidelity

* Choosing a Wireframing Tool (Figma Deep Dive)

* Workspace Setup & Basic Controls (Frames, Shapes, Text, Images)

* Layer Management & Grouping

* Introduction to Auto Layout (Figma)

  • Activities:

* Watch introductory tutorials for Figma (or your chosen tool).

* Recreate 3-5 common mobile app screens (e.g., login, profile, settings) as low-fidelity wireframes using basic shapes and text.

* Experiment with different layout techniques.

* Practice organizing layers and components efficiently.

  • Recommended Resources:

* Figma Learn: [https://www.figma.com/learn/](https://www.figma.com/learn/) (Official tutorials)

* "Don't Make Me Think, Revisited" by Steve Krug: (Chapter 3: "Where do I begin?")

* YouTube Channels: Figma Tutorials by DesignCode, Mizko, or similar.

* Articles: "What is Wireframing?" on UXPin Blog, Nielsen Norman Group articles on wireframing.

Week 2: UI Component Library & Screen Flow Design

  • Learning Objectives:

* Identify common mobile UI components and their standard usages.

* Create a reusable library of wireframe components (buttons, input fields, navigation bars, cards, etc.).

* Understand the concept of user flows and task analysis.

* Design a complete user flow for a specific mobile app task.

  • Topics:

* Common Mobile UI Patterns & Components (iOS Human Interface Guidelines, Material Design)

* Creating Reusable Components/Symbols (Figma Components)

* Component States (Default, Hover, Active, Disabled)

* Introduction to User Flows & Task Analysis

* Mapping User Journeys with Wireframes

* Connecting Screens to form a Flow

  • Activities:

* Select a simple mobile app idea (e.g., a simple to-do list app, a recipe app).

* Identify all necessary UI components for this app.

* Create a component library in Figma for these elements, including basic states.

* Map out a core user flow for your app (e.g., "Add a new item," "Search for a recipe") using a flow diagram, then translate it into connected wireframes.

  • Recommended Resources:

* Figma Components & Variants Documentation: [https://help.figma.com/hc/en-us/articles/360038612174-Create-and-use-components](https://help.figma.com/hc/en-us/articles/360038612174-Create-and-use-components)

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

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

* "Designing with the Mind in Mind" by Jeff Johnson: (Chapters on common UI patterns)

Week 3: Interaction Patterns & Basic Prototyping

  • Learning Objectives:

* Define common mobile interaction patterns (e.g., tap, swipe, long press, gestures).

* Integrate basic interaction specifications into wireframes.

* Create simple interactive prototypes to demonstrate screen transitions and component states.

* Understand the importance of user feedback in the wireframing stage.

  • Topics:

* Mobile Interaction Design Principles

* Specifying Interactions (e.g., "Tap to navigate," "Swipe to delete")

* Introduction to Prototyping in Figma (Flows, Connections, Interactions)

* Basic Animation & Transitions

* User Testing Fundamentals (Guerilla Testing, Heuristic Evaluation)

  • Activities:

* Take the wireframes and screen flows from Week 2.

* Add basic interaction specifications (e.g., "On tap of [button], navigate to [screen]").

* Create a clickable prototype in Figma, demonstrating the core user flow.

* Conduct a mini-usability test with 1-2 friends/colleagues on your prototype and gather feedback.

* Iterate on your wireframes based on feedback.

  • Recommended Resources:

* Figma Prototyping Documentation: [https://help.figma.com/hc/en-us/articles/360040316714-Create-prototypes](https://help.figma.com/hc/en-us/articles/360040316714-Create-prototypes)

* "The Design of Everyday Things" by Don Norman: (Chapters on affordances and signifiers)

* NN/g Article: "Mobile Navigation Patterns"

* YouTube: "Figma Prototyping Tutorial"

Week 4: Wireframe Kit Assembly, Handoff & Best Practices

  • Learning Objectives:

* Assemble a complete wireframe specification document.

* Add detailed annotations and notes for developers.

* Understand the requirements for effective developer handoff.

* Learn best practices for organizing wireframe files and documentation.

* Refine the wireframe kit for clarity, consistency, and completeness.

  • Topics:

* Structuring a Wireframe Specification Document

* Annotation Best Practices (States, Interactions, Edge Cases)

* Developer Handoff Tools & Workflows (Figma Dev Mode, Zeplin, etc.)

* Versioning & File Management

* Accessibility Considerations in Wireframing

* Reviewing and Refining the Complete Kit

  • Activities:

* Consolidate all your wireframes, component library, and screen flows into a single Figma project.

* Add comprehensive annotations to each wireframe, detailing functionality, interaction, and any specific requirements.

* Create a "Developer Notes" section outlining global considerations or specific instructions.

* Prepare your Figma file for developer handoff (e.g., using Dev Mode, organizing layers, naming conventions).

* Review your entire wireframe kit against a checklist for completeness, consistency, and clarity.

  • Recommended Resources:

* Figma Dev Mode Documentation: [https://www.figma.com/dev-mode/](https://www.figma.com/dev-mode/)

* Articles on Developer Handoff: UX Collective, Smashing Magazine.

* "A Project Guide to UX Design" by Carolyn Chandler & Russ Unger: (Chapter on Documentation & Deliverables)

* Checklists: Search for "Wireframe Handoff Checklist" or "UX Deliverables Checklist."


3. Milestones

  • End of Week 1: Completed low-fidelity wireframes for 3-5 common mobile app screens. Proficiency in basic Figma operations.
  • End of Week 2: Created a mid-fidelity component library for a simple app and mapped out a core user flow with connected wireframes.
  • End of Week 3: Developed a clickable prototype demonstrating the core user flow with specified interactions, and conducted informal user testing.
  • End of Week 4: Assembled a complete "Mobile App Wireframe Kit" including a robust component library, detailed screen flows, interaction patterns, annotations, and prepared for developer handoff.

4. Assessment Strategies

  • Self-Review Checklists: Use provided or self-created checklists to evaluate the completeness and quality of your wireframes, components, and documentation against best practices.
  • Peer Review/Feedback: Share your weekly progress and final wireframe kit with a peer, mentor, or online community for constructive criticism.
  • Practical Application: Successfully complete the "Mobile App Wireframe Kit" for your chosen app idea, ensuring it meets all the learning objectives.
  • Comparison to Industry Examples: Compare your wireframe kit against well-documented examples of professional wireframe specifications found online.
  • "Teach Back" Method: Explain your wireframing choices, component decisions, and interaction patterns to someone else. This helps solidify understanding.

5. General Tips for Success

  • Stay Hands-On: The best way to learn is by doing. Dedicate significant time to practical application.
  • Start Simple: Don't try to build the next Facebook in your first wireframe kit. Pick a small, well-defined app idea.
  • Consistency is Key: Apply consistent naming conventions, visual styles (even low-fidelity ones), and annotation methods throughout your work.
  • Seek Inspiration: Look at how other designers create wireframes and document their work. Use Dribbble, Behance, and UX case study websites.
  • Join Communities: Engage with online UX/UI communities (e.g., Reddit's r/UXDesign, Figma Community) to ask questions and learn from others.
  • Take Breaks: Avoid burnout. Step away from your work and return with fresh eyes.
  • Document Your Process: Keep notes on your decisions, challenges, and solutions. This aids learning and helps in explaining your work.

This study plan provides a robust framework for mastering mobile app wireframing. Consistent effort and practical application will be key to your success.

gemini Output

This document provides a comprehensive and detailed wireframe specification for your mobile application, "TaskFlow Mobile App". It includes a structured definition of screen flows, a reusable component library, common interaction patterns, and critical developer handoff notes. The core of this deliverable is a machine-readable specification, presented as a JSON structure, which serves as a "code" representation of the wireframes. This specification is designed to be clear, actionable, and ready for direct implementation or further design refinement.


1. Introduction to the TaskFlow Mobile App Wireframe Kit

This wireframe kit serves as the foundational blueprint for the "TaskFlow Mobile App." It outlines the application's structure, user interface elements, and navigational logic at a low-fidelity level. The goal is to provide a clear,

gemini Output

Mobile App Wireframe Kit Specification

Project: [Your Mobile App Name - e.g., "PantheraConnect Mobile App"]

Version: 1.0

Date: October 26, 2023


1. Executive Summary

This document provides a comprehensive wireframe specification for the [Your Mobile App Name] mobile application. It serves as a foundational blueprint, detailing the core user experience, screen layouts, interactive elements, and navigation flows. The purpose of this kit is to establish a clear, consistent, and functional structure for the application, enabling efficient communication between design, product, and development teams.

This specification includes:

  • Key User Flows: Illustrating the primary paths users will take through the application.
  • Component Library: A catalog of reusable UI elements and their states.
  • Interaction Patterns: Defining how users will interact with the application's interface.
  • Developer Handoff Notes: Essential guidelines and considerations for technical implementation.

This deliverable is designed to facilitate the transition from conceptual design to detailed UI/UX design and subsequent development, ensuring a shared understanding of the application's functionality and user experience.


2. Wireframe Overview & Scope

The wireframes presented in this kit focus on the structural and functional aspects of the mobile application, prioritizing content hierarchy, interaction points, and overall layout rather than visual aesthetics. They are designed to be low-fidelity representations, enabling rapid iteration and feedback collection before moving into high-fidelity design.

Scope:

  • Platform: Primarily designed for iOS and Android mobile platforms, focusing on common design patterns applicable to both.
  • Focus Areas: Core user journeys, key features, and essential navigation elements.
  • Exclusions: Detailed visual design (colors, typography beyond basic hierarchy, specific iconography), complex animations (beyond basic transitions), and edge-case error states (unless critical to a flow).

Purpose of Wireframes:

  • To define the information architecture and content hierarchy.
  • To outline the primary user interface (UI) elements and their placement.
  • To map out user interactions and screen-to-screen navigation.
  • To provide a clear foundation for subsequent UI/UX design and development.

3. Key User Flows (Screen Flows)

This section outlines the critical user journeys within the application. Each flow describes a user's goal, the steps they take, and the sequence of screens involved.

3.1. Flow 1: User Onboarding & Account Creation

Goal: A new user successfully creates an account and completes the initial setup.

Screens & Steps:

  1. Splash Screen:

Purpose:* Initial app launch, brand display, brief loading.

Interaction:* Automatic transition after a few seconds.

  1. Welcome/Intro Screens (3-4 screens):

Purpose:* Highlight key app benefits/features.

Content:* Short descriptive text, illustrative graphics.

Interaction:* Swipe left/right to navigate, "Skip" button, "Next" button on each screen.

  1. Login/Signup Choice Screen:

Purpose:* Present options to existing users (Login) or new users (Sign Up).

Content:* "Log In" button, "Sign Up" button, "Continue with Google/Apple" (optional).

Interaction:* Tap buttons to proceed.

  1. Sign Up Screen (Email/Password):

Purpose:* Collect user credentials for new account.

Content:* Email input field, Password input field (with toggle for visibility), "Confirm Password" input field, "Sign Up" button, "Terms & Privacy Policy" link.

Interaction:* Text input, button tap.

  1. Profile Setup Screen 1 (Basic Info):

Purpose:* Collect essential user profile details.

Content:* Name input, Date of Birth input (with date picker), "Next" button.

Interaction:* Text input, date picker selection, button tap.

  1. Profile Setup Screen 2 (Preferences/Interests - Optional):

Purpose:* Personalize user experience based on preferences.

Content:* List of selectable categories/tags, "Skip" button, "Continue" button.

Interaction:* Multiple selection (checkboxes/toggles), button tap.

  1. Permissions Request Screen (Optional, e.g., Notifications):

Purpose:* Request necessary device permissions.

Content:* Explanation of why permission is needed, "Allow" button, "Deny" button.

Interaction:* Button tap triggers native permission dialog.

  1. Onboarding Complete / Home Screen:

Purpose:* Confirm successful onboarding and transition to the main app experience.

Content:* Brief success message (optional), main application dashboard/home screen.

Interaction:* Automatic transition or "Get Started" button.

3.2. Flow 2: Main Feature X Interaction (e.g., "Create New Post")

Goal: A logged-in user successfully creates and publishes a new post.

Screens & Steps:

  1. Home/Dashboard Screen:

Purpose:* Main entry point, displays feed/overview.

Content:* Navigation bar (Home, Search, Create, Notifications, Profile), floating action button (FAB) or dedicated "Create" icon.

Interaction:* Tap FAB/icon.

  1. Create Post - Type Selection (Optional):

Purpose:* If multiple post types exist (e.g., text, image, video).

Content:* Options like "Text Post," "Upload Photo," "Record Video."

Interaction:* Tap to select post type.

  1. Create Post - Content Editor Screen:

Purpose:* User inputs and prepares post content.

Content:* Text input area (multi-line), "Add Photo/Video" button (opens media picker), "Add Tags" input, "Location" button, "Privacy Settings" dropdown/toggle, "Preview" button, "Publish" button.

Interaction:* Text input, media selection, button taps, dropdown selection.

  1. Media Picker/Camera Screen:

Purpose:* User selects media from gallery or captures new media.

Content:* Grid view of gallery images/videos, camera interface.

Interaction:* Tap to select, tap to capture.

  1. Content Editor Screen (with media attached):

Purpose:* User reviews content with attached media.

Content:* Same as step 3, but with selected media displayed (thumbnail/preview).

Interaction:* Review, edit, tap "Publish."

  1. Loading/Confirmation State:

Purpose:* Provide feedback during post submission.

Content:* Spinner/progress bar, "Posting..." message.

Interaction:* Automatic transition upon success or failure.

  1. Post Success / Home Screen (or Post Detail Screen):

Purpose:* Confirm post published and return to main interface or view the new post.

Content:* Toast message "Post Published Successfully!" (optional), updated Home feed with new post, or direct navigation to the new post's detail screen.

Interaction:* View updated content.


4. Component Library

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

4.1. Buttons

  • Primary Button:

Purpose:* Main call to action.

States:* Default, Hover (for web/desktop, consider for touch feedback), Pressed, Disabled, Loading (with spinner).

Examples:* "Sign Up", "Save Changes", "Submit".

  • Secondary Button:

Purpose:* Less prominent actions, often complementary to a primary button.

States:* Default, Pressed, Disabled.

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

  • Tertiary/Text Button:

Purpose:* Minimal visual emphasis, often for navigation or minor actions.

States:* Default, Pressed, Disabled.

Examples:* "Forgot Password?", "View All", "Edit".

  • Icon Button:

Purpose:* Action represented solely by an icon.

States:* Default, Pressed, Disabled.

Examples:* "Search" (magnifying glass), "Share" (share icon).

  • Floating Action Button (FAB):

Purpose:* Primary, context-sensitive action on a screen.

States:* Default, Pressed, Mini FAB (optional).

Examples:* "Add New Post", "Compose Message".

4.2. Input Fields

  • Text Input Field:

Purpose:* Single-line text entry.

States:* Default, Focused, Filled, Error (with helper text), Disabled.

Attributes:* Label, Placeholder text, Helper text, Clear button (optional).

Examples:* Email, Username, Search.

  • Password Input Field:

Purpose:* Secure text entry.

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

Attributes:* Label, Placeholder, Helper text, Toggle visibility icon.

  • Text Area:

Purpose:* Multi-line text entry.

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

Attributes:* Label, Placeholder, Resizable (optional).

Examples:* Message body, Post content.

  • Dropdown/Select:

Purpose:* Allow selection from a predefined list.

States:* Default, Active (menu open), Selected.

Attributes:* Label, Placeholder, Selected value display.

  • Date/Time Picker:

Purpose:* Allow selection of dates and/or times.

States:* Default, Active (picker open), Selected.

Attributes:* Label, Placeholder.

  • Search Bar:

Purpose:* Initiate search functionality.

States:* Default, Focused (with keyboard), With search results.

Attributes:* Placeholder text, Search icon, Clear text icon.

4.3. Navigation Elements

  • Top App Bar (Header):

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

Elements:* Title, Back button, Menu/Hamburger icon, Action icons (e.g., Search, Settings).

  • Bottom Navigation Bar (Tab Bar):

Purpose:* Persistent navigation for primary app sections.

Elements:* 3-5 icons with labels.

States:* Default, Active (selected item).

  • Side Navigation Drawer (Hamburger Menu):

Purpose:* Provides access to less frequently used sections or settings.

Elements:* Menu items (text, optional icons), Profile info (optional).

States:* Closed, Open.

  • Breadcrumbs (if applicable):

Purpose:* Indicate current location within a hierarchical structure.

Elements:* Linked text labels.

4.4. Information Display

  • Cards:

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

Elements:* Title, Subtitle, Image, Body text, Action buttons/links.

  • Lists:

Purpose:* Display a series of related items.

Types:* Single-line, Two-line, Icon/Avatar lists, Checkbox/Radio button lists.

Elements:* Text, Secondary text, Icons, Avatars, Dividers.

  • Avatars/Profile Pictures:

Purpose:* Represent users or entities.

Shapes:* Circular, Square (with rounded corners).

States:* Default (placeholder), With image.

  • Badges/Tags:

Purpose:* Small, informative labels.

Examples:* Notification counts, category tags.

4.5. Feedback & Overlays

  • Alert Dialogs:

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

Elements:* Title, Message, Primary action button, Secondary action button (optional).

  • Toast Messages/Snackbars:

Purpose:* Brief, non-intrusive feedback messages.

Elements:* Short message, optional action button.

Interaction:* Automatically dismisses after a short period.

  • Loading Indicators:

Purpose:* Communicate that content is loading or an action is processing.

Types:* Spinners, Progress bars (determinate/indeterminate), Skeleton screens.

  • Modals/Bottom Sheets:

Purpose:* Display additional content or options without navigating away.

Elements:* Title, Content area, Close button.

4.6. Icons & Imagery

  • Icons:

Purpose:* Visual representation of actions, categories, or states.

Style:* Consistent line art or filled style.

Examples:* Home, Search, Settings, Share, Like, Edit, Delete.

  • Images:

Purpose:* Display photos, illustrations, or graphics.

States:* Default, Loading placeholder, Error placeholder.

4.7. Typography (Wireframe Level)

  • Headings: H1, H2, H3 (for primary, secondary, tertiary titles).
  • Body Text: Standard paragraph text.
  • Captions/Small Text: For less prominent information.
  • Button/Link Text: Specific styles for interactive text.

Note: Specific font families, weights, and sizes will be defined in the high-fidelity UI design phase. For wireframes, focus on hierarchy and relative sizing.

4.8. Colors (Wireframe Level)

  • Primary Action Color: (e.g., a shade of blue for primary buttons).
  • Secondary Action Color: (e.g., a
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);}});}