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

This document provides a comprehensive wireframe specification for the mobile application. It details the user interface's structure, navigation, reusable components, and interaction behaviors, along with crucial notes for the development team. This specification serves as a blueprint for the application's foundational design and functionality.


1. Mobile App Wireframe Specification: Overview

This specification outlines the core structure and user experience of the mobile application at a wireframe level. It is designed to provide clarity on screen layouts, user flows, interactive elements, and overall application behavior before detailed visual design or development begins.

Purpose:

Target Audience:

Product Managers, UX/UI Designers, and Mobile Application Developers.


2. Screen Flows Specification

This section details the navigation paths and relationships between different screens within the application. The provided JSON structure describes each screen, its purpose, and how users transition between them.

text • 1,325 chars
**Explanation of Screen Flow JSON Structure:**

*   **`screen_flows`**: An array containing definitions for each screen in the application.
*   **`id`**: A unique identifier for the screen (e.g., `SCN-001-Splash`).
*   **`name`**: A human-readable name for the screen (e.g., "Splash Screen").
*   **`purpose`**: A brief description of the screen's primary objective.
*   **`type`**: Categorization of the screen's general layout/function (e.g., "Static", "Interactive", "Form", "Dashboard").
*   **`elements_overview`**: A high-level list of key UI elements expected on the screen (not exhaustive, but representative).
*   **`navigation_paths`**: An array of objects describing how users move *from* this screen to others.
    *   **`trigger`**: The user action or event that initiates the navigation (e.g., "Tap 'Next' Button", "Automatic").
    *   **`target_screen_id`**: The `id` of the screen the user navigates to.
    *   **`transition_type`**: The visual animation or effect used during the transition (e.g., "Fade", "Slide Left", "Slide Up").

---

## 3. Component Library Specification

This section defines the reusable UI components that will be used across the application. Each component is specified with its properties, states, and usage guidelines. This promotes consistency and efficiency in development.

Sandboxed live preview

As part of the "Mobile App Wireframe Kit" workflow, we are currently in Step 1: plan_architecture. This step focuses on outlining the comprehensive structure and core components of the wireframe kit, ensuring a systematic and effective approach to its development.

This document details the architectural plan for your Mobile App Wireframe Kit, covering its proposed structure, key components, and the methodology for its creation. This plan will serve as the blueprint for the subsequent steps, guiding the design and development of a robust and usable wireframe solution.


Mobile App Wireframe Kit: Architectural Plan

1. Introduction & Objectives

The primary objective of this Mobile App Wireframe Kit is to provide a standardized, reusable, and comprehensive set of tools for rapidly prototyping mobile application interfaces. This kit will facilitate efficient design, clear communication, and streamlined handoff to development teams.

Key Objectives:

  • Standardization: Establish consistent design patterns and components.
  • Efficiency: Accelerate the wireframing process.
  • Clarity: Improve communication of user flows and interactions.
  • Reusability: Offer a library of pre-built, adaptable components.
  • Developer Handoff: Provide clear specifications for implementation.

2. Core Architectural Components

The Mobile App Wireframe Kit will be structured around several interconnected core components, each serving a distinct purpose in the design process.

2.1. Screen Flow & User Journey Mapping

This section will define the structure for mapping user interactions and overall application navigation.

  • User Flow Diagrams: Visual representation of user paths through the application, detailing entry points, decision points, and outcomes.

* Components: Start/End nodes, Process steps, Decision points, Connectors.

* Focus: Core user tasks (e.g., Onboarding, Item Purchase, Profile Management).

  • Screen Mapping: A high-level overview linking individual wireframe screens to specific steps in the user flows.
  • Interaction Scenarios: Brief descriptions of specific user actions and system responses within a flow.

2.2. Comprehensive Component Library

The heart of the wireframe kit, providing a collection of reusable UI elements. Each component will be designed for flexibility and ease of use.

  • Categorization: Components will be logically grouped for easy navigation.

* Basic Elements: Buttons (primary, secondary, icon), Text Fields (single-line, multi-line), Checkboxes, Radio Buttons, Toggles, Sliders.

* Navigation: Top Bars (App Bars), Bottom Navigation, Tab Bars, Side Drawers (Navigation Drawers), Breadcrumbs.

* Data Display: Lists (simple, complex), Cards, Tables, Grids, Avatars, Progress Indicators (loaders, spinners).

* Feedback & Modals: Toasts, Snackbars, Dialogs (Alerts, Confirmations), Sheets (Bottom Sheets, Action Sheets).

* Media: Image Placeholders, Video Placeholders.

* Forms: Date Pickers, Time Pickers, Dropdowns/Selects, Steppers.

  • Component States: Each interactive component will include variations for its different states (e.g., Default, Hover, Focused, Pressed, Disabled, Error, Success).
  • Styling & Variants: While wireframes are low-fidelity, components will have basic stylistic variations (e.g., filled/outlined buttons, different text styles for headings/body).

2.3. Interaction Patterns & Micro-interactions

This section will document common interaction patterns and their expected behavior, crucial for conveying usability.

  • Common Gestures: Tap, Double Tap, Long Press, Swipe (left/right/up/down), Pinch (in/out), Drag & Drop.
  • Navigation Patterns:

* Hierarchical: Stacked screens (e.g., drill-down navigation).

* Flat: Peer screens (e.g., tab navigation).

* Content-Driven: Dynamic navigation based on content (e.g., tag clouds).

  • Feedback Mechanisms: Visual and haptic feedback for user actions (e.g., button presses, form submissions).
  • Transitions & Animations (Conceptual): While not fully animated in wireframes, the intent of transitions (e.g., slide, fade, dissolve) and micro-interactions will be noted.

2.4. Template Screens & Layouts

Pre-built screen templates to accelerate the creation of common mobile app views.

  • Common Screen Types:

* Onboarding (Welcome, Sign Up, Login)

* Home/Dashboard

* List View (e.g., Product List, News Feed)

* Detail View (e.g., Product Detail, Article Detail)

* Profile View (User Profile, Settings)

* Forms (e.g., Checkout, Contact Form)

* Empty States, Error States

  • Responsive Layout Grids: Definition of standard grid systems for mobile (e.g., 4-column, 12-column) to ensure consistent spacing and alignment.

2.5. Developer Handoff & Specification Notes

Guidelines and templates for communicating design intent and technical specifications to development teams.

  • Screen Specifications:

* Dimensions & Spacing: Key element sizes, padding, and margins (e.g., using a 8pt grid system).

* Typography: Font families (placeholders), sizes, weights, line heights for different text styles.

* Color Palette (Conceptual): Placeholder colors to distinguish elements (e.g., primary action, secondary action, background).

* Iconography: Placeholders for common icons.

  • Interaction Specifications: Detailed notes on how elements should behave (e.g., "On tap, navigate to X screen with Y transition," "On long press, show Z context menu").
  • State Management: Clear documentation of different component states and their visual representation.
  • Asset Export Guidelines: Recommendations for asset naming and preparation (though this is more for high-fidelity, it's good to keep in mind).

3. Tooling & Platform Strategy

The wireframe kit will be developed using a widely adopted design tool to ensure accessibility and collaboration.

  • Primary Tool: Figma (Recommended for its cloud-based collaboration, robust component system, and ease of sharing).
  • File Structure: A well-organized Figma project with dedicated pages for components, screen flows, templates, and documentation.
  • Naming Conventions: Consistent naming for layers, frames, components, and styles to maintain order and facilitate search.

4. Methodology & Workflow for Kit Creation

The creation of the Mobile App Wireframe Kit will follow an iterative and structured approach.

4.1. Phase 1: Research & Definition (Current Step)

  • Objective: Define the scope, core components, and architectural structure.
  • Activities: User input analysis, competitor analysis (of other wireframe kits), defining key user flows and app types to support.

4.2. Phase 2: Component & Pattern Development

  • Objective: Build the foundational component library and define interaction patterns.
  • Activities:

* Create basic UI elements (buttons, inputs).

* Develop complex components (lists, cards, navigation).

* Document states and basic interactions for each component.

* Establish a consistent styling guide (even for low-fidelity).

4.3. Phase 3: Screen Flow & Template Assembly

  • Objective: Construct common screen templates and demonstrate user flows.
  • Activities:

* Design representative screen templates using the component library.

* Assemble these screens into core user flows.

* Add annotations and notes for clarity.

4.4. Phase 4: Documentation & Handoff Preparation

  • Objective: Finalize documentation and prepare the kit for use and developer handoff.
  • Activities:

* Compile detailed usage guidelines for the kit.

* Create example developer handoff notes.

* Perform internal review and gather feedback.

5. Future Enhancements (Post-Launch Considerations)

  • Advanced Interaction Examples: More complex gestures and animations.
  • Theming Options: Basic light/dark mode variants for components.
  • Accessibility Annotations: Guidelines for accessibility considerations at the wireframe stage.
  • Integration with Prototyping Tools: Deeper integration for interactive prototypes.
  • Version Control & Updates: A clear strategy for maintaining and updating the kit.

This architectural plan provides a solid foundation for the development of your Mobile App Wireframe Kit. The next steps will involve the detailed design and construction of these outlined components and flows.

json

{

"component_library": [

{

"id": "CMP-BTN-001-Primary",

"name": "Primary Button",

"type": "Button",

"description": "Main call-to-action button for critical actions.",

"properties": {

"text_label": "String (e.g., 'Next', 'Sign Up')",

"width": "Full-width or Fixed (e.g., 'match_parent', '200dp')",

"

gemini Output

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

This Mobile App Wireframe Kit ensures a shared understanding across all stakeholders, promoting consistency, efficiency, and clarity throughout the entire product development lifecycle.


I. Screen Flows

This section details the primary user journeys within the application, illustrating the sequence of screens and interactions required to complete key tasks. Each flow is described with its objective, the screens involved, and the transitions between them.

Note: In a live deliverable, each flow would typically be accompanied by visual flow diagrams (e.g., using arrows and screen thumbnails) for clarity.

A. Core User Flows

1. Onboarding & Account Creation

  • Objective: Guide new users through initial app features and facilitate account registration.
  • Flow:

1. Splash Screen: App logo and loading indicator.

Transition:* Automatic, after [X] seconds or successful loading.

2. Welcome/Intro Screens (3-5 screens): Highlight key app benefits with visuals and short text.

Transition:* Swipe left to navigate, or "Skip" button to proceed directly to Sign Up/Login.

3. Sign Up / Login Screen: Options for new user registration (Email, Social Login) or existing user login.

Transition:* Tap "Sign Up" or "Login" button.

4. Registration Form (Email): Fields for Name, Email, Password. Password confirmation.

Transition:* Tap "Create Account" button.

5. Email Verification (Optional): Prompt to check email for verification link/code.

Transition:* User verifies externally, or taps "Resend Email". App automatically checks status or user taps "I've Verified".

6. Profile Setup (Initial): Optional fields for basic profile information (e.g., profile picture, preferences).

Transition:* Tap "Complete Profile" or "Skip for now".

7. Onboarding Complete / Home Screen: Confirmation and redirection to the main app interface.

Transition:* Automatic after profile setup.

2. Main Feature X (e.g., "Discover Content")

  • Objective: Allow users to browse and discover content relevant to their interests.
  • Flow:

1. Home/Dashboard Screen: Displays personalized feed, featured content, and navigation to other sections.

Transition:* Tap on "Discover" tab/section.

2. Discover Screen: Grid or list view of various content categories or trending items.

Transition:* Tap on a specific content item or category.

3. Content Detail Screen: Displays full details of the selected content (e.g., description, images, comments).

Transition:* Tap "Back" arrow to return to Discover, or tap related content suggestions.

4. Related Content Screen (Optional): If user taps on a related item from the detail screen.

Transition:* Tap "Back" arrow.

3. Profile Management

  • Objective: Enable users to view and update their personal information and app settings.
  • Flow:

1. Home/Dashboard Screen:

Transition:* Tap "Profile" icon/tab in the navigation bar.

2. Profile Screen: Displays user's profile picture, name, bio, and options to edit or access settings.

Transition:* Tap "Edit Profile" or "Settings".

3. Edit Profile Screen: Form fields for updating Name, Email, Bio, Profile Picture.

Transition:* Tap "Save Changes" button.

4. Settings Screen: List of app settings (e.g., Notifications, Privacy, Logout).

Transition:* Tap on a specific setting item.

5. Notification Settings Screen: Toggles for various notification types.

Transition:* Toggle switches, tap "Back" to return to Settings.


II. Component Library

This section defines the reusable UI components that form the building blocks of the mobile application. Each component is described with its purpose, states, and common usage, ensuring consistency across the app.

Note: In a live deliverable, each component would be accompanied by visual examples for all defined states.

A. Navigation Components

  1. Top App Bar / Header

* Description: Fixed bar at the top of the screen, providing context and primary actions.

* Variants:

* Standard: Title, Back/Menu icon, Optional action icons (e.g., Search, Share).

* Search Bar: Integrated search input.

* States: Default, Scrolled (can change background color/elevation).

* Usage: All primary screens.

  1. Bottom Navigation Bar

* Description: Fixed bar at the bottom for quick access to main app sections.

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

* States: Default (inactive), Active (selected item highlighted).

* Usage: Home, Discover, Profile, etc.

  1. Tabs

* Description: Horizontal list of options for switching between different views within the same screen.

* Variants: Icon-only, Text-only, Icon + Text.

* States: Default (inactive), Active (selected tab highlighted with an indicator).

* Usage: Filtering content, switching sub-sections.

B. Buttons

  1. Primary Button

* Description: High-emphasis call-to-action.

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

* Style: Filled background with contrasting text.

* Usage: "Submit", "Continue", "Save", "Create Account".

  1. Secondary Button (Outlined/Ghost)

* Description: Medium-emphasis action, often complementary to a primary button.

* States: Default, Pressed, Disabled.

* Style: Outlined border with text in primary color, transparent background.

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

  1. Tertiary Button (Text Only)

* Description: Low-emphasis action, often for less critical or contextual actions.

* States: Default, Pressed, Disabled.

* Style: Text only, usually in primary color.

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

  1. Icon Button

* Description: Button represented solely by an icon.

* States: Default, Pressed, Disabled.

* Usage: Navigation (Back, Close), Actions (Share, Like, Settings).

C. Input Fields

  1. Text Input

* Description: Single-line text entry field.

* Elements: Label (optional, floating or static), Placeholder text, Input area, Helper text (optional).

* States: Default, Focused, Filled, Error (with red border/text), Disabled.

* Usage: Name, Email, Search queries.

  1. Password Input

* Description: Text input for sensitive information, with masked characters.

* Elements: Same as Text Input, plus a "Show/Hide Password" toggle icon.

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

* Usage: Password entry.

  1. Text Area

* Description: Multi-line text entry field.

* Elements: Label, Placeholder text, Input area.

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

* Usage: Bio, Comments, Descriptions.

  1. Dropdown / Selector

* Description: Allows users to select one option from a predefined list.

* Elements: Label, Display area, Down arrow icon.

* States: Default, Active (list open), Selected, Disabled.

* Usage: Country selection, Category choice.

D. Indicators & Feedback

  1. Loading Spinner / Progress Indicator

* Description: Visual cue indicating an ongoing process.

* Variants: Indeterminate (continuous animation), Determinate (shows progress percentage).

* Usage: Data fetching, form submission, screen loading.

  1. Toast / Snackbar

* Description: Brief, non-intrusive message displayed temporarily at the bottom of the screen.

* Content: Short text message, optional action button.

* Usage: Confirmation (e.g., "Item added to cart"), Error message ("Network error").

  1. Alert Dialog / Modal

* Description: Interruptive pop-up for critical information or requiring user decision.

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

* Usage: Confirmation before destructive actions, important notifications.

E. Other Components

  1. Cards

* Description: Container for related information, often with an image, title, and description.

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

* Usage: Content display in feeds, product listings.

  1. Avatars / Profile Images

* Description: Circular or square display of a user's profile picture or placeholder.

* Variants: Small, Medium, Large.

* Usage: User profiles, comments, chat.

  1. Switches / Toggles

* Description: Allows users to turn an option on or off.

* States: On, Off, Disabled.

* Usage: Notification settings, privacy options.


III. Interaction Patterns

This section defines the common ways users will interact with the mobile application, beyond simple screen transitions. Understanding these patterns ensures a consistent and intuitive user experience.

A. Gestures

  1. Tap / Press

* Description: Single, quick touch on an interactive element.

* Context: Buttons, list items, icons, links.

* System Response: Triggers an action, navigates to a new screen, opens a modal/menu.

* Feedback: Visual feedback (e.g., slight color change, ripple effect) on tap.

  1. Long Press

* Description: Holding a finger down on an element for an extended period (typically >500ms).

* Context: Images, list items, icons.

* System Response: Reveals contextual menus, enables selection mode, initiates drag-and-drop.

* Feedback: Haptic feedback (vibration) and visual change.

  1. Swipe (Horizontal)

* Description: Dragging a finger across the screen horizontally.

* Context: Carousels, image galleries, tabbed navigation, dismissing items in a list (e.g., swipe to delete/archive).

* System Response: Navigates between items/tabs, reveals hidden actions.

  1. Swipe (Vertical)

* Description: Dragging a finger across the screen vertically.

* Context: Scrolling through lists or content

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