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

This document outlines the comprehensive design requirements for the "User Onboarding Flow." The goal is to create an intuitive, engaging, and efficient experience that guides new users seamlessly through the initial setup, highlights core value, and encourages early engagement with the product. This deliverable includes detailed design specifications, wireframe descriptions for each stage, a proposed color palette, and key UX recommendations to ensure a successful user journey.


1. Core Principles for Onboarding Design

Our onboarding experience will be guided by the following principles:

  • Clarity & Simplicity: Minimize cognitive load, use clear, concise language, and intuitive interactions.
  • Value-Driven: Quickly communicate the core benefits and the "why" behind using the product.
  • Progressive Disclosure: Introduce information
gemini Output

Project: User Onboarding Flow - Design Specifications

Step 2 of 3: geminicreate_design_specs

Date: October 26, 2023

Prepared For: Customer Deliverable

Prepared By: PantheraHive AI Assistant


Executive Summary

This document outlines the comprehensive design specifications for the "User Onboarding Flow." The goal is to create an intuitive, engaging, and efficient onboarding experience that seamlessly guides new users through initial setup, highlights core value propositions, and ultimately drives successful product adoption. We have focused on a clean, modern aesthetic combined with best-in-class UX principles to ensure a delightful first interaction. This deliverable includes detailed wireframe descriptions, visual design guidelines (color palette, typography, iconography), and critical UX recommendations to ensure a robust and user-centric solution.


1. Onboarding Flow Objectives & Principles

1.1. Core Objectives

  • Reduce Time-to-Value: Help users quickly understand and experience the primary benefits of the product.
  • Increase Activation Rate: Guide users through critical setup steps essential for ongoing engagement.
  • Enhance User Satisfaction: Create a positive and welcoming first impression.
  • Gather Essential Information: Collect necessary user preferences and data for personalization without overwhelming the user.
  • Minimize Drop-off: Design a streamlined and motivating flow to prevent users from abandoning the process.

1.2. Guiding UX Principles

  • Simplicity & Clarity: Each step should have a clear purpose and minimal cognitive load.
  • Progressive Disclosure: Introduce information and features gradually, only when relevant.
  • Feedback & Guidance: Provide clear visual and textual feedback on user actions and progress.
  • Personalization: Offer opportunities to tailor the experience to individual user needs and goals.
  • Delight & Engagement: Incorporate subtle animations, engaging copy, and a visually appealing design to make the process enjoyable.
  • Accessibility: Ensure the design is usable by individuals with diverse abilities.

2. Detailed User Journey & Wireframe Specifications

The onboarding flow is structured into a series of logical steps, each with specific objectives and design considerations.

2.1. Welcome Screen

  • Objective: Greet the user, set a positive tone, and provide a clear call to action to begin the onboarding process.
  • Wireframe Description:

* Layout: Centered content with ample white space.

* Header: Prominent product logo.

Headline (H1): "Welcome to [Product Name]!" or "Get Started with [Product Name]." (e.g., Welcome to PantheraHive!*)

Sub-headline (H2/Body): A concise, benefit-driven statement about the product's core value. (e.g., Your ultimate platform for seamless workflows and collaboration.*)

* Hero Image/Illustration: A high-quality, relevant graphic that visually represents the product's purpose or user benefit. Should be modern and inviting.

Primary Call-to-Action (CTA) Button: "Get Started" or "Begin Setup." (e.g., Get Started*) - Prominent, full-width or centered.

* Secondary CTA/Link (Optional): "Learn More" or "Sign In" (for existing users). - Less prominent, text link or ghost button.

* Progress Indicator: (Optional) A subtle dot indicator at the bottom if this is considered step 0 of N.

  • Content Considerations: Friendly, inviting tone. Focus on immediate value.
  • Interaction: Clicking "Get Started" transitions to the Account Creation/Login screen.

2.2. Account Creation / Login

  • Objective: Allow new users to create an account or existing users to log in.
  • Wireframe Description:

* Layout: Split layout or stacked forms, prioritizing clarity.

* Header: Product logo and a clear title (e.g., "Create Your Account" / "Sign In").

* Account Creation Form (for new users):

* Input fields: Full Name, Email Address, Password (with "Show/Hide" toggle), Confirm Password.

* Password requirements hint (e.g., "Must be 8 characters, 1 uppercase, 1 number").

* "I agree to the Terms of Service and Privacy Policy" checkbox with links.

* Primary CTA Button: "Create Account."

* Social Login Options: Prominent buttons for "Continue with Google," "Continue with Apple," etc., if applicable. Separated by a "or" divider.

* Login Form (for existing users):

* Link: "Already have an account? Sign In." (Clicking this reveals the login form or navigates to a dedicated login page).

* Input fields: Email Address, Password.

* "Forgot Password?" link.

* Primary CTA Button: "Log In."

* Progress Indicator: Clear indication (e.g., "Step 1 of 4").

* Back Button: Present to allow users to return to the Welcome Screen.

  • Content Considerations: Clear error messages for invalid inputs (e.g., "Email already registered," "Passwords do not match").
  • Interaction: Form validation on submission. Successful creation/login proceeds to the Profile Setup screen.

2.3. Profile Setup / Personalization

  • Objective: Gather essential information to personalize the user's experience and tailor initial content. This should be optional where possible.
  • Wireframe Description (Example: "Tell us about your goals"):

* Layout: Card-based or multi-select options.

* Header: Product logo and a clear question (e.g., "What brings you to [Product Name]?" or "Tell us about your goals.").

* Instructional Text: Briefly explain why this information is being collected (e.g., "This helps us tailor your experience.").

* Selection Options:

* Multiple choice questions with checkboxes or radio buttons, allowing users to select their primary purpose, industry, role, or interests.

* Each option should have a concise label and potentially a small icon for visual appeal.

* Example options: "Boost productivity," "Improve team collaboration," "Manage projects efficiently," "Learn new skills."

* "Other" Input Field (Optional): If users can specify something not listed.

* Primary CTA Button: "Continue."

* Secondary CTA/Link: "Skip for now" (prominently visible but less emphasized than "Continue").

* Progress Indicator: "Step 2 of 4."

* Back Button: To return to Account Creation/Login.

  • Content Considerations: Keep options concise and relevant. Explain the benefit of providing information.
  • Interaction: Selecting options updates internal user profile data. "Continue" proceeds; "Skip for now" proceeds without data.

2.4. Key Feature Introduction / Value Proposition (Product Tour Snippet)

  • Objective: Briefly highlight 1-2 core features or benefits to reinforce the product's value and guide initial interaction.
  • Wireframe Description (Example: "Discover Key Features"):

* Layout: Full-screen carousel/slideshow or a single impactful screen.

* Header: Product logo and a title (e.g., "Unlock Your Potential" or "Quick Tour").

* Feature Card/Slide 1:

* Headline: "Seamless Project Management."

* Body Text: "Organize tasks, track progress, and collaborate effortlessly with your team."

* Image/Animation: A short GIF or screenshot demonstrating the feature.

* Feature Card/Slide 2 (if carousel):

* Headline: "AI-Powered Insights."

* Body Text: "Get intelligent recommendations and automate repetitive tasks to save time."

* Image/Animation: Visual of AI functionality.

* Navigation (if carousel): Dot indicators at the bottom for multiple slides, with "Next" and "Back" buttons or swipe gestures.

* Primary CTA Button: "Continue" or "Let's Go."

* Secondary CTA/Link: "Skip Tour."

* Progress Indicator: "Step 3 of 4."

* Back Button: To return to Profile Setup.

  • Content Considerations: Short, impactful descriptions. Use active voice.
  • Interaction: Users can navigate through slides or skip the tour. "Continue" proceeds to the final step.

2.5. Final Confirmation / Dashboard Access

  • Objective: Provide a sense of completion and seamlessly transition the user to their personalized dashboard or the main application.
  • Wireframe Description:

* Layout: Centered content, celebratory feel.

* Header: Product logo.

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

Body Text: A congratulatory message, potentially summarizing what they've done or what awaits them. (e.g., Your journey with PantheraHive begins now. We've tailored your experience based on your preferences.*)

* Illustration/Animation: A celebratory graphic or a subtle animation (e.g., confetti).

* Primary CTA Button: "Go to Dashboard" or "Start Using [Product Name]."

* Optional Secondary Element: A small "Pro Tip" or a link to a quick start guide/tutorial.

* No Progress Indicator or Back Button: This is the final step.

  • Content Considerations: Positive, encouraging, and clear call to action to proceed to the main product.
  • Interaction: Clicking the CTA navigates the user to their main application dashboard.

3. Visual Design Specifications

3.1. Color Palette

A modern, professional, and accessible color palette that reflects trust, innovation, and user-friendliness.

  • Primary Brand Color (Accent): #007AFF (Blue)

* Usage: Primary CTAs, active states, key highlights, progress indicators.

* Rationale: Represents reliability, professionalism, and freshness.

  • Secondary Brand Color (Complementary): #34C759 (Green)

* Usage: Success messages, positive feedback, secondary CTAs (less emphasis).

* Rationale: Evokes growth, success, and positive affirmation.

  • Neutral Colors (Text & Backgrounds):

* Dark Grey (Text): #1C1C1E

* Usage: Headings, primary body text.

* Rationale: High contrast for readability.

* Medium Grey (Secondary Text): #8E8E93

* Usage: Sub-text, placeholder text, disabled states, borders.

* Rationale: Provides visual hierarchy without being too distracting.

* Light Grey (Background/Dividers): #F2F2F7

* Usage: Section backgrounds, separators, subtle shadows.

* Rationale: Provides depth and structure without being harsh.

* White: #FFFFFF

* Usage: Card backgrounds, primary content areas.

* Rationale: Clean, spacious, and ensures content stands out.

  • Alert/Error Color: #FF3B30 (Red)

* Usage: Error messages, destructive actions.

* Rationale: Clearly indicates issues or warnings.

3.2. Typography

Clean, readable, and modern sans-serif fonts to ensure clarity across all devices.

  • Primary Font Family: Inter (or SF Pro Display for Apple devices, Roboto for Android)

* Rationale: Highly legible, versatile, and optimized for screens.

  • Headings (H1, H2, H3):

* Font-weight: Semibold (600) to Bold (700)

* H1 (Welcome/Completion): 32px - 40px (responsive)

* H2 (Section Titles): 24px - 28px

* H3 (Sub-sections): 18px - 20px

* Color: #1C1C1E

  • Body Text:

* Font-size: 16px - 18px

* Font-weight: Regular (400)

* Color: #1C1C1E

  • Secondary Text / Captions:

* Font-size: 12px - 14px

* Font-weight: Regular (400)

* Color: #8E8E93

  • Buttons & CTAs:

* Font-size: 16px - 18px

* Font-weight: Semibold (600)

* Color: #FFFFFF (on primary brand color background)

3.3. Iconography

  • Style: Line icons or filled icons with a consistent, minimalist aesthetic.
  • Purpose: To visually reinforce meaning, guide user attention, and add visual interest without clutter.
  • Examples: Checkmarks for success, arrows for navigation, user silhouette for profile, gear for settings.
  • Color: Primarily #8E8E93 for inactive/neutral, changing to #007AFF for active/selected states.

3.4. Imagery & Illustrations

  • Style: Modern, vector-based illustrations or high-quality, relevant photography.
  • Purpose: Enhance visual appeal, convey abstract concepts, and create an emotional connection.
  • Consistency: Maintain a consistent style throughout the onboarding flow and the product itself.
  • Examples: Abstract shapes, friendly character illustrations, or clean product screenshots demonstrating features.

4. User Experience (UX) Recommendations

4.1. Progress Indication

  • Visual Element: Use a clear, persistent progress bar or step-by-step indicators (e.g., "Step 1 of 4") at the top or bottom of each screen.
  • Feedback: Animate the progress bar or highlight the current step as the user advances.
  • Clarity: Ensure the total number of steps is clear from the outset to manage user expectations.

4.2. Personalization & Customization

  • Conditional Logic: Based on user input in the "Profile Setup" step,
gemini Output

Finalized Design Assets: User Onboarding Flow

This document outlines the comprehensive and finalized design specifications for the User Onboarding Flow. It includes detailed wireframe descriptions, visual design elements (color palettes, typography, iconography), and critical UX recommendations to ensure a seamless, engaging, and effective first-time user experience. This deliverable is ready for development and implementation.


1. Introduction

The User Onboarding Flow is a critical sequence designed to introduce new users to the core value proposition of our platform, facilitate account creation, gather essential preferences, and guide them towards their first successful interaction. The goal is to maximize user activation, reduce churn, and set a positive tone for their entire journey with our product. This document provides all necessary assets and specifications for its implementation.


2. Overall Design Principles

The onboarding experience is built upon the following core design principles:

  • Clarity & Simplicity: Each step has a singular focus, with clear instructions and minimal cognitive load.
  • Engagement & Delight: Incorporate subtle animations, engaging copy, and a visually appealing interface to create a positive first impression.
  • Progress & Feedback: Users should always know where they are in the process and receive immediate feedback on their actions.
  • Personalization: Allow users to tailor their experience where appropriate, making the platform immediately relevant.
  • Action-Oriented: Guide users towards taking meaningful first actions within the product.
  • Accessibility: Design for all users, ensuring readability, navigability, and compatibility with assistive technologies.

3. Color Palette

Our color palette is chosen to convey professionalism, trust, and a modern aesthetic, while maintaining brand consistency.

  • Primary Brand Color: #007AFF (e.g., for main CTAs, active states, progress indicators)

Usage:* Key interactive elements, brand highlights.

  • Secondary Accent Color: #34C759 (e.g., for success messages, secondary CTAs)

Usage:* Positive feedback, alternative actions.

  • Neutral / Background Color: #F8F8F8 (e.g., for screen backgrounds)

Usage:* Default background for most screens.

  • Card / Surface Color: #FFFFFF (e.g., for content cards, modals)

Usage:* Elements that need to stand out from the background.

  • Primary Text Color: #1C1C1E (e.g., for main headings, body text)

Usage:* Most prominent text.

  • Secondary Text Color: #6C6C6C (e.g., for subheadings, helper text, inactive states)

Usage:* Less prominent text, contextual information.

  • Border / Divider Color: #E0E0E0 (e.g., for input field borders, separators)

Usage:* Structural separation.

  • Error Color: #FF3B30 (e.g., for validation errors, destructive actions)

Usage:* Negative feedback, warning states.


4. Typography

The chosen typography aims for readability, hierarchy, and a modern feel.

  • Font Family: Inter (or a suitable system fallback like SF Pro Display, Roboto, Arial)

Rationale:* Modern, highly legible, optimized for screen use.

  • Headings (H1 - Page Titles):

* font-size: 32px;

* font-weight: 700; (Bold)

* color: #1C1C1E;

* line-height: 1.2;

  • Subheadings (H2 - Section Titles):

* font-size: 24px;

* font-weight: 600; (Semi-Bold)

* color: #1C1C1E;

* line-height: 1.3;

  • Body Text (P - Paragraphs, Descriptions):

* font-size: 16px;

* font-weight: 400; (Regular)

* color: #1C1C1E;

* line-height: 1.5;

  • Small Text (Helper Text, Captions):

* font-size: 14px;

* font-weight: 400; (Regular)

* color: #6C6C6C;

* line-height: 1.4;

  • Button Text:

* font-size: 16px;

* font-weight: 600; (Semi-Bold)

* color: #FFFFFF; (for primary buttons)

* line-height: 1;


5. Iconography

Icons are used to visually communicate concepts, enhance navigability, and reduce cognitive load.

  • Style: Line icons with a consistent stroke weight (e.g., 2px). Filled icons can be used for active states or specific brand elements.
  • Source: Font Awesome (Pro), Material Icons, or custom SVG set.
  • Color: Typically currentColor to inherit text color, or #6C6C6C for secondary elements, and #007AFF for interactive or primary elements.
  • Size: Standard sizes include 20px, 24px, 32px depending on context.

6. Component Specifications

6.1. Buttons

  • Primary Button:

* background-color: #007AFF;

* color: #FFFFFF;

* border-radius: 8px;

* padding: 12px 24px;

* font-weight: 600;

Hover State:* background-color: #0056B3; (darker shade)

Active State:* background-color: #003F80; (even darker)

Disabled State:* background-color: #E0E0E0; color: #6C6C6C; cursor: not-allowed;

  • Secondary Button (Outline):

* background-color: transparent;

* color: #007AFF;

* border: 1px solid #007AFF;

* border-radius: 8px;

* padding: 12px 24px;

* font-weight: 600;

Hover State:* background-color: #F0F8FF; (light blue tint)

Active State:* background-color: #E0F0FF;

  • Text Link Button:

* color: #007AFF;

* text-decoration: none;

* font-weight: 500;

Hover State:* text-decoration: underline;

6.2. Input Fields

  • Default State:

* background-color: #FFFFFF;

* border: 1px solid #E0E0E0;

* border-radius: 8px;

* padding: 12px 16px;

* color: #1C1C1E;

* font-size: 16px;

* placeholder-color: #A0A0A0;

  • Focus State:

* border: 1px solid #007AFF;

* box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);

  • Error State:

* border: 1px solid #FF3B30;

* box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.2);

Helper text below:* font-size: 14px; color: #FF3B30;

6.3. Progress Indicator

  • Type: Linear steps indicator (e.g., "Step 1 of 5").
  • Visual: A series of dots or a progress bar.

Active Step:* background-color: #007AFF; (for dot/segment)

Completed Step:* background-color: #E0E0E0; with a checkmark icon, or a darker shade of primary color.

Inactive Step:* background-color: #E0E0E0;

  • Text: "Step X of Y" or "X% Complete" below the visual indicator.

* color: #6C6C6C; font-size: 14px;


7. Wireframe Descriptions & Detailed Design Specifications (Screen-by-Screen)

7.1. Screen 1: Welcome & Introduction

  • Wireframe Description:

* Full-screen background image or subtle gradient.

* Large, engaging headline in the center.

* Concise sub-headline explaining the app's core purpose.

* Primary "Get Started" button at the bottom.

* Secondary "Sign In" link for existing users, positioned subtly below the primary button.

* Optional: Logo at the top center.

  • Detailed Design Specifications:

* Headline (H1): "Welcome to [Your App Name]!"

* font-size: 48px; font-weight: 700; color: #1C1C1E; text-align: center;

* Sub-headline (P): "Your ultimate tool for [core value proposition]."

* font-size: 20px; font-weight: 400; color: #6C6C6C; text-align: center; max-width: 600px; margin: 20px auto;

* "Get Started" Button: Primary button style (#007AFF).

* "Sign In" Link: Text link button style (#007AFF).

* Animation: Subtle fade-in for all elements on screen load.

  • UX Recommendations:

* Keep copy minimal and impactful.

* Ensure the background image is high-quality and relevant, but doesn't distract from text.

* Make the "Sign In" option visible but not competing with the primary CTA.

7.2. Screen 2: Value Proposition & Key Features (Onboarding Carousel/Slides)

  • Wireframe Description:

* A series of 2-3 screens, each highlighting a key benefit or feature.

* Each screen features:

* Prominent illustration or animation (left/right aligned or centered).

* H2-level feature title.

* Short paragraph describing the benefit.

* Navigation dots/progress indicator at the bottom.

* "Next" button (primary) and "Skip" or "Previous" button/link.

  • Detailed Design Specifications:

* Illustration/Animation: Custom vector illustrations or Lottie animations, visually representing the feature.

Example 1:* Collaboration (people working together).

Example 2:* Task Management (checklist, progress bar).

Example 3:* Data Visualization (charts, graphs).

* Feature Title (H2): "Seamless Collaboration," "Boost Your Productivity," "Gain Actionable Insights."

* font-size: 28px; font-weight: 600; color: #1C1C1E; text-align: center;

* Feature Description (P): "Work together effortlessly with real-time updates and shared workspaces."

* font-size: 16px; font-weight: 400; color: #6C6C6C; text-align: center; max-width: 500px; margin: 15px auto;

* Progress Indicator: Dot-based, using specified colors for active/inactive states.

* "Next" Button: Primary button style. Changes to "Continue" on the last slide.

* "Skip" Link: Text link button style, positioned top-right or bottom-left.

  • UX Recommendations:

* Limit to 3-4 slides to avoid fatigue.

* Use clear, benefit-oriented language.

* Ensure illustrations are distinct and convey the message quickly.

* Provide a clear "Skip" option for users who want to jump straight in.

* Consider swipe gestures for navigation on mobile.

7.3. Screen 3: Account Creation / Sign-Up

  • Wireframe Description:

* Form-based screen for user registration.

* Progress indicator at the top.

* H2-level title: "Create Your Account."

* Input fields for: Email, Password, Confirm Password.

* Optional: "Sign up with Google/Apple" social login buttons.

* Checkbox for "I agree to the Terms of Service & Privacy Policy" (with links).

* Primary "Create Account" button.

* "Already have an account? Sign In" link.

  • Detailed Design Specifications:

* Title (H2): "Create Your Account"

* Input Fields: Standard input field style.

* label: "Email Address," "Password," "Confirm Password."

* type: email, password.

Password Requirements:* Displayed as helper text (e.g., "Min 8 characters, 1 uppercase, 1 number").

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