Mobile App Wireframe Kit
Run ID: 69ccdd663e7fb09ff16a5cf02026-04-01Design
PantheraHive BOS
BOS Dashboard

This document provides a comprehensive specification for a Mobile App Wireframe Kit, intended to serve as a foundational blueprint for mobile application development. It details screen flows, a robust component library, common interaction patterns, and essential developer handoff notes to ensure a smooth transition from design to implementation.


Mobile App Wireframe Kit Specification

1. Project Overview

This wireframe kit provides a standardized set of low-fidelity visual guidelines and structural definitions for designing and developing mobile applications. Its primary goal is to facilitate rapid prototyping, establish consistent user experience patterns, and streamline communication between design, product, and development teams.

2. Wireframe Specification Introduction

This specification details the structural and interactive elements required to build a functional mobile application wireframe. It covers the core building blocks (components), how users navigate through the application (screen flows), and how users interact with the interface (interaction patterns). The included developer handoff notes aim to bridge the gap between design intent and technical implementation.

3. Screen Flows

Screen flows define the typical user journeys and the sequence of screens a user encounters to complete specific tasks within the application. Each flow outlines the entry points, key screens, and potential decision points.

3.1. Common User Flows

A. Onboarding & Account Setup Flow

1. Splash Screen: App logo/brand display.

2. Welcome/Intro Screens (Optional): 1-3 screens highlighting key features with "Skip" and "Next" options.

3. Login/Sign-up Screen: Options for existing users to log in, or new users to create an account (Email/Password, Social Login).

4. Registration Form: Fields for Name, Email, Password, etc.

5. OTP/Verification Screen: For email/phone verification.

6. Profile Setup (Optional): Add profile picture, interests, etc.

7. Permissions Request: Camera, Location, Notifications.

8. Home Screen: Navigate to the main application interface.

B. Main Navigation Flow

1. Home Screen: Primary entry point, often displaying personalized content or a dashboard.

2. Tab Bar / Bottom Navigation (Persistent):

* Tab A (e.g., Home/Dashboard)

* Tab B (e.g., Explore/Search)

* Tab C (e.g., Favorites/Bookmarks)

* Tab D (e.g., Profile/Settings)

3. Side Drawer/Hamburger Menu (Optional): For secondary navigation, settings, help, etc.

* Menu Item 1

* Menu Item 2

* Settings

* Help/Support

* Logout

C. Data Entry / Form Submission Flow

1. Initiation Screen: Button or action that triggers the form.

2. Form Screen: Contains various input fields (text, numbers, date pickers, dropdowns, checkboxes, radio buttons).

3. Confirmation/Review Screen (Optional): Summarize entered data before final submission.

4. Success/Error State: Visual feedback upon submission.

5. Return to Previous/Home Screen.

D. Search & Filter Flow

1. Search Icon/Bar: On a primary screen.

2. Search Input Screen: Dedicated screen with search bar, recent searches, suggestions.

3. Search Results Screen: Display filtered items, often with pagination or infinite scroll.

4. Filter/Sort Options: Overlay or separate screen to apply filters (e.g., category, price, date) and sorting criteria.

4. Component Library

This section defines the core UI components, their properties, states, and variations. This library ensures consistency and reusability across the application.

4.1. Core Components

* Variants: Primary, Secondary, Destructive, Ghost, Icon Button.

* States: Default, Hover (if applicable), Pressed, Disabled, Loading.

* Properties: Label, Icon (left/right), Size (small, medium, large), Full-width.

* Variants: Text, Password, Email, Number, Phone, Date Picker, Time Picker, Multiline Text (Textarea).

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

* Properties: Label, Placeholder Text, Helper Text, Error Message, Prefix/Suffix Icon.

* Variants: Single Checkbox, Checkbox Group, Single Radio Button, Radio Group.

* States: Default, Checked/Selected, Disabled.

* Properties: Label.

* States: On, Off, Disabled.

* Properties: Label.

* Variants: Single Select, Multi-select.

* States: Default, Open, Selected, Disabled, Error.

* Properties: Label, Placeholder, Options List.

* Top App Bar (Header): Title, Back Button, Menu Icon, Action Icons (Search, Notifications).

* Bottom Navigation Bar (Tab Bar): 3-5 primary navigation items with icon and label.

* Side Drawer/Hamburger Menu: List of navigation items, user info.

* Breadcrumbs (Optional): For hierarchical navigation.

* Variants: Content Card, Image Card, List Item Card.

* Properties: Title, Subtitle, Image/Icon, Description, Actions (buttons/links).

* Variants: Simple List, Image List, Avatar List, Checkbox List, Swipeable List.

* Properties: Item Title, Subtitle, Secondary Text, Icon/Image, Accessory (arrow, switch, button).

* Variants: Alert Dialog, Confirmation Dialog, Full-screen Modal.

* Properties: Title, Message, Action Buttons (Primary, Secondary, Destructive).

* Purpose: Brief, non-intrusive messages.

* Properties: Message, Optional Action Button, Duration.

* Variants: Full-screen Loader, Inline Spinner, Progress Bar.

* Properties: Size, Color.

* Variants: Image Avatar, Text Avatar (initials), Icon Avatar.

* Properties: Size, Shape (circular, square).

* Purpose: Display small pieces of information or status.

* Properties: Text, Color, Icon.

4.2. Component Specification (Code-like Examples)

Here are examples of how components can be formally defined using a JSON-like structure, enabling easy translation into design tokens or component libraries in development.

Example 1: Button Component Specification

text • 59 chars
**Example 3: Simplified Screen Structure (LoginScreen)**

Sandboxed live preview

This document outlines the architectural plan for a "Mobile App Wireframe Kit," designed to be a comprehensive and reusable set of specifications for mobile application development.

It appears there might be a slight misunderstanding regarding the request for a "study plan." In the context of the "Mobile App Wireframe Kit" workflow, "plan_architecture" refers to defining the structure, components, and logical organization of the wireframe kit itself as a deliverable or product, rather than a plan to learn how to create wireframes.

This output will focus on the architectural planning for the Mobile App Wireframe Kit. If you intended to request a study plan for learning wireframing skills, please clarify, and we can initiate a separate workflow for that purpose.


Mobile App Wireframe Kit: Architecture Plan

This architecture plan details the foundational structure, key components, interaction considerations, and organizational strategy for a comprehensive Mobile App Wireframe Kit. The goal is to create a robust, scalable, and easy-to-use kit that accelerates the wireframing process and ensures consistency across projects.

1. Kit Scope & Platform Strategy

The wireframe kit will be designed to support cross-platform mobile application development, with a primary focus on common patterns applicable to both iOS and Android, while also providing specific platform-agnostic elements and notes for platform-specific adaptations.

  • Target Platforms: iOS (Human Interface Guidelines principles) & Android (Material Design principles).
  • Device Types: Primary focus on smartphones (portrait orientation). Adaptability for tablets will be noted where relevant but not fully detailed in initial wireframes.
  • Fidelity Level: Low-to-mid fidelity (grayscale, basic shapes, placeholder text) to focus on layout, flow, and functionality without distraction from visual design.
  • Key Deliverables:

* Structured Screen Flows

* Reusable Component Library

* Defined Interaction Patterns

* Developer Handoff Notes

2. Core Screen Categories & Flow Architecture

The kit will categorize screens to facilitate easy navigation and reuse, supporting common mobile app use cases.

  • Onboarding & Authentication:

* Splash Screen

* Welcome/Intro Screens (up to 3 variations)

* Sign Up (Email/Password, Social Login options)

* Log In (Email/Password, Social Login options)

* Forgot Password

* OTP Verification

  • Navigation & Home:

* Home Feed/Dashboard (various content types)

* Bottom Navigation Bar (5-item standard)

* Top Navigation Bar (Title, Back, Action buttons)

* Side Menu/Drawer (common structure)

* Search (Input, Results, Filters)

  • Content Display & Lists:

* List Views (simple, complex with images/metadata)

* Detail Views (product, article, profile)

* Grid Views (image-heavy, mixed content)

* Card-based Layouts

  • Forms & Input:

* Text Input Fields (single line, multi-line, various types: email, number, password)

* Dropdowns/Selects

* Radio Buttons

* Checkboxes

* Sliders

* Date/Time Pickers

* Stepper Controls

  • User Profile & Settings:

* User Profile View (editable/non-editable)

* Edit Profile Form

* Account Settings (notifications, privacy, security)

* App Settings (language, theme)

  • Feedback & Alerts:

* Toast/Snackbar Messages

* Dialogs/Modals (alert, confirmation, input)

* Empty States

* Loading Indicators (spinner, skeleton screens)

  • Action & Utility:

* Floating Action Button (FAB)

* Action Sheets

* Share Sheets

* Progress Indicators

3. Component Library Architecture

The component library will be built with reusability, consistency, and scalability in mind, leveraging design system principles.

  • Atomic Design Principles: Components will be structured from smallest to largest elements (atoms, molecules, organisms, templates).

* Atoms: Buttons, Icons, Text Fields, Checkboxes, Radio Buttons, Avatars, Labels.

* Molecules: Search Bar, Header (with title & actions), Footer (with navigation), Card (image + text), List Item.

* Organisms: Login Form, Product Listing, User Profile Section, Settings Group.

* Templates: Full-page layouts assembled from organisms and molecules.

  • State Management: Each component will include variations for different states (e.g., default, hover/pressed, disabled, active, error, loading).
  • Naming Convention: Consistent, descriptive naming (e.g., Button/Primary/Default, InputField/Text/Active, Header/Title_Back_Actions).
  • Styling: Grayscale palette with primary focus on hierarchy, spacing, and typography.

* Typography: Defined text styles (H1, H2, Body, Caption, Button text) with placeholder font.

* Spacing: Consistent use of a base unit for padding, margins, and gaps.

* Color: Grayscale for wireframes; placeholder colors for states (e.g., red for error, blue for primary action).

  • Iconography: A set of common UI icons (e.g., home, search, settings, back, close, add, edit, delete) in a consistent line-art style.

4. Interaction Pattern Strategy

The kit will define common interaction patterns to guide user experience and developer implementation.

  • Navigation:

* Tap/Click for primary actions and navigation.

* Swipe gestures (e.g., for carousels, tab switching, dismissals).

* Back button functionality (system and in-app).

* Scroll behavior (vertical, horizontal).

  • Data Input:

* Keyboard interaction for text fields.

* Selection interactions for dropdowns, radio buttons, checkboxes.

  • Feedback:

* Visual feedback for taps/presses (e.g., button state changes).

* Loading states for asynchronous operations.

* Error messages for invalid input or failed actions.

  • Transitions: Basic transitions (e.g., slide, fade) will be implied or annotated rather than fully animated within the wireframes.
  • Accessibility Notes: General considerations for touch target sizes, contrast, and clear labeling will be included in developer handoff notes.

5. File Structure & Organization

The wireframe kit will be organized logically within the chosen design tool (e.g., Figma, Sketch) for ease of use and maintenance.

  • Pages/Artboards:

* 00_Introduction & Guidelines: Kit overview, usage instructions, typography, spacing.

* 01_Atoms: Individual, smallest reusable components.

* 02_Molecules: Combinations of atoms.

* 03_Organisms: Complex UI sections.

* 04_Templates: Full-page layouts without specific content.

* 05_Screen Flows: Assembled wireframes showing user journeys.

* 06_Examples: Pre-built common screens for quick start.

* 99_Archived: Deprecated or experimental components/screens.

  • Component Library: All reusable elements will be published as components/symbols in the design tool library.
  • Naming Conventions: Consistent layer and component naming to facilitate search and organization.

* [Category]/[Component Name]/[State] (e.g., Button/Primary/Default)

* Screen/[Feature]/[Screen Name] (e.g., Screen/Auth/Login)

6. Versioning & Maintenance Plan

  • Initial Release (v1.0): Comprehensive set of core components and common screens.
  • Future Updates:

* Regular review and addition of new components or interaction patterns based on project needs and platform updates.

* Bug fixes and improvements to existing components.

* Documentation updates.

  • Change Log: A dedicated section or document to track changes and updates.

7. Developer Handoff Considerations

The kit will be designed to facilitate smooth handoff to development teams.

  • Annotations: Clear annotations on wireframes explaining functionality, interaction triggers, and specific states not visually apparent.
  • Naming Consistency: Component names in the design tool will ideally map to potential component names in code.
  • Responsive Notes: Indications for how layouts might adapt to different screen sizes (though primary focus is on a single breakpoint).
  • Interaction Flows: Clear sequencing of screens and states to illustrate user journeys.
  • Accessibility Notes: Specific callouts for accessibility features (e.g., focus order, semantic elements, voice-over text).
  • Exportability: Components and screens will be structured for easy export of assets or integration with design-to-code tools if applicable.

8. Tools & Format Selection

  • Primary Design Tool: Figma (due to collaborative features, robust component system, and widespread adoption).
  • File Format: .fig (Figma native file).
  • Documentation: Markdown-based notes within Figma or a separate linked document for extensive guidelines.

This architectural plan provides a solid foundation for developing a comprehensive and effective Mobile App Wireframe Kit. The next steps will involve the actual creation and population of the kit based on these specifications.

json

{

"screenName": "LoginScreen",

"description": "Allows users to log into their account.",

"layout": {

"type": "VerticalStack",

"alignment": "center",

"padding": "24px"

},

"components": [

{

"type": "Image",

"id": "appLogo",

"props": {

"source": "assets/app_logo.png",

"width": "120px",

"height": "120px",

"margin": "0 0 32px 0"

}

},

{

"type": "Text",

"id": "screenTitle",

"props": {

"text": "Welcome Back!",

"fontSize": "28px",

"fontWeight": "bold",

"margin": "0 0 16px 0"

}

},

{

"type": "InputField",

"id": "emailInput",

"props": {

"variant": "Email",

"label": "Email Address",

"placeholder": "Enter your email",

"fullWidth": true,

"margin": "0 0

gemini Output

Mobile App Wireframe Specification: PantheraConnect

This document details the complete wireframe specification for the PantheraConnect mobile application, serving as a foundational blueprint for its structure, functionality, and user interaction. It encompasses critical aspects of the user experience and provides essential guidelines for the development team.


1. Screen Flows

This section outlines the primary user journeys within the PantheraConnect application, illustrating the sequence of screens and potential decision points. Each flow is designed to guide the user efficiently through core functionalities.

1.1. Onboarding & Account Creation Flow

  • Start: App Launch (First Time User)
  • Screen 1: Welcome / Splash Screen

* Purpose: Introduce the app, display branding.

* Actions: Auto-advance after 2-3 seconds, or "Skip" to Login/Register.

  • Screen 2: Onboarding Carousel (Optional)

* Purpose: Highlight key features with illustrations/short text.

* Actions: Swipe left/right, "Skip" button, "Get Started" button on last slide.

  • Screen 3: Login / Sign Up Prompt

* Purpose: Offer existing users to log in, new users to register.

* Actions: "Log In" button, "Sign Up" button, "Continue with Google/Apple" buttons, "Forgot Password" link.

  • Screen 4a: Register Account

* Purpose: Collect new user details.

* Fields: Full Name, Email, Password (with confirm), optional Phone Number.

* Actions: "Create Account" button, "Already have an account? Log In" link.

  • Screen 4b: Login Account

* Purpose: Allow existing users to access their account.

* Fields: Email/Username, Password.

* Actions: "Log In" button, "Forgot Password?" link, "Don't have an account? Sign Up" link.

  • Screen 5: Profile Setup (First Time User)

* Purpose: Collect additional profile information (e.g., profile picture, preferences).

* Fields: Upload Profile Photo, Select Interests (multi-select tags), Location (optional).

* Actions: "Save & Continue" button, "Skip for now" option.

  • End: Main Dashboard / Home Screen

1.2. Main Dashboard & Navigation Flow

  • Start: Successful Login / App Launch (Returning User)
  • Screen 1: Home / Dashboard

* Purpose: Central hub for key information, personalized content, quick actions.

* Components: Top bar (profile icon, notifications, search), main content area (cards, lists), bottom navigation bar.

* Actions: Tap on cards to view details, tap on nav items to switch sections.

  • Screen 2: Explore / Discover (via Bottom Navigation)

* Purpose: Browse new content, users, or features.

* Components: Search bar, category filters, trending topics, suggested items.

* Actions: Tap on items to view details, apply filters.

  • Screen 3: Notifications (via Top Bar Icon)

* Purpose: View alerts, messages, and updates.

* Components: List of notifications (read/unread states), clear all button.

* Actions: Tap on notification to go to relevant screen, swipe to dismiss (optional).

  • Screen 4: Profile & Settings (via Top Bar Profile Icon or Side Drawer)

* Purpose: View/edit personal information, manage app settings.

* Components: Profile details, list of settings categories (e.g., Account, Privacy, App Preferences).

* Actions: Tap on category to navigate to sub-settings screen, "Log Out" button.

  • End: User completes action or navigates back to Home.

1.3. Content Creation / Submission Flow

  • Start: Tap "Create" button (e.g., Floating Action Button or Nav Item)
  • Screen 1: Choose Content Type

* Purpose: Select the type of content the user wants to create (e.g., Post, Event, Question).

* Components: Grid or list of content types with icons.

* Actions: Tap on a content type to proceed.

  • Screen 2: Content Editor (e.g., New Post)

* Purpose: Input details for the selected content type.

* Fields: Title, Description/Body (multi-line text area), Image/Video Upload, Tags (multi-select), Location (optional).

* Actions: "Preview" button, "Save Draft" button, "Publish" button, "Cancel" button.

  • Screen 3: Confirmation / Success Screen

* Purpose: Provide feedback that content was successfully submitted.

* Components: Success message, optional share buttons.

* Actions: "View Post" button, "Go to Home" button.

  • End: User returns to main app experience.

2. Component Library

This section defines the reusable UI components that form the building blocks of the PantheraConnect application. Each component includes its purpose, common states, and usage considerations.

2.1. Buttons

  • Primary Button:

* Purpose: Main call to action.

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

* Usage: Max one per screen view, prominent.

* Example: "Log In", "Create Account", "Save Changes"

  • Secondary Button:

* Purpose: Less prominent actions, alternatives to primary.

* States: Default, Hover, Pressed, Disabled.

* Usage: Often outline or text-only style.

* Example: "Cancel", "Skip", "Learn More"

  • Icon Button:

* Purpose: Actions represented solely by an icon.

* States: Default, Pressed, Disabled.

* Usage: Navigation, quick actions (e.g., "Like", "Share", "Edit").

  • Text Button (Link):

* Purpose: Navigate or perform secondary actions without visual hierarchy.

* States: Default, Pressed, Disabled.

* Usage: "Forgot Password?", "View All", "Read More".

2.2. Text Fields & Inputs

  • Single-Line Text Field:

* Purpose: Input short text (e.g., Name, Email, Username).

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

* Usage: Includes clear placeholder text, optional leading/trailing icons.

  • Multi-Line Text Area:

* Purpose: Input longer text (e.g., Descriptions, Comments).

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

* Usage: Resizable (vertical), character counter (optional).

  • Password Field:

* Purpose: Secure input for passwords.

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

* Usage: Includes toggle for visibility, strength indicator (optional).

  • Search Input:

* Purpose: Search functionality.

* States: Default (with magnifying glass icon), Focused (with clear 'X' button).

* Usage: Top of screens, often within a dedicated search bar.

2.3. Navigation Components

  • Top App Bar (Header):

* Purpose: Global navigation and context-specific actions.

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

* Usage: Fixed at the top of most screens.

  • Bottom Navigation Bar:

* Purpose: Primary navigation for 3-5 top-level destinations.

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

* States: Active (highlighted icon/text), Inactive.

* Usage: Fixed at the bottom of main screens.

  • Side Drawer (Navigation Drawer):

* Purpose: Access less frequently used sections or settings.

* Elements: List of navigation links, user profile summary (optional).

* Usage: Accessed via a hamburger icon in the top app bar, slides in from the side.

2.4. Cards & Lists

  • Content Card:

* Purpose: Display grouped information (e.g., a post, an event, a user profile preview).

* Elements: Image, Title, Subtitle, Description, Action buttons/icons.

* Usage: Flexible layout, tappable to view details.

  • List Item:

* Purpose: Display items in a vertical, uniform list.

* Elements: Icon/Avatar, Primary text, Secondary text, Trailing icon/action.

* Usage: Settings menus, notification lists, search results.

2.5. Modals & Dialogs

  • Alert Dialog:

* Purpose: Interrupt user with important information or require a decision.

* Elements: Title, Message, 1-2 action buttons (e.g., "OK", "Cancel").

* Usage: Confirm deletions, critical errors, permissions requests.

  • Bottom Sheet:

* Purpose: Present a set of options or supplementary content.

* Elements: Title (optional), list of actions/options, draggable handle.

* Usage: Share options, filter settings, contextual actions.

2.6. Indicators

  • Loading Spinner:

* Purpose: Indicate ongoing process (e.g., data fetching, submission).

* States: Spinning animation.

* Usage: Full-screen overlay, or inline within components.

  • Progress Bar:

* Purpose: Show progress of a defined task (e.g., upload, download).

* States: Indeterminate (continuous animation), Determinate (fills based on percentage).

* Usage: Top of screen for global progress, or within specific components.


3. Interaction Patterns

This section describes common interaction behaviors and user flows within the PantheraConnect app, ensuring consistency and predictability in user experience.

3.1. Navigation

  • Back Button Behavior:

* Standard: Navigates to the immediately preceding screen in the user's history.

* Contextual: In certain flows (e.g., multi-step forms), a back button might return to the previous step within that flow, rather than the global history.

* Exit Confirmation: If critical unsaved changes exist, prompt the user before exiting a screen.

  • Tab Switching (Bottom Navigation):

* Tapping an inactive tab navigates directly to that tab's root screen.

Tapping an active* tab scrolls the current screen's content to the top (if scrollable) or refreshes the content.

  • Deep Linking:

* The app should support deep linking from external sources (e.g., emails, web links) to specific screens or content within the app.

3.2. Data Input & Forms

  • Real-time Validation:

* Input fields provide immediate feedback on validation errors (e.g., invalid email format, password too short) as the user types or after losing focus.

* Visual cues: Red border, error message below the field.

  • Form Submission:

* Upon successful submission, display a success message (e.g., Toast, temporary full-screen message) and navigate the user to the next logical screen.

* During submission, disable the submit button and show a loading indicator.

  • Keyboard Management:

* The keyboard should automatically appear when a text input field is focused.

* The UI should adjust to ensure the active input field is not obscured by the keyboard.

* "Next" and "Done" actions on the keyboard should function correctly to move between fields or submit the form.

3.3. Feedback & State Management

  • Loading States:

* Initial Load: Full-screen loading spinner or skeleton UI for complex screens.

* Partial Load: Inline loading spinners for specific sections (e.g., fetching comments).

* Pull-to-Refresh: Standard gesture for refreshing list/feed content.

  • Empty States:

* When a list or section has no content (e.g., "No notifications yet", "No saved items"), display a clear message and optionally a call-to-action to populate it.

* Example: "You haven't created any posts yet. [Create Your First Post] button."

  • Error States:

* Inline Errors: Specific to a field (e.g., invalid email).

* Toast Messages: Non-intrusive, temporary messages for minor errors or feedback (e.g., "Network error, please try again").

* Full-Screen Error: For critical failures (e.g., "Something went

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
"); 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' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); 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' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

) } export default App "); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e} .app{min-height:100vh;display:flex;flex-direction:column} .app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px} h1{font-size:2.5rem;font-weight:700} "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` ## Open in IDE Open the project folder in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- 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",'{ "name": "'+pn+'", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.5.13", "vue-router": "^4.4.5", "pinia": "^2.3.0", "axios": "^1.7.9" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.1", "typescript": "~5.7.3", "vite": "^6.0.5", "vue-tsc": "^2.2.0" } } '); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname,'src') } } }) "); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]} '); zip.file(folder+"tsconfig.app.json",'{ "compilerOptions":{ "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"], "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true, "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue", "strict":true,"paths":{"@/*":["./src/*"]} }, "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"] } '); zip.file(folder+"env.d.ts","/// "); zip.file(folder+"index.html"," "+slugTitle(pn)+"
"); 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' import { createPinia } from 'pinia' import App from './App.vue' import './assets/main.css' const app = createApp(App) app.use(createPinia()) app.mount('#app') "); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue"," "); 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} "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` Open in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- 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",'{ "name": "'+pn+'", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test" }, "dependencies": { "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0", "typescript": "~5.6.0" } } '); zip.file(folder+"angular.json",'{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "'+pn+'": { "projectType": "application", "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/'+pn+'", "index": "src/index.html", "browser": "src/main.ts", "tsConfig": "tsconfig.app.json", "styles": ["src/styles.css"], "scripts": [] } }, "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"} } } } } '); zip.file(folder+"tsconfig.json",'{ "compileOnSave": false, "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"]}, "references":[{"path":"./tsconfig.app.json"}] } '); zip.file(folder+"tsconfig.app.json",'{ "extends":"./tsconfig.json", "compilerOptions":{"outDir":"./dist/out-tsc","types":[]}, "files":["src/main.ts"], "include":["src/**/*.d.ts"] } '); zip.file(folder+"src/index.html"," "+slugTitle(pn)+" "); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig) .catch(err => console.error(err)); "); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; } "); 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'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = '"+pn+"'; } "); zip.file(folder+"src/app/app.component.html","

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); 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} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); 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)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/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(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/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)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- 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:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== 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(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } 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);}});}