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

User Onboarding Flow: Research & Design Requirements

This document outlines the comprehensive research and design requirements for the "User Onboarding Flow," serving as the foundational step for its development. The goal is to create an intuitive, engaging, and effective onboarding experience that swiftly guides new users to their "Aha! moment" and maximizes retention.


1. Overview & Objectives

Objective: To design a user onboarding flow that effectively introduces new users to the platform's core value proposition, facilitates initial setup, and encourages active engagement, ultimately leading to higher user activation and retention rates.

Key Goals:

  • Reduce Time to Value: Help users quickly understand and experience the primary benefits of the platform.
  • Minimize Friction: Simplify the initial setup and learning curve, making the process effortless.
  • Increase Activation Rate: Guide users to complete essential setup tasks and initiate core actions.
  • Enhance Engagement: Create an enjoyable, informative, and visually appealing first impression.
  • Educate Effectively: Introduce key features and functionalities through progressive disclosure, avoiding overwhelm.
  • Personalization: Allow for tailored experiences based on user roles, goals, or preferences.

2. Detailed Design Specifications

The onboarding flow will be designed with a focus on clarity, efficiency, user delight, and brand consistency.

2.1. Flow Structure & Stages

The proposed onboarding flow will consist of the following key stages, designed to progressively introduce functionality and gather necessary information:

  1. Welcome & Value Proposition (1-2 screens):

* Purpose: Greet the user, articulate the core value proposition, and set a positive tone.

* Content: Engaging headline, concise benefit statements, visually appealing hero illustration or animation.

* Interaction: Primary "Get Started" or "Next" button; optional secondary "Skip Tour" or "Learn More" link.

  1. Account Setup / Personalization (2-3 screens):

* Purpose: Collect essential user information (e.g., name, role, primary goal, team size) to tailor the experience.

* Content: Clear input fields, dropdowns, radio buttons, or checkboxes; minimal required fields.

* Interaction: "Continue," "Next," and "Skip for now" options. A clear progress indicator will be present.

  1. Core Feature Introduction / Quick Tour (2-4 screens):

* Purpose: Highlight 1-3 critical features that deliver immediate value, focusing on problem-solving or benefit-driven use cases.

* Content: Short, benefit-oriented descriptions; high-quality screenshots, animated GIFs, or short video clips demonstrating features in action.

* Interaction: "Next," "Previous," "Skip Tour," and "Finish" buttons. A clear progress indicator will be maintained.

  1. **First Task / "Aha!" Moment Prompt (1 screen):
gemini Output

This document outlines the detailed design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "User Onboarding Flow." The goal is to create an engaging, intuitive, and efficient onboarding experience that helps new users quickly understand the platform's value and encourages continued engagement.


1. Detailed Design Specifications

The User Onboarding Flow will consist of several distinct screens, each with a specific purpose, content, and functionality designed to guide the user seamlessly.

Screen 1: Welcome & Introduction

  • Purpose: Greet the user, establish brand identity, and provide a clear entry point into the application.
  • Content:

* Brand Logo: Prominently displayed at the top or center.

* Headline: An inviting and concise welcome message (e.g., "Welcome to [Platform Name]!").

* Tagline/Value Statement: A brief, compelling sentence highlighting the core benefit (e.g., "Unlock your potential," "Simplify your workflow").

* Call to Action (CTA): A primary button to initiate the onboarding process (e.g., "Get Started," "Begin Your Journey").

  • Functionality:

* Tapping the primary CTA navigates to the next screen.

  • Interaction: Clean, simple, and direct.

Screen 2: Value Proposition Showcase (Feature Carousel)

  • Purpose: Educate users about the platform's key features and benefits in an easily digestible, visual format.
  • Content:

* Multiple Slides (3-4 recommended): Each slide focuses on a distinct feature or benefit.

* Icon/Illustration: A visually appealing graphic representing the feature.

* Feature Headline: A concise title for the feature (e.g., "Collaborate Effortlessly," "Track Your Progress").

* Description: A short, benefit-oriented paragraph explaining the value.

* Progress Indicator: Small dots at the bottom to show the current slide position and total number of slides.

* Navigation Buttons: "Next" button to advance slides, "Skip" button to bypass the showcase and proceed to account creation.

  • Functionality:

* Swipe gestures (left/right) to navigate between slides.

* Tapping "Next" advances to the subsequent slide.

* Tapping "Skip" or "Done" (on the last slide) proceeds to Screen 3.

* Tapping progress dots allows direct navigation to a specific slide.

  • Interaction: Smooth horizontal transitions between slides.

Screen 3: Account Creation / Login

  • Purpose: Allow new users to create an account or existing users to log in.
  • Content:

* Toggle/Tabs: Clearly labeled "Sign Up" and "Log In" options.

* Sign Up Form:

* Email Address input field.

* Password input field (with "Show/Hide" toggle).

* (Optional) Confirm Password input field.

* (Optional) Name input field.

* "Sign Up" primary button.

* Log In Form:

* Email Address input field.

* Password input field (with "Show/Hide" toggle).

* "Forgot Password?" link.

* "Log In" primary button.

* Social Login Options: Prominent buttons for common providers (e.g., "Continue with Google," "Continue with Apple," "Continue with Facebook").

* Legal Links: "By signing up, you agree to our [Terms of Service] and [Privacy Policy]" with clickable links.

  • Functionality:

* Form validation for email format, password strength, and matching passwords.

* Secure password handling (masking characters, show/hide).

* Integration with social login APIs.

* Error messages displayed clearly next to relevant fields.

  • Interaction: Dynamic form validation feedback, clear focus states for input fields, loading indicators for social logins.

Screen 4: Profile Personalization (Optional but Recommended)

  • Purpose: Gather initial user preferences or goals to tailor the experience and demonstrate immediate value.
  • Content:

* Headline: (e.g., "Tell us about yourself," "What are your goals?").

* Questions/Options:

* Multiple Choice: Select interests, roles, or primary use cases (e.g., "I want to...", "My role is...").

* Text Input (if applicable): Short answer for specific preferences.

* Progress Bar: Visually indicates progress through the personalization steps.

* Navigation: "Next" button, "Skip for now" option.

  • Functionality:

* Allow multi-selection or single-selection based on question type.

* Store selected preferences for future personalization.

  • Interaction: Visual feedback on selections, smooth transition to the next step.

Screen 5: Quick Tour / Contextual Feature Highlight

  • Purpose: Provide a brief, in-context introduction to the main interface or a critical feature, reducing cognitive load upon first entry.
  • Content:

* Overlay/Tooltips: Overlays on top of the main dashboard, pointing to key UI elements (e.g., navigation bar, primary CTA, profile icon).

* Short Descriptions: Concise text explaining the function of the highlighted element (e.g., "This is your main navigation," "Create new projects here").

* Navigation: "Next Tip" / "Got It" buttons.

  • Functionality:

* Highlights specific UI elements while dimming the rest of the screen.

* Allows users to dismiss the tour at any point.

  • Interaction: Gentle animations for highlighting, clear callouts.

Screen 6: First Action / Call to Value

  • Purpose: Prompt the user to perform their first meaningful action, immediately reinforcing the platform's core value.
  • Content:

* Engaging Headline: (e.g., "Let's Get Started!", "Your Journey Begins Now").

* Primary CTA: Directly related to the platform's main function (e.g., "Create Your First Project," "Explore Personalized Recommendations," "Add Your First Task").

* Secondary CTA (Optional): A less prominent action for users who prefer to browse (e.g., "Browse Templates," "View Examples").

  • Functionality:

* Tapping the primary CTA navigates directly to the relevant feature/creation flow.

  • Interaction: Clear, prominent button, leading directly to productivity.

Screen 7: Onboarding Complete / Dashboard Transition

  • Purpose: Signal the successful completion of the onboarding process and smoothly transition the user to their main dashboard.
  • Content:

* Brief Success Message: (e.g., "You're All Set!", "Welcome Aboard!").

* (Optional) Small Animation/Illustration: A celebratory visual.

* "Go to Dashboard" Button: A final CTA, though often an automatic transition after a brief pause is preferred.

  • Functionality:

* Automatic transition to the main application dashboard or home screen after a short delay (e.g., 2-3 seconds).

  • Interaction: Smooth, celebratory, and seamless.

2. Wireframe Descriptions

Below are descriptions of the general layout and key elements for each screen, focusing on structure and hierarchy.

Screen 1: Welcome & Introduction

  • Layout: Centered content, minimalist design.
  • Elements:

* Top: Brand Logo (prominent).

* Middle: Large, bold Headline. Below it, a concise Tagline/Value Statement.

* Bottom: Full-width, primary CTA button.

Screen 2: Value Proposition Showcase

  • Layout: Carousel-style, full-screen cards.
  • Elements:

* Top: Optional "Skip" button (top right).

* Middle (main content area): Large Illustration/Icon, Feature Headline (bold), Description text.

* Bottom: Progress Indicator (dots), "Next" button (bottom right, or full-width).

Screen 3: Account Creation / Login

  • Layout: Standard form layout, potentially with a header.
  • Elements:

* Top: "Sign Up" / "Log In" toggle or tabs.

* Middle: Input fields (Email, Password, etc.) stacked vertically. "Forgot Password?" link below password field.

* Below forms: Primary "Sign Up" / "Log In" button.

* Below primary button: "OR" separator, followed by Social Login buttons (e.g., Google, Apple).

* Bottom: Small text with legal links (Terms of Service, Privacy Policy).

Screen 4: Profile Personalization

  • Layout: Question-and-answer format, with clear options.
  • Elements:

* Top: Progress Bar.

* Middle: Headline (the question), followed by a list of selectable options (buttons, checkboxes, or radio buttons).

* Bottom: "Skip for now" link (bottom left), "Next" button (bottom right, or full-width).

Screen 5: Quick Tour / Contextual Feature Highlight

  • Layout: Overlay on top of the actual application UI.
  • Elements:

* Main UI: Dimmed background.

* Highlighted Area: A specific UI element (e.g., a button, a navigation item) with a glowing border or clear focus.

* Tooltip/Callout Box: Adjacent to the highlighted element, containing a short description and "Next Tip" / "Got It" button.

Screen 6: First Action / Call to Value

  • Layout: Centered content, clear hierarchy for CTAs.
  • Elements:

* Top: Engaging Headline.

* Middle: Primary CTA button (large, prominent).

* Bottom: Secondary CTA (smaller, less prominent text link or ghost button).

Screen 7: Onboarding Complete / Dashboard Transition

  • Layout: Minimalist, celebratory.
  • Elements:

* Middle: Brief Success Message (e.g., "You're All Set!").

* (Optional) Small celebratory illustration/animation.

* (Optional) "Go to Dashboard" button (if not an automatic transition).


3. Color Palettes

A cohesive color palette is crucial for brand recognition and a pleasant user experience.

Primary Palette

  • Purpose: Dominant brand color, used for primary CTAs, active states, and key branding elements.
  • Colors:

* Primary Blue: #007AFF (e.g., for main buttons, active tabs, progress bars)

* Primary Blue (Darker): #005BCC (e.g., hover/pressed states)

Secondary Palette

  • Purpose: Supporting color, used for secondary CTAs, background elements, or to differentiate sections.
  • Colors:

* Secondary Green: #34C759 (e.g., for success messages, secondary CTAs, positive indicators)

* Secondary Green (Darker): #2DA84B (e.g., hover/pressed states)

Accent Palette

  • Purpose: Used sparingly for highlights, alerts, notifications, or interactive elements that need to stand out.
  • Colors:

* Accent Orange: #FF9500 (e.g., warnings, important highlights)

* Accent Red: #FF3B30 (e.g., error messages, destructive actions)

Neutral Palette

gemini Output

Finalized Design Assets for User Onboarding Flow

This document provides comprehensive, detailed, and actionable design specifications for the "User Onboarding Flow." It encompasses wireframe descriptions, a defined color palette, typography guidelines, and key UX recommendations to ensure a professional, engaging, and effective onboarding experience for your users.


1. Overview of the User Onboarding Flow

The goal of this onboarding flow is to smoothly guide new users from initial sign-up to successfully performing their first key action within the application. The flow is designed to be intuitive, informative, and engaging, minimizing friction and maximizing user retention.

Key Stages of the Onboarding Flow:

  1. Welcome & Value Proposition: Introduce the core benefit and set expectations.
  2. Account Creation/Login: Secure and straightforward access.
  3. Personalization & Preferences: Tailor the experience to the user's needs.
  4. Quick Feature Tour (Optional/Contextual): Highlight critical functionalities.
  5. First Action Guidance: Lead the user to achieve their initial success.
  6. Onboarding Completion: Seamless transition to the main application dashboard.

2. Design Specifications & Asset Requirements

This section details the visual assets and UI components required for the onboarding flow.

2.1. Illustrations & Graphics

  • Purpose: To enhance visual appeal, communicate concepts clearly, and create an engaging, friendly atmosphere.
  • Style: Modern, clean, flat or semi-flat design with subtle gradients or textures. Consistent brand illustration style.
  • Specific Assets:

* Welcome Screen Illustration: A large, inviting illustration representing the core value proposition (e.g., productivity, connection, creativity).

* Personalization Screen Illustrations: Smaller, thematic illustrations for each preference category (e.g., a gear for settings, a lightbulb for interests).

* Feature Tour Icons/Illustrations: Distinctive icons or mini-illustrations for each key feature highlighted.

* Success/Completion Illustration: A celebratory illustration for the final onboarding step.

* Empty State Illustrations: For sections users might encounter before adding content, reinforcing the call to action.

2.2. Icons

  • Purpose: To provide clear visual cues for actions, navigation, and status.
  • Style: Line-art or solid, consistent stroke weight and corner radius.
  • Specific Assets:

* Navigation arrows (back, next)

* Checkmarks for completion

* Close/Exit icon

* Question mark/Info icon

* Social media login icons (Google, Apple, etc.)

* Password visibility toggle icon (eye)

* Progress indicator icons (e.g., circles, dots)

2.3. Typography

  • Primary Font (Headings & Key Information):

* Font Family: Montserrat (or similar modern sans-serif like Poppins, Inter)

* Usage: H1, H2, H3, prominent calls-to-action.

* Weights: Bold (700), Semi-Bold (600), Medium (500)

  • Secondary Font (Body Text & UI Elements):

* Font Family: Open Sans (or similar readable sans-serif like Lato, Roboto)

* Usage: Paragraphs, labels, input fields, small text.

* Weights: Regular (400), Semi-Bold (600)

  • Font Sizes (Responsive):

* H1: 32-48px (Desktop), 28-36px (Mobile)

* H2: 24-36px (Desktop), 20-28px (Mobile)

* H3: 18-24px (Desktop), 16-20px (Mobile)

* Body Text: 16-18px (Desktop), 14-16px (Mobile)

* Small Text/Labels: 12-14px

2.4. UI Components

  • Buttons:

* Primary CTA Button: Solid fill with primary brand color, white text. Rounded corners.

* Secondary Button: Outline with primary brand color, primary brand color text. Rounded corners.

* Ghost/Text Button: Text-only, often for "Skip" or "Back" actions.

  • Input Fields:

* Style: Clean, minimal design with a subtle border. Clear focus state (e.g., border color changes to accent color).

* States: Default, Focus, Error (red border/text), Disabled.

* Elements: Labels, placeholder text, optional helper text.

  • Progress Indicators:

* Type: Dot indicators for multi-step flows, or a progress bar for longer processes.

* Style: Active dots/segments in accent color, inactive in light grey.

  • Modals/Dialogs: For confirmations or optional information.
  • Checkboxes/Radio Buttons: Consistent styling with brand colors.

3. Wireframe Descriptions for Key Onboarding Screens

Below are detailed descriptions for the core screens within the onboarding flow.

3.1. Screen 1: Welcome & Value Proposition

  • Layout: Centered content with a prominent hero illustration.
  • Elements:

* Hero Illustration: Large, engaging illustration conveying the core benefit.

* Headline (H1): "Welcome to [Your App Name]!" or a compelling value statement (e.g., "Unlock Your Full Potential").

* Sub-headline (Body Text): 1-2 sentences explaining what the user can achieve.

* Primary CTA Button: "Get Started" / "Create Account"

* Secondary Link/Button: "Log In" (for existing users).

* Progress Indicator: (Optional, if this is considered step 1 of a multi-step process for account creation).

3.2. Screen 2: Account Creation / Sign-Up

  • Layout: Clean, focused form.
  • Elements:

* Headline (H2): "Create Your Account"

* Input Fields:

* Email Address

* Password (with password visibility toggle)

* Confirm Password (if required)

* Optional: Name (first, last)

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

* Primary CTA Button: "Sign Up" / "Continue"

* Social Login Options: Buttons for "Continue with Google," "Continue with Apple," etc.

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

* Progress Indicator: Visual representation (e.g., "Step 1 of 4").

* Back Button: For navigation.

3.3. Screen 3: Personalization & Preferences

  • Layout: Card-based or list-based selection, allowing users to choose interests or roles.
  • Elements:

* Headline (H2): "Tell us about yourself" / "What brings you here?" / "Customize Your Experience"

* Sub-headline (Body Text): Explain the benefit of personalization (e.g., "This helps us tailor your content and recommendations.").

* Selection Options:

* Cards or checkboxes/radio buttons for categories (e.g., "Designer," "Developer," "Writer," "Student").

* Text input for specific preferences (e.g., "What's your primary goal?").

* Primary CTA Button: "Continue" / "Save Preferences"

* Ghost/Text Button: "Skip for now"

* Progress Indicator: Updating to reflect current step.

* Back Button: For navigation.

3.4. Screen 4: Quick Feature Tour / "A Glimpse Inside"

  • Layout: Carousel or step-by-step modal.
  • Elements (per slide/step):

* Feature Illustration/Icon: Visual representation of the feature.

* Headline (H3): Short, descriptive title of the feature (e.g., "Organize Your Projects").

* Body Text: 1-2 sentences explaining the benefit and how to use it.

* Navigation: "Next" button, "Back" button, dot indicators for carousel.

* Ghost/Text Button: "Skip Tour" or "End Tour" (on the last slide).

* Progress Indicator: Showing progress through the tour.

3.5. Screen 5: First Action Guidance / "Your First Step"

  • Layout: Focused screen guiding the user to perform a critical initial action.
  • Elements:

* Headline (H2): "Let's Create Your First [Item]" (e.g., "Let's Create Your First Project").

Body Text: Explain why* this action is important for their success.

* Input Field/Action Prompt: Directly integrate the UI for the first action (e.g., "Project Name" input field, "Add Task" button).

* Primary CTA Button: "Create [Item]" / "Get Started"

* Ghost/Text Button: "Skip for now" (with a gentle warning that they can do it later).

* Progress Indicator: Final step.

3.6. Screen 6: Onboarding Completion & Dashboard Access

  • Layout: Celebratory, full-screen confirmation.
  • Elements:

* Celebratory Illustration: A positive, affirming graphic.

* Headline (H1): "You're All Set!" / "Welcome Aboard!"

* Sub-headline (Body Text): A brief message confirming completion and perhaps a small congratulatory note.

* Primary CTA Button: "Go to Dashboard" / "Start Using [App Name]"

* Optional: Small text link to "Explore Features" or "Watch a Quick Tutorial."


4. Color Palette

A consistent color palette ensures brand recognition and a professional aesthetic.

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

Usage:* Primary call-to-action buttons, active states, key brand elements, headings.

  • Secondary Brand Color: HEX: #50E3C2 (A refreshing, complementary teal/mint)

Usage:* Accent elements, secondary buttons, highlights, illustrations.

  • Accent Color (for highlights/attention): HEX: #F5A623 (A warm, inviting orange)

Usage:* Small notifications, progress indicators, interactive elements needing attention.

  • Neutral Colors:

* Dark Text: HEX: #333333 (For primary body text, ensures readability)

* Light Grey Text/Placeholder: HEX: #9B9B9B (For secondary text, labels, inactive states)

* Background Grey: HEX: #F8F8F8 (For subtle background variations, card backgrounds)

* White: HEX: #FFFFFF (Primary background, card backgrounds, text on primary buttons)

* Border/Divider Grey: HEX: #E0E0E0 (For input field borders, dividers)

  • Semantic Colors:

* Success: HEX: #7ED321 (Green for successful actions)

* Error: HEX: #D0021B (Red for error messages, invalid inputs)

* Warning: HEX: #FFC107 (Amber for warnings)

* Info: HEX: #2196F3 (Blue for informational messages)


5. User Experience (UX) Recommendations

These recommendations are crucial for creating a truly effective and enjoyable onboarding experience.

  1. Clear Value Proposition: Every screen should reinforce why the user is going through the process and the benefit they will gain.
  2. Progress Indication: Implement clear visual progress indicators (e.g., "Step X of Y," dot indicators, progress bars) to manage expectations and provide a sense of accomplishment.
  3. Minimalist Forms: Only ask for essential information. Break down complex forms into multiple, manageable steps.
  4. Actionable Language: Use direct, action-oriented language for headings, body text, and button labels.
  5. "Skip" Options (Strategic): Provide "Skip for now" options for non-critical steps (like personalization or feature tours) to allow users to get to the core product faster. However, ensure the benefits of completing the step are clear.
  6. Contextual Help & Tooltips: Offer brief, optional explanations for complex fields or concepts without cluttering the main UI.
  7. Positive Reinforcement: Use celebratory messages and animations upon completing significant steps or the entire flow.
  8. Error Prevention & Handling:

* Validate inputs in real-time where possible.

* Provide clear, concise error messages that explain the problem and suggest a solution.

* Highlight invalid fields distinctly (e.g., red border).

  1. Mobile-First / Responsive Design: Ensure the entire onboarding flow is fully optimized and delightful on all screen sizes (mobile, tablet, desktop).
  2. Accessibility:

* Ensure sufficient color contrast for all text and UI elements.

* Provide clear focus states for keyboard navigation.

* Use semantic HTML and ARIA attributes for screen reader compatibility.

* Include alt text for all meaningful images and illustrations.

  1. Micro-interactions: Implement subtle animations for button clicks, form field interactions, or progress updates to provide immediate feedback and enhance engagement.
  2. Personalization Benefits: Clearly articulate how user input during personalization will directly improve their experience within the app.
  3. Seamless Transition: The final step of the onboarding should smoothly transition the user into the main application dashboard, ideally with a welcoming "empty state" or a quick start guide.

This detailed design specification provides a robust foundation for developing an exceptional user onboarding experience. Consistent application of these guidelines will ensure a cohesive, branded, and highly effective flow for your users.

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

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

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

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

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

"+title+"

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

$1

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

$1

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

$1

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

"); h+="

"+hc+"

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