User Onboarding Flow
Run ID: 69cb2d1561b1021a29a8696c2026-03-31UX Design
PantheraHive BOS
BOS Dashboard

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and comprehensive UX recommendations for the "User Onboarding Flow." The goal is to create an intuitive, engaging, and efficient onboarding experience that quickly guides new users to their "Aha!" moment and successful product adoption.


User Onboarding Flow: Design Specifications & UX Recommendations

1. Introduction & Core Objectives

The User Onboarding Flow is a critical first impression, designed to introduce new users to the product's value, guide them through initial setup, and prepare them for successful engagement. This document provides the blueprint for designing an experience that is:

2. General Design Principles

These principles will guide the visual and interactive design across all onboarding screens:

3. Color Palette

The chosen color palette aims for a balance of professionalism, approachability, and clarity, ensuring excellent readability and brand recognition.

* Usage: Primary Call-to-Action (CTA) buttons, active state indicators, key headings, brand elements.

* Rationale: Evokes trust, reliability, and innovation.

* Usage: Success messages, positive feedback, secondary CTAs (when applicable), progress completion.

* Rationale: Conveys completion, positive affirmation, and growth.

* Usage: Highlighted tips, warnings, optional elements, or areas requiring user attention.

* Rationale: Draws attention without being aggressive, signals optionality or helpful hints.

* Usage: Main body text, primary labels, icons.

* Rationale: Provides excellent contrast for readability on light backgrounds. Softer than pure black.

* Usage: Backgrounds for cards, light borders, subtle separators.

* Rationale: Creates a clean, minimalist canvas, reducing visual clutter.

* Usage: Secondary text, placeholder text in input fields, disabled states.

* Rationale: Differentiates less critical information while maintaining readability.

Accessibility Note: Ensure all color combinations meet WCAG 2.1 AA contrast standards for text and interactive elements.

4. Typography

A clean, legible, and modern typeface will be used to ensure readability and maintain a professional aesthetic.

* Usage: Headings, body text, button labels, UI elements.

* Rationale: Highly legible across various screen sizes, modern, and versatile.

* Display Headings (e.g., Welcome screen): 36px - 48px

* Main Headings (H1): 28px - 32px

* Subheadings (H2): 20px - 24px

* Body Text: 16px - 18px

* Small Text/Captions: 12px - 14px

5. Iconography Style


Onboarding Flow Breakdown: Screen-by-Screen Specifications

Screen 1: Welcome / Splash Screen

Purpose: Greet the user, establish initial brand connection, and set the stage for the onboarding journey.

Design Specifications:

* Font: Inter Semibold, 36-48px, White (or color contrasting with image).

* Font: Inter Regular, 18-20px, White (or contrasting color).

* Style: Prominent, full-width (on mobile), rounded corners.

* Color: #007BFF background, White text.

* Font: Inter Semibold, 18px.

* Style: Discreet text link below the main CTA.

* Color: White (or contrasting color).

* Font: Inter Regular, 14-16px.

Wireframe Description:

text • 867 chars
+------------------------------------+
| [Back Button - Top Left]           |
| [H2: Create Your Account]          |
|                                    |
| [Label: Email Address]             |
| [Input Field: email@example.com]   |
|                                    |
| [Label: Password]                  |
| [Input Field: ******** (Show/Hide)]|
| [Password Requirements (dynamic)]  |
|                                    |
| [Checkbox: Agree to Terms & Privacy]|
|                                    |
| [Primary CTA Button: Sign Up]      |
|                                    |
| [Divider: - OR -]                  |
|                                    |
| [Button: Continue with Google]     |
| [Button: Continue with Apple]      |
|                                    |
| [Text Link: Already have an account? Log In]
+------------------------------------+
Sandboxed live preview

Project: User Onboarding Flow - Research & Design Requirements

Step 1 of 3: gemini → research_design_requirements

This document outlines the comprehensive research and design requirements for the "User Onboarding Flow." It serves as a foundational deliverable, detailing the strategic objectives, user experience principles, visual design elements, and conceptual wireframe descriptions necessary to create an effective and engaging onboarding journey for new users.


1. Executive Summary

The primary goal of this User Onboarding Flow is to seamlessly guide new users from initial sign-up to active engagement with the core value proposition of our platform. By focusing on clarity, progressive disclosure, and immediate value delivery, we aim to reduce churn, increase feature adoption, and establish a positive first impression. This document provides the detailed specifications required to design an intuitive, visually appealing, and highly effective onboarding experience.

2. Core Objectives of the Onboarding Flow

Designing an effective onboarding flow requires a clear understanding of its purpose from both the user's and the business's perspective.

2.1. User-Centric Objectives:

  • Clarity: Help users understand what the platform does and how it can benefit them.
  • Ease of Use: Provide a simple, intuitive path to get started without overwhelming information.
  • Value Proposition: Demonstrate the platform's core value early and effectively.
  • Confidence Building: Instill trust and confidence in the user's ability to use the platform successfully.
  • Personalization: Allow users to tailor their experience where relevant, making the platform feel more their own.

2.2. Business-Centric Objectives:

  • Reduce Time-to-Value (TTV): Minimize the time it takes for a new user to experience a "aha!" moment.
  • Increase Activation Rate: Improve the percentage of users who complete key initial actions and become active.
  • Lower Churn Rate: Reduce the number of users who abandon the platform shortly after signing up.
  • Boost Feature Adoption: Guide users to discover and utilize essential features.
  • Gather Essential Data: Collect necessary user preferences or profile information to enhance their experience.

3. Target Audience Profile

Our onboarding flow is designed for a diverse user base, typically characterized by:

  • Demographics: Varies, but generally tech-savvy individuals or professionals seeking efficiency and specific solutions.
  • Technological Proficiency: Ranging from intermediate to advanced, expecting modern, intuitive interfaces.
  • Motivations: Seeking solutions to specific problems, eager to explore new tools, or migrating from other platforms.
  • Pain Points: May experience frustration with complex setups, irrelevant information, or difficulty finding core functionalities in new applications.
  • Expectations: A smooth, quick, and informative setup process that respects their time and clearly highlights benefits.

4. Key Design Principles for Onboarding

The following principles will guide the design and development of the onboarding experience:

  • Simplicity & Clarity: Avoid jargon, present information concisely, and ensure every step has a clear purpose.
  • Progressive Disclosure: Introduce information and features gradually, preventing cognitive overload.
  • Value-Driven: Emphasize benefits over features, showing users why each step is important.
  • Action-Oriented: Encourage users to take small, meaningful actions that move them forward.
  • Feedback & Guidance: Provide clear visual and textual feedback on user actions and progress.
  • Skippability & Flexibility: Offer options to skip or revisit steps, catering to different user needs and paces.
  • Mobile Responsiveness: Ensure a consistent and optimized experience across all devices (desktop, tablet, mobile).
  • Accessibility: Design with WCAG guidelines in mind, ensuring usability for all users, including those with disabilities.

5. Onboarding Flow Stages & Content Strategy

The onboarding flow will be structured into distinct, logical stages, each with specific content goals.

5.1. Stage 1: Welcome & Introduction

  • Purpose: Greet the user, provide a brief overview of the platform's core value, and set expectations.
  • Key Content:

* Catchy headline and tagline.

* 1-3 key benefits presented visually (e.g., via illustrations or short animations).

* Clear call to action (CTA) to start the onboarding journey or sign up.

* Option to log in for existing users.

  • Interaction: Simple navigation (e.g., "Get Started" button).

5.2. Stage 2: Account Creation / Sign-Up

  • Purpose: Collect essential user information to create an account.
  • Key Content:

* Fields for Email, Password (with confirmation/strength indicator).

* Social sign-up options (Google, Apple, etc.).

* Terms of Service and Privacy Policy links (discreetly placed).

* Error messages for invalid inputs.

  • Interaction: Form submission, clear validation, password visibility toggle.

5.3. Stage 3: Personalization / Preference Setup

  • Purpose: Gather information to tailor the user's initial experience and demonstrate relevance.
  • Key Content:

* Questions about user roles, interests, goals, or industry.

* Visual choices (e.g., "What are you here to do?" with clickable cards).

* Optional fields clearly marked.

* Progress indicator.

  • Interaction: Checkboxes, radio buttons, dropdowns, text input, multi-step forms.

5.4. Stage 4: Core Feature Introduction / Quick Tour

  • Purpose: Introduce 1-2 critical features that deliver immediate value, guiding the user to their first "aha!" moment.
  • Key Content:

* Short, focused explanations of key functionalities.

* Interactive elements (e.g., "click here to try this").

* Brief tutorial videos or animated GIFs.

* Option to skip the tour.

  • Interaction: Step-by-step guided tour, contextual tooltips, direct interaction with a simulated or live feature.

5.5. Stage 5: Onboarding Completion & Dashboard Access

  • Purpose: Congratulate the user on completion, provide a clear path to the main dashboard, and suggest next steps.
  • Key Content:

* "You're All Set!" message.

* Link to the main dashboard.

* Suggestions for initial actions (e.g., "Create your first project," "Explore templates").

* Opportunity to download a mobile app (if applicable).

  • Interaction: Primary CTA to dashboard, secondary CTAs for suggested actions.

5.6. Error Handling & Feedback

  • Purpose: Guide users through issues without frustration.
  • Strategy:

* Inline Validation: Provide real-time feedback on form fields.

Clear Error Messages: Explain what went wrong and how* to fix it.

* Non-intrusive: Use toast notifications or subtle visual cues for success/non-critical feedback.

* Help & Support: Offer easy access to FAQ or support channels if a user gets stuck.

5.7. Success Metrics

  • Activation Rate: Percentage of users completing the onboarding flow and performing a defined "first key action."
  • Onboarding Completion Rate: Percentage of users who start and successfully finish the entire onboarding flow.
  • Time to First Key Action: Average time taken for new users to reach their "aha!" moment.
  • Drop-off Points: Identification of specific steps where users abandon the onboarding process.

6. Wireframe Descriptions (Illustrative Examples)

These descriptions provide a conceptual layout for key screens within the onboarding flow. Actual visual design will follow.

6.1. Screen 1: Welcome Screen

  • Layout: Centered content, clean and spacious.
  • Elements:

* Header: Brand Logo (top left).

* Hero Section:

* Large, engaging illustration or animation representing the platform's core benefit.

* Prominent Headline: "Welcome to [Platform Name]!"

* Sub-headline: "Unlock your potential with our intuitive tools." (1-2 sentences highlighting key value).

* Call to Action (Primary): Large, prominent button: "Get Started"

* Call to Action (Secondary): Discreet text link: "Log In" (for existing users).

* Footer (Optional): Links to Privacy Policy, Terms of Service.

6.2. Screen 2: Account Creation / Sign-Up

  • Layout: Single-column form, clear input fields, progress indicator.
  • Elements:

* Header: Brand Logo, "Back" button/link (if previous step exists).

* Progress Indicator: Visual display (e.g., dots or bar) showing "Step 1 of 5".

* Headline: "Create Your Account"

* Form Fields:

* Email Address (input field)

* Password (input field with toggle for visibility)

* Confirm Password (input field)

* Checkbox: "I agree to the Terms of Service and Privacy Policy" (with clickable links).

* Social Sign-Up: Buttons for "Continue with Google," "Continue with Apple."

* Call to Action: Primary button: "Create Account"

* Text Link: "Already have an account? Log In"

6.3. Screen 3: Personalization / Interest Selection

  • Layout: Card-based selection or multi-choice form.
  • Elements:

* Header: Brand Logo, "Back" button/link, "Skip" option.

* Progress Indicator: "Step 3 of 5".

* Headline: "Tell Us About Your Goals" or "What Brings You Here?"

* Description: "This helps us tailor your experience."

* Selection Area:

* Multiple choice cards/buttons with clear icons and labels (e.g., "Boost Productivity," "Manage Projects," "Learn New Skills"). Users can select one or multiple.

* Alternatively, a dropdown for "Your Role" (e.g., "Developer," "Designer," "Marketing").

* Call to Action: Primary button: "Continue"

* Optional Text Link: "Skip for now"

6.4. Screen 4: Core Feature Highlight / Quick Tour

  • Layout: Full-screen modal or overlay with sequential steps.
  • Elements:

* Header: Brand Logo, "Skip Tour" button.

* Tour Content (per step):

* Visual representation of the feature (screenshot, GIF, short video).

* Headline: "Organize Your Tasks with Ease"

* Description: "Quickly create, assign, and track tasks to stay on top of your workflow."

* Contextual arrow/highlight pointing to the feature area on a simulated dashboard.

* Navigation: "Next" button, "Previous" button, "Finish Tour" button on the last step.

* Progress Indicator: "1 of 3" for tour steps.

6.5. Screen 5: Onboarding Completion

  • Layout: Celebration screen, clear path forward.
  • Elements:

* Header: Brand Logo.

* Hero Section:

* Large "Success" icon or celebratory illustration.

* Headline: "You're All Set!" or "Welcome Aboard!"

* Sub-headline: "Your journey with [Platform Name] begins now."

* Call to Action (Primary): Prominent button: "Go to Dashboard"

* Suggested Next Steps (Optional):

* Secondary buttons/links: "Create Your First Project," "Explore Templates," "Invite Team Members."

* Optional: Link to download mobile app.

7. User Experience (UX) Recommendations

Beyond the wireframes, these recommendations ensure a delightful and efficient onboarding experience.

  • Visual Progress Indicators: Implement clear visual cues (e.g., step-by-step dots, progress bar) throughout multi-step forms to show users where they are in the process.
  • Micro-interactions: Utilize subtle animations and visual feedback for button clicks, form submissions, and progress updates to make the experience feel more dynamic and responsive.
  • Contextual Help: Provide small, non-intrusive tooltips or "i" icons next to fields where users might need clarification.
  • Keyboard Navigation: Ensure the entire onboarding flow is fully navigable using only a keyboard for accessibility and efficiency

UX Recommendations:

  • Minimize Fields: Only ask for essential information. Additional profile details can be gathered later.
  • Clear Error Handling: Provide immediate, constructive feedback for invalid inputs.
  • Password Visibility Toggle: Enhance usability and reduce errors.
gemini Output

User Onboarding Flow: Final Design Assets & Specifications

This document outlines the comprehensive design specifications, wireframe descriptions, color palettes, and UX recommendations for the "User Onboarding Flow." This deliverable represents the finalized design assets, ready for development, ensuring a smooth, engaging, and intuitive first-time user experience.


1. Introduction & Design Philosophy

The User Onboarding Flow is critical for user retention and initial engagement. Our design philosophy for this flow centers on:

  • Clarity & Simplicity: Guiding users effortlessly with minimal cognitive load.
  • Engagement & Delight: Using thoughtful visuals and interactions to create a positive first impression.
  • Brand Consistency: Reinforcing brand identity through consistent visual language.
  • Actionability: Prompting users towards key actions and the core value proposition.
  • User-Centricity: Anticipating user needs and providing options for personalization and control.

2. Overall Design Principles

  • Progressive Disclosure: Presenting information gradually to avoid overwhelming users.
  • Visual Hierarchy: Clearly distinguishing primary and secondary information and actions.
  • Feedback & Assurance: Providing immediate visual confirmation for user actions.
  • Accessibility: Ensuring the design is usable by individuals with diverse abilities.
  • Responsiveness: Optimizing the experience across various screen sizes (mobile-first approach).

3. Detailed Design Specifications

3.1. Welcome Screen / Splash Screen

  • Purpose: Initial brand introduction and invitation to begin the onboarding journey.
  • Elements:

* Logo: Centered, prominent display of the brand logo.

* Headline (H1): "Welcome to [App Name]!" or a similar inviting message. (e.g., "Unlock Your Potential with [App Name]").

Font:* Primary Font, Bold, Size 36pt (Mobile) / 48pt (Desktop).

* Sub-headline (Body): A concise value proposition or mission statement. (e.g., "Your journey to better [specific benefit] starts here.").

Font:* Primary Font, Regular, Size 16pt (Mobile) / 18pt (Desktop).

* Hero Image/Illustration: A captivating, brand-aligned visual that conveys the app's core benefit or aesthetic.

Style:* High-quality, illustrative, or abstract photography (refer to Section 7).

* Primary Call to Action (CTA): "Get Started" or "Create Account".

Button Style:* Primary Button (refer to Section 5.1).

* Secondary CTA (Optional): "Log In" (for existing users).

Button Style:* Secondary Button or Text Link (refer to Section 5.1).

  • Behavior: Smooth transition to the next step upon CTA tap.

3.2. Feature Tour / Introduction Screens (3-5 steps recommended)

  • Purpose: Briefly highlight key features and benefits before account creation.
  • Elements (per screen):

* Progress Indicator: Dots at the bottom indicating current step and total steps.

* Headline (H2): Short, benefit-oriented statement for the feature. (e.g., "Organize Your Tasks Effortlessly").

Font:* Primary Font, Semi-bold, Size 24pt (Mobile) / 32pt (Desktop).

* Body Text (Body): 1-2 sentences elaborating on the feature/benefit.

Font:* Primary Font, Regular, Size 16pt (Mobile) / 18pt (Desktop).

* Feature Illustration/Icon: A clear, engaging visual representing the feature.

Style:* Consistent with overall iconography/imagery (refer to Section 7).

* Navigation:

* "Skip" Link: Top-right, allowing users to bypass the tour.

* "Next" Button: Primary Button, advances to the next screen.

* "Done" / "Finish" Button: On the last tour screen, leads to sign-up/login.

  • Behavior: Swipeable horizontal navigation, or tap 'Next'. 'Skip' navigates directly to Sign-up/Login.

3.3. Sign-up / Registration Screen

  • Purpose: Collect necessary information to create a user account.
  • Elements:

* Headline (H2): "Create Your Account" or "Join [App Name]".

* Input Fields:

* Email Address: Standard text input, keyboard type: email.

* Password: Password input, with a "Show/Hide Password" toggle icon.

* Confirm Password (Optional, but recommended for clarity).

* Name (Optional, depending on app requirements).

Style:*

* Default: Light grey border, clear background, placeholder text (Secondary Neutral Color).

* Focus: Primary Accent Color border, slightly darker background.

* Error: Semantic Error Color border and text below field.

* Success: Semantic Success Color border (post-validation).

Labels:* Above input field, Primary Text Color, Body Font, Size 14pt.

Placeholder Text:* Secondary Neutral Color, Body Font, Size 16pt.

* Password Requirements: Clear, inline feedback as the user types (e.g., "Must be 8 characters," "Contains a number").

* Primary CTA: "Sign Up" or "Create Account".

Button Style:* Primary Button, enabled when all required fields are valid.

* Social Login Options (Optional): "Continue with Google," "Continue with Apple," "Continue with Facebook."

Button Style:* Outline or Icon-only buttons with respective brand logos.

* "Already have an account?" Link: Leads to Login screen.

Style:* Text Link, Primary Accent Color.

* Terms & Privacy Links: Small text linking to legal documents.

Style:* Small Text, Secondary Text Color.

  • Behavior: Real-time input validation. Loading spinner on CTA after submission.

3.4. Login Screen

  • Purpose: Allow existing users to access their accounts.
  • Elements:

* Headline (H2): "Welcome Back" or "Log In to Your Account".

* Input Fields: Email Address, Password (similar styles to Sign-up).

* "Forgot Password?" Link: Text link, Primary Accent Color, leads to password reset flow.

* Primary CTA: "Log In".

Button Style:* Primary Button.

* Social Login Options (Optional): Consistent with Sign-up screen.

* "Don't have an account?" Link: Leads to Sign-up screen.

  • Behavior: Similar to Sign-up, with validation and loading states.

3.5. Personalization / Preference Selection (Optional)

  • Purpose: Gather initial preferences to tailor the user experience.
  • Elements:

* Headline (H2): "Tell Us About Yourself" or "What Are Your Interests?".

* Body Text (Body): Explains the benefit of providing this information.

* Input Types:

* Radio Buttons/Checkboxes: For single/multi-select options.

Style:* Primary Accent Color for selected state, smooth animation on selection.

* Tag Selectors: For multiple, flexible choices.

Style:* Rounded buttons, Primary Accent Color for selected state, Neutral Background for unselected.

* Sliders: For numerical ranges.

Style:* Primary Accent Color for active track.

* Progress Indicator: If multi-step.

* "Skip for now" Link: Top-right, for users who prefer to explore first.

* Primary CTA: "Continue" or "Finish".

  • Behavior: Validation for required selections. Progress update for multi-step.

3.6. Onboarding Completion / Success Screen

  • Purpose: Confirm successful account creation/onboarding and guide to the main app experience.
  • Elements:

* Success Illustration/Animation: A celebratory visual.

* Headline (H1): "You're All Set!" or "Welcome Aboard, [User Name]!".

* Body Text (Body): A brief, encouraging message about what to do next. (e.g., "Start exploring your personalized dashboard.").

* Primary CTA: "Go to Dashboard" or "Start Exploring".

Button Style:* Primary Button.

* Secondary CTA (Optional): "Invite Friends," "Explore Tutorials."

Button Style:* Secondary Button or Text Link.

  • Behavior: Navigates directly into the core application.

4. Wireframe Descriptions (Structural Layouts)

4.1. Welcome Screen

  • Layout: Vertically centered.
  • Top: Brand Logo.
  • Middle: Large Headline, Sub-headline, prominent Hero Image/Illustration below.
  • Bottom: Stacked CTAs (Primary button, then secondary text link/button).

4.2. Feature Tour Screens

  • Layout: Full-screen content for each step.
  • Top-Left: Optional 'Back' arrow (if previous steps exist).
  • Top-Right: 'Skip' text link.
  • Middle: Large Feature Illustration/Icon, centered Headline, centered Body Text.
  • Bottom: Progress indicator dots, then 'Next' or 'Done' Primary Button.

4.3. Sign-up / Login Screens

  • Layout: Top-aligned content, scrollable for smaller screens.
  • Top: Headline.
  • Middle: Vertically stacked input fields with labels above. Below inputs, a 'Forgot Password' link (for Login) or password requirements (for Sign-up).
  • Below Inputs: Primary Button.
  • Below Primary Button: Horizontal separator ("Or") then Social Login buttons.
  • Bottom: "Already have an account?" / "Don't have an account?" link, then Terms & Privacy links in smaller text.

4.4. Personalization Screens

  • Layout: Similar to Sign-up, with headline and body text at the top.
  • Middle: Input elements (radio buttons, checkboxes, tags, sliders) arranged logically, potentially grouped.
  • Bottom: 'Skip for now' link (if optional), then 'Continue' / 'Finish' Primary Button. Progress indicator if multi-step.

4.5. Onboarding Completion Screen

  • Layout: Vertically centered.
  • Top: Success Illustration/Animation.
  • Middle: Large Headline, encouraging Body Text.
  • Bottom: Stacked CTAs (Primary button, then optional secondary text link/button).

5. Color Palettes

Our brand color palette ensures consistency and guides user attention throughout the onboarding process.

5.1. Primary & Secondary Colors

  • Primary Brand Color: #4A90E2 (A vibrant, trustworthy blue)

Usage:* Primary Call to Action buttons, active states, key highlights, brand elements.

  • Secondary Accent Color: #50C878 (An uplifting green)

Usage:* Success indicators, positive reinforcement, secondary highlights.

5.2. Neutral Colors

  • Background Color: #F8F8F8 (Light grey, clean and modern)

Usage:* Main screen backgrounds.

  • Card/Container Background: #FFFFFF (Pure white)

Usage:* Elevated elements like input fields, modals, content cards.

  • Primary Text Color: #333333 (Dark charcoal for high readability)

Usage:* Headlines, body text, primary labels.

  • Secondary Text Color: #666666 (Medium grey for secondary information)

Usage:* Sub-headlines, placeholder text, descriptive labels, small print.

  • Border/Divider Color: #E0E0E0 (Light grey for subtle separation)

Usage:* Input field borders, dividers, inactive states.

5.3. Semantic Colors

  • Success Color: #50C878 (Same as Secondary Accent Color)

Usage:* Success messages, confirmed actions.

  • Warning Color: #FFC107 (Amber yellow)

Usage:* Cautionary alerts, non-critical warnings.

  • Error Color: #DC3545 (Vivid red)

Usage:* Error messages, invalid input states, critical alerts.


6. Typography

A clear and consistent typographic system enhances readability and brand identity.

  • Primary Font Family: Inter (or similar modern sans-serif like Roboto, Open Sans)
user_onboarding_flow.txt
Download source file
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}