Interactive Quiz Builder
Run ID: 69cb1da361b1021a29a85fcf2026-03-31Education
PantheraHive BOS
BOS Dashboard

Interactive Quiz Builder: Research & Design Requirements - Step 1/3

This document outlines the initial research and design requirements for the "Interactive Quiz Builder" based on your request. This deliverable serves as a foundational blueprint, detailing core functionalities, user experience principles, visual design specifications, and preliminary wireframe concepts.


1. Project Overview & Objectives

Project Title: Interactive Quiz Builder

Description: A web-based application enabling users to effortlessly create, manage, and deploy engaging interactive quizzes.

Core Objective: To provide an intuitive and robust platform for users to design custom quizzes with various question types, settings, and immediate feedback mechanisms.


2. Detailed Design Specifications (Core Functionality)

The Interactive Quiz Builder will empower users with a comprehensive set of tools to craft their quizzes.

2.1. Quiz Creation Workflow

The process of building a quiz will be guided and intuitive:

  • Quiz Title & Description: Mandatory fields for identification and context.
  • Question Management:

* Add New Question: Clearly visible button to initiate question creation.

* Edit/Delete Question: Icon-based actions for managing existing questions.

* Reorder Questions: Drag-and-drop functionality for logical flow.

  • Quiz Settings Configuration: Dedicated section for global quiz parameters.
  • Preview: Real-time view of how the quiz will appear to takers.
  • Save/Publish: Distinct actions for saving progress and making the quiz live.

2.2. Supported Question Types

To ensure versatility, the builder will support the following question types:

  • Multiple Choice (Single Select):

* User inputs question text.

* User adds 2-6 answer options.

* User selects one correct answer from the options.

* Optional: Provide specific feedback for correct/incorrect choices.

  • Multiple Choice (Multi-Select):

* User inputs question text.

* User adds 2-6 answer options.

* User selects one or more correct answers from the options.

* Optional: Provide specific feedback for correct/incorrect choices.

  • True/False:

* User inputs statement text.

* User selects "True" or "False" as the correct answer.

* Optional: Provide specific feedback for correct/incorrect choices.

  • Short Answer / Fill-in-the-Blank:

* User inputs question text (potentially with placeholder for blank).

* User inputs one or more acceptable correct text answers (case-insensitive option).

* Optional: Provide specific feedback for correct/incorrect choices.

2.3. Quiz Settings & Customization

Users will have granular control over quiz behavior:

  • Scoring:

* Points per question (default: 1 point, customizable).

* Display total score at the end.

  • Timing:

* Optional overall quiz timer (e.g., 5 minutes).

* Display timer countdown during the quiz.

  • Display Options:

* Shuffle questions (randomize order for each attempt).

* Shuffle answer options (for multiple choice questions).

* Show correct answers immediately after each question or at the end.

  • Attempt Management:

* Allow multiple attempts (with optional delay).

* Limit number of attempts.

  • Feedback:

* General feedback message upon quiz completion.

* Specific feedback for each question's correct/incorrect answer (if configured).

  • Visibility:

* Public (accessible via direct link).

Private (requires login or specific access code - future enhancement*).

2.4. Quiz Management & Sharing

  • Dashboard: A centralized view of all created quizzes (Draft, Published).
  • Edit Quiz: Re-enter the builder to modify content or settings.
  • Delete Quiz: Permanent removal with confirmation prompt.
  • Duplicate Quiz: Create a copy for quick variations.
  • Share Quiz: Generate a unique, shareable URL for published quizzes.

3. User Experience (UX) Recommendations

The user experience will prioritize ease of use, clarity, and engagement.

3.1. Intuitive & Guided Workflow

  • Step-by-Step Creation: Clearly delineate stages of quiz creation (e.g., "Quiz Details," "Add Questions," "Settings," "Publish").
  • Visual Cues: Use icons, progress bars, and color coding to guide users.
  • Inline Editing: Allow direct editing of question text and options where possible.

3.2. Clear Feedback & Validation

  • Real-time Validation: Instant feedback on form inputs (e.g., required fields, character limits).
  • Success Messages: Clear notifications for saving, publishing, or other successful actions.
  • Error Handling: User-friendly error messages with actionable advice.
  • Confirmation Prompts: For destructive actions (e.g., deleting a quiz/question).

3.3. Responsive Design

  • Mobile-First Approach: Ensure the builder and the quizzes themselves are fully functional and aesthetically pleasing on various screen sizes (desktop, tablet, mobile).
  • Flexible Layouts: Utilize responsive grid systems and fluid components.

3.4. Accessibility Considerations (WCAG 2.1 AA)

  • Color Contrast: Adhere to minimum contrast ratios for text and interactive elements.
  • Keyboard Navigation: All interactive elements should be reachable and operable via keyboard.
  • Semantic HTML: Use appropriate HTML tags for structure and meaning.
  • ARIA Attributes: Implement ARIA roles and labels where necessary for screen reader users.

3.5. Engaging & Modern Interface

  • Smooth Transitions: Subtle animations for adding/removing elements, page transitions.
  • Consistent UI Elements: Maintain uniformity in buttons, forms, and navigation.
  • Minimizing Cognitive Load: Avoid clutter, use whitespace effectively, and present information in digestible chunks.

4. Wireframe Descriptions (Conceptual Layouts)

These descriptions outline the key sections and interactions for primary screens.

4.1. Dashboard / My Quizzes

  • Header: Logo, User Profile/Account, "Create New Quiz" prominent button.
  • Main Content:

* Filter/Sort options (e.g., by date, status, title).

* List of quizzes, each displayed as a card or row.

* Quiz Card/Row Elements: Quiz Title, Status (Draft/Published), Date Created/Last Edited, Actions (Edit, Preview, Share Link, Delete, Duplicate).

  • Empty State: Clear message and call-to-action to "Create Your First Quiz."

4.2. Quiz Editor (Main Creation Interface)

  • Top Bar: Quiz Title (editable), "Save Draft" button, "Preview" button, "Publish" button.
  • Left Sidebar / Tabs:

* "Questions" Tab: List of added questions (expandable/collapsible), "Add New Question" button. Each question has reorder handles, edit, and delete icons.

* "Settings" Tab: Form fields for Quiz Settings (Scoring, Timing, Display Options, Attempts, Feedback).

  • Main Content Area (Question Editor):

* Active Question Card:

* Question Type Selector (Dropdown/Buttons: Multiple Choice, True/False, Short Answer).

* Text area for Question Text.

* For Multiple Choice: Input fields for options, radio buttons/checkboxes to select correct answer(s). "Add Option" button.

* For True/False: Radio buttons for True/False, select correct.

* For Short Answer: Input field(s) for correct answer(s).

* Optional: Feedback text areas (for correct/incorrect responses).

* "Save Question" / "Cancel" buttons for individual question editing.

4.3. Quiz Taker View (Preview & Live Quiz)

  • Header: Quiz Title, (Optional) Timer countdown.
  • Main Content:

* Current Question number (e.g., "Question 3 of 10").

* Question Text.

* Answer Input Area (radio buttons, checkboxes, text input field based on question type).

* "Next Question" / "Submit" button.

  • End of Quiz:

* "Quiz Completed!" message.

* Score display (e.g., "You scored 8/10 points!").

* Optional: Review answers (showing correct/incorrect and specific feedback).

* "Try Again" / "View Dashboard" buttons.


5. Color Palette

A professional, clean, and engaging color palette will be used to enhance usability and brand identity.

  • Primary Brand Color (Accent): #007BFF (Vibrant Blue - professional, trustworthy, signals interaction)

* Used for primary buttons, active states, key highlights.

  • Secondary Color: #6C757D (Medium Grey - subtle, complementary)

* Used for secondary buttons, less critical text, borders.

  • Success Color: #28A745 (Green - positive feedback, completion)

* Used for success messages, correct answers.

  • Warning Color: #FFC107 (Amber - caution, pending actions)

* Used for warning messages, pending states.

  • Danger/Error Color: #DC3545 (Red - critical actions, incorrect answers)

* Used for error messages, delete actions, incorrect answers.

  • Neutral Backgrounds:

* #FFFFFF (Pure White - main content areas, forms)

* #F8F9FA (Light Grey - subtle section backgrounds, card backgrounds)

  • Text Colors:

* #212529 (Dark Grey - primary body text, headings for readability)

* #495057 (Medium Dark Grey - secondary text, labels)

Accessibility Note: All color combinations will be checked against WCAG 2.1 AA standards for contrast ratios.


6. Typography

Typography choices will prioritize readability, clarity, and a modern aesthetic.

  • Primary Font Family (Headings & UI Elements): 'Inter', sans-serif

* Modern, clean, highly readable, and widely available.

* Used for all major headings (H1, H2, H3), button text, and important UI labels.

  • Secondary Font Family (Body Text & Longer Content): 'Roboto', sans-serif

* Also highly readable, pairs well with Inter, and provides a slightly softer feel for longer paragraphs.

* Used for question descriptions, answer options, feedback text, and general body content.

Font Size Hierarchy (Examples - will be refined with specific pixel/rem values):

  • H1 (Quiz Title): Large and prominent (e.g., 2.5rem / 40px)
  • H2 (Section Titles): Substantial (e.g., 2rem / 32px)
  • H3 (Question Text): Clear and readable (e.g., 1.5rem / 24px)
  • Body Text (Options, Descriptions): Standard readable size (e.g., 1rem / 16px)
  • Small Text (Labels, Hints): Slightly smaller (e.g., 0.875rem / 14px)

7. Iconography

  • Style: Clean, line-art or subtly filled icons will be used to maintain a modern and professional appearance.
  • Purpose: Icons will enhance visual communication for actions (e.g., Edit, Delete, Save, Publish, Add, Reorder), navigation, and status indicators.
  • Library: A consistent icon library (e.g., Font Awesome, Material Icons) will be utilized to ensure uniformity.

8. Next Steps

This detailed requirements and design specification document provides a solid foundation. The subsequent steps in this workflow will involve:

  • Step 2: UI Mockups & Prototyping: Translating these wireframe descriptions and design specifications into high-fidelity visual mockups and interactive prototypes. This will allow for early user testing and refinement of the interface.
  • Step 3: Technical Architecture & Development Planning: Defining the technical stack, database schema, API design, and a phased development roadmap.

We are confident that this approach will lead to a highly effective and user-friendly Interactive Quiz Builder.

gemini Output

Design Specifications for Interactive Quiz Builder

This document outlines the detailed design specifications for the "Interactive Quiz Builder," focusing on functionality, user experience, visual aesthetics, and technical considerations. The goal is to create an intuitive, powerful, and engaging platform for users to create and manage interactive quizzes.


1. Detailed Design Specifications

1.1 Core Functionality & Features

The Interactive Quiz Builder will empower users to create, manage, and share quizzes with a comprehensive set of features:

  • User Authentication & Authorization:

* Secure user registration (email/password, social logins - optional for v1).

* Login/Logout functionality.

* Password recovery.

* User profile management.

  • Quiz Management Dashboard:

* Overview of all created quizzes (list/grid view).

* Ability to search, filter, and sort quizzes (e.g., by date, status, topic, difficulty).

* Quick actions: Edit, Preview, Publish/Unpublish, Share, Duplicate, Delete.

* Display key metrics per quiz: number of questions, status (Draft/Published), last modified date.

  • Quiz Creation & Editing Workflow:

* Quiz Details:

* Title: Clear, concise name for the quiz.

* Description: Detailed explanation of the quiz content and purpose.

* Topic/Category: Predefined or user-defined tags for organization (e.g., "History," "Science," "General Knowledge").

* Difficulty Level: (e.g., Easy, Medium, Hard, Custom).

* Thumbnail/Cover Image: Option to upload an image for visual appeal in the dashboard and sharing.

* Question Editor:

* Multiple Question Types:

* Multiple Choice (Single Answer): Question text, multiple answer options (min 2, max 6), single correct answer selection.

* Multiple Choice (Multiple Answers): Question text, multiple answer options (min 2, max 6), multiple correct answer selections.

* True/False: Question text, "True" and "False" options, single correct answer selection.

* Short Answer/Fill-in-the-Blank: Question text, single text input field for answer, option to define multiple acceptable correct answers (case-insensitive option).

(Future consideration: Image Hotspot, Ordering, Matching)*

* Question Text Editor: Rich text editor (bold, italics, lists, links) for question content.

* Media Integration:

* Option to upload images (JPEG, PNG, GIF) and embed videos (YouTube, Vimeo links) for questions and/or answer options.

* Image cropping and resizing tools.

* Answer Options Management:

* Add/Remove answer options dynamically.

* Reorder answer options (drag-and-drop).

* Feedback for correct/incorrect answers (optional text for quiz takers).

* Question Settings:

* Points awarded for correct answer.

* Explanation/Rationale for the correct answer (shown after quiz completion).

* Option to make a question optional.

* Drag-and-Drop Reordering: Ability to reorder questions within a quiz.

* Question Duplication & Deletion.

  • Quiz Settings (Advanced):

* Time Limit: Global time limit for the entire quiz (e.g., 30 minutes) or per question (optional).

* Number of Attempts: Limit how many times a user can take the quiz.

* Scoring Method: Total points, percentage.

* Pass/Fail Threshold: Define a minimum score required to pass.

* Question Randomization: Option to randomize the order of questions.

* Answer Option Randomization: Option to randomize the order of answer choices for multiple-choice questions.

* Show Results: Control when results are shown (immediately, after all attempts, never).

* Feedback Display: Control when correct answers and explanations are shown.

* Certificates: Option to generate a simple certificate on passing (future consideration).

  • Quiz Preview Functionality:

* A 'take quiz' view to simulate the end-user experience before publishing.

* Allows creators to test logic, timing, and flow.

  • Publishing & Sharing:

* Status Management: Draft, Published, Unpublished.

* Shareable Link: Unique URL for the quiz.

* Embed Code: HTML iframe code to embed the quiz on external websites.

* Social Media Sharing: Direct links to share on common platforms (Facebook, Twitter, LinkedIn).

  • Quiz Taker Experience (Implied for Preview & Testing):

* Clean, distraction-free interface.

* Progress indicator (e.g., "Question 3 of 10").

* Timer display (if applicable).

* Clear submission mechanism.

* Result display based on quiz settings.

1.2 Data Model (High-Level)

  • User: UserID, Email, PasswordHash, DisplayName, CreatedAt, LastLogin.
  • Quiz: QuizID, UserID (Creator), Title, Description, Topic, Difficulty, ThumbnailURL, Status (Draft/Published), Settings (JSON object for time limit, randomization, etc.), CreatedAt, LastModified.
  • Question: QuestionID, QuizID, Type (MCQ_Single, MCQ_Multi, TrueFalse, ShortAnswer), Text, MediaURL, Points, Explanation, OrderIndex.
  • AnswerOption: AnswerOptionID, QuestionID, Text, MediaURL, IsCorrect, Feedback, OrderIndex.
  • ShortAnswerCorrectOptions: ShortAnswerOptionID, QuestionID, CorrectText, CaseInsensitiveMatch.
  • QuizAttempt: AttemptID, QuizID, UserID (Taker), Score, StartTime, EndTime, Status (Completed/In Progress).
  • AnswerGiven: AnswerGivenID, AttemptID, QuestionID, SelectedOptionIDs (array), ShortAnswerText.

2. Wireframe Descriptions

The following descriptions outline the key screens and their primary components. These are conceptual and will be translated into visual mockups in the next design phase.

2.1 Dashboard / My Quizzes Screen

  • Header:

* Logo (Top Left)

* "Create New Quiz" button (Primary CTA, Top Right)

* User Profile/Avatar & Dropdown Menu (Top Right)

  • Main Content Area:

* Welcome Message: "Welcome, [User Name]!"

* Search Bar: For quiz titles/topics.

* Filters/Sort Options: Dropdowns for Status (All, Draft, Published), Topic, Difficulty, Last Modified.

* Quiz List/Grid:

* Each quiz displayed as a card/row.

* Card/Row Content: Quiz Title, Thumbnail (if available), Description snippet, Status tag, Number of Questions, Last Modified Date.

* Action Buttons: Edit, Preview, Share, Delete (icons or small buttons).

2.2 New Quiz / Edit Quiz (Quiz Details) Screen

  • Header:

* Logo

* "Back to My Quizzes" link/button

* "Save Draft" button, "Preview" button, "Next Step / Publish" button

  • Left Sidebar (Optional, for multi-step flow):

* "1. Quiz Details" (Active)

* "2. Add Questions"

* "3. Settings"

* "4. Publish"

  • Main Content Area:

* Section Title: "Quiz Details"

* Form Fields:

* Quiz Title: Input field (required).

* Description: Textarea (required).

* Topic/Category: Dropdown or multi-select tag input.

* Difficulty: Radio buttons or dropdown.

* Thumbnail Upload: Drag-and-drop area or file input, with preview.

* Action Buttons: "Save Draft", "Continue to Questions".

2.3 Question Editor Screen

  • Header:

* Quiz Title (e.g., "Editing: My Awesome Quiz")

* "Back to Quiz Details"

* "Save Draft", "Preview Quiz", "Publish Quiz"

  • Left Sidebar (Optional):

* List of existing questions (e.g., "Q1: What is...", "Q2: True or False...").

* "Add New Question" button.

* Drag handles for reordering.

  • Main Content Area (Question Card/Panel):

* Question Type Selector: Dropdown/radio buttons (Multiple Choice, True/False, Short Answer).

* Question Text Editor: Rich text editor, media upload button (image/video).

* Answer Options Section (Dynamically changes based on type):

* Multiple Choice: List of input fields for answer text. Checkbox/radio button next to each to mark as correct. "Add Option" button, "Remove" icon per option. Media upload per option.

* True/False: "True" and "False" options, radio button to select correct.

* Short Answer: Input field for correct answer(s), "Add another acceptable answer" button. Checkbox for "Case-insensitive".

* Feedback/Explanation Section: Textarea for correct answer explanation.

* Points Field: Numeric input.

* Action Buttons: "Save Question", "Duplicate Question", "Delete Question".

* "Add Another Question" button (at the bottom of the form).

2.4 Quiz Settings Screen

  • Header:

* Quiz Title

* "Back to Questions"

* "Save Settings", "Preview Quiz", "Publish Quiz"

  • Main Content Area:

* Section Title: "Quiz Settings"

* Toggle Switches/Checkboxes/Input Fields for:

* Time Limit (toggle + input for minutes/hours)

* Number of Attempts (toggle + input)

* Question Randomization (toggle)

* Answer Option Randomization (toggle)

* Pass/Fail Threshold (toggle + input for percentage)

* Show Results Immediately (toggle)

* Show Correct Answers After Quiz (toggle)

* Show Explanations After Quiz (toggle)

* Action Button: "Save Settings"

2.5 Quiz Preview Screen

  • Header:

* Quiz Title

* "Exit Preview" button

  • Main Content Area:

* Quiz Taker View: Displays the quiz exactly as a user would see it.

* Progress Bar/Indicator: (e.g., "Question X of Y").

* Timer: (if enabled).

* Question & Answer Layout: Interactive elements for selection/input.

* Navigation Buttons: "Next Question", "Previous Question" (if allowed), "Submit Quiz".


3. Color Palettes

To ensure a professional, engaging, and user-friendly experience, we propose the following color palette. This palette balances professionalism with approachability, ensuring good contrast and accessibility.

  • Primary Brand Color (Action & Branding):

* Hex: #007BFF (Vibrant Blue)

* Usage: Primary buttons (e.g., "Create Quiz", "Publish"), branding elements, active states, progress bars, important links.

  • Secondary Accent Color (Success & Positive Feedback):

* Hex: #28A745 (Forest Green)

* Usage: Success messages, "Correct" indicators, positive confirmations, pass status.

  • Tertiary Accent Color (Warning & Highlight):

* Hex: #FFC107 (Amber Yellow)

* Usage: Warning messages, highlights for important information, "Save Draft" buttons, input focus states.

  • Neutral Palette (Backgrounds, Text, Borders):

* Dark Text/Primary Content: #343A40 (Charcoal Grey)

* Secondary Text/Subheadings: #6C757D (Medium Grey)

* Light Backgrounds/Content Areas: #FFFFFF (White)

* Subtle Backgrounds/Dividers: #F8F9FA (Off-White/Light Grey)

* Borders/Separators: #DEE2E6 (Light Grey)

  • Error Color:

* Hex: #DC3545 (Crimson Red)

* Usage: Error messages, "Incorrect" indicators, delete actions, fail status.

Accessibility Note: All color combinations will be checked against WCAG 2.1 guidelines

gemini Output

Final Design Assets: Interactive Quiz Builder

Project: Interactive Quiz Builder

Deliverable: Final Design Assets & Specifications

Date: October 26, 2023

Prepared For: Customer


1. Introduction & Overview

This document provides the comprehensive final design specifications for the "Interactive Quiz Builder" application. Building upon the previous conceptual and functional requirements, this deliverable outlines detailed visual and user experience (UX) guidelines, including wireframe descriptions for key screens, a defined color palette, typography, iconography, and actionable UX recommendations. The goal is to ensure a consistent, intuitive, engaging, and visually appealing experience for both quiz creators and quiz takers.

The design prioritizes flexibility, allowing the quiz builder to accommodate a wide range of topics and use cases, while maintaining a user-friendly interface that simplifies the quiz creation process and enhances the quiz-taking experience.

2. Core Design Principles

The design of the Interactive Quiz Builder is guided by the following core principles:

  • User-Centric: Prioritizing the needs and goals of both quiz creators and quiz takers.
  • Intuitive & Efficient: Streamlining workflows and minimizing cognitive load for quick and easy quiz creation and completion.
  • Engaging & Dynamic: Utilizing interactive elements and visual cues to maintain user interest.
  • Clean & Modern: A contemporary aesthetic that is professional, uncluttered, and easy on the eyes.
  • Accessible: Ensuring the application is usable by individuals with diverse abilities, adhering to WCAG guidelines.
  • Scalable: A design system that can easily accommodate future features and content expansion.

3. Target Audience & Use Cases

3.1. Quiz Creators (Primary Users of the Builder)

  • Educators/Trainers: Creating assessments, learning checks, and interactive lessons.
  • Marketers/Businesses: Generating leads, conducting surveys, engaging audiences, product knowledge tests.
  • Content Creators/Bloggers: Enhancing engagement on websites, social media, or online courses.
  • HR Professionals: Onboarding quizzes, compliance training, skill assessments.
  • Individuals: Creating quizzes for personal use, entertainment, or community engagement.

Key Needs: Easy question input, multiple question types, customizable settings, clear progress tracking, robust preview, analytics.

3.2. Quiz Takers (End Users of the Quizzes)

  • Students/Learners: Testing knowledge, self-assessment, reinforcing learning.
  • Customers/Prospects: Engaging with brand content, product discovery, feedback.
  • Employees: Training completion, skill validation.
  • General Public: Entertainment, knowledge testing.

Key Needs: Clear questions, intuitive navigation, immediate feedback, engaging interface, accessible on various devices.

4. Detailed Design Specifications

4.1. Wireframe Descriptions (Key Screens)

The following descriptions outline the structure and key elements for critical screens. These are conceptual blueprints for development.

A. Creator Dashboard / Quiz List Screen

  • Header:

* Application Logo (Top Left)

* "Create New Quiz" Button (Primary CTA, Top Right)

* User Profile/Settings Icon (Top Right)

  • Main Content Area:

* Search Bar: For filtering quizzes by name, topic, or status.

* Filter/Sort Options: Dropdowns for "Status (Draft, Published, Archived)", "Topic", "Date Created", "Last Modified".

* Quiz List Table/Cards:

* Each row/card represents a quiz.

* Quiz Title: Prominently displayed.

* Status Indicator: (e.g., "Draft", "Published", "Archived").

* Topic/Category: If assigned.

* Number of Questions: Quick overview.

* Number of Attempts/Participants: Analytics snippet.

* Last Modified Date:

* Action Buttons (Hover/Ellipsis Menu): "Edit", "Preview", "Publish/Unpublish", "Share Link", "View Analytics", "Duplicate", "Archive", "Delete".

  • Empty State: A friendly message and a prominent "Create Your First Quiz" button if no quizzes exist.

B. Quiz Editor Screen (Question Builder & Settings)

  • Header:

* Application Logo

* "Quiz Title" (Editable)

* "Save Draft" button (Secondary)

* "Preview" button (Secondary)

* "Publish" button (Primary CTA)

* "Back to Dashboard" link/icon.

  • Left Sidebar (Navigation/Settings):

* Quiz Details: Title, Description, Thumbnail Image upload, Topic/Category selector.

* Questions: List of questions with drag-and-drop reordering. Each item shows question number and type (e.g., "1. Multiple Choice"). "Add New Question" button at the bottom.

* Settings:

* General: Timer (On/Off, Duration), Shuffling Questions/Answers, Attempts Allowed, Pass Mark (%), Score Display.

* Appearance: Theme selection, Custom branding (logo, background image).

* Results: Custom success/failure messages, Certificate generation (toggle).

* Sharing: Embed code, Direct link, Social media share options.

  • Main Content Area (Question Editor):

* Question Type Selector: Dropdown/buttons (e.g., Multiple Choice, True/False, Short Answer, Matching, Image Hotspot).

* Question Input Field: Rich text editor for question text (bold, italics, links, images, video embeds).

* Answer Options Section (Dynamically based on question type):

* Multiple Choice: Input fields for options, radio buttons/checkboxes to mark correct answers. "Add Option" button. "Remove Option" button.

* True/False: Toggle switch for correct answer.

* Short Answer: Input field for correct answer(s) (with options for case sensitivity).

* Matching: Two columns of input fields for items and their matches, with drag-and-drop reordering.

* Feedback Section (Optional): Input fields for "Correct Answer Feedback" and "Incorrect Answer Feedback."

* Points/Weighting: Numeric input field for question value.

* Media Upload: Option to add images/videos specific to the question.

* "Delete Question" Button.

C. Quiz Preview Screen (Creator)

  • Header: "Preview Mode" banner, "Exit Preview" button.
  • Simulated Quiz Taker Experience:

* Displays the quiz exactly as a taker would see it.

* Includes navigation (Next/Previous), timer (if enabled), progress bar.

* Allows the creator to test all questions and their logic.

D. Quiz Landing Page (Taker)

  • Header: Optional branding/logo.
  • Main Content:

* Quiz Title: Prominently displayed.

* Quiz Description: Engaging text about the quiz.

* Thumbnail Image/Video: Visually appealing.

* Key Information: Number of questions, Estimated time, Topic, Attempts remaining (if applicable).

* "Start Quiz" Button (Primary CTA).

* Optional: "Login to save progress" (if user accounts are supported).

E. Quiz Question Screen (Taker)

  • Header:

* Quiz Title (Smaller)

* Progress Indicator (e.g., "Question 3 of 10" or a progress bar).

* Timer (if enabled, counting down).

  • Main Content:

* Question Number.

* Question Text: Clear and readable, including any embedded media.

* Answer Options (Dynamically based on question type):

* Multiple Choice: Radio buttons (single choice) or checkboxes (multiple choice).

* True/False: Toggle switch or two distinct buttons.

* Short Answer: Text input field.

* Matching: Drag-and-drop interface or dropdown selectors.

* Navigation Buttons: "Previous" (if allowed), "Next Question" (Primary CTA), "Submit Quiz" (on last question).

* Optional: "Skip Question" button.

F. Quiz Results Screen (Taker)

  • Header: Optional branding/logo.
  • Main Content:

* Overall Score: (e.g., "You scored 8/10", "80%")

* Pass/Fail Status: Clear indicator (e.g., "Congratulations! You Passed!" or "Better Luck Next Time!").

* Custom Message: Based on pass/fail (configured by creator).

* Breakdown (Optional):

* Summary: Correct answers, Incorrect answers, Skipped.

* Question-by-Question Review: List of questions, user's answer, correct answer, feedback (if provided).

* Action Buttons: "Retake Quiz" (if allowed), "Share Score", "Download Certificate" (if applicable), "View Explanations".

4.2. Color Palette

A modern, accessible, and versatile color palette is crucial for a professional look and feel.

  • Primary Brand Color (Accent/Action): #007BFF (Vibrant Blue) - Used for primary CTAs, active states, progress indicators.

Alternative/Darker Shade:* #0056B3

Lighter Shade:* #E6F2FF (for backgrounds, highlights)

  • Secondary Brand Color (Complementary/Emphasis): #28A745 (Success Green) - Used for success messages, correct answers, positive feedback.

Alternative/Darker Shade:* #1E7E34

  • Neutral Palette (Text, Backgrounds, Borders):

* Dark Text/Heading: #343A40 (Charcoal Grey)

* Body Text: #495057 (Dark Grey)

* Light Grey (Borders, Dividers): #CED4DA

* Lighter Grey (Subtle Backgrounds): #F8F9FA

* White (Main Backgrounds, Cards): #FFFFFF

  • Feedback & Alert Colors:

* Error/Danger: #DC3545 (Red) - For incorrect answers, error messages, delete actions.

* Warning: #FFC107 (Amber) - For warnings, attention required.

* Info: #17A2B8 (Cyan) - For informational messages.

Color Usage Guidelines:

  • Maintain a minimum contrast ratio of 4.5:1 for text and interactive elements against their background to ensure WCAG AA compliance.
  • Use the primary brand color sparingly for emphasis and key actions, not for large blocks of text or background.
  • Utilize the neutral palette for most UI elements to ensure readability and a clean aesthetic.

4.3. Typography

A clear and consistent typographic hierarchy is essential for readability and information organization.

  • Primary Font Family (Headings & UI): Poppins (Sans-serif) - Modern, clean, and highly readable.

Usage:* All headings (H1-H6), button text, navigation labels.

  • Secondary Font Family (Body Text & Long Reads): Open Sans (Sans-serif) - Excellent legibility for longer paragraphs.

Usage:* Paragraphs, descriptions, quiz questions, answer options, feedback.

  • Monospace Font (Code/Technical Snippets - if applicable): Fira Code or Roboto Mono

Font Sizes & Weights (Example Scale - Responsive adjustments will be made):

  • H1 (Page Title): 36px / Poppins / Semi-Bold (600) / #343A40
  • H2 (Section Title): 28px / Poppins / Medium (500) / #343A40
  • H3 (Card Title/Quiz Title): 22px / Poppins / Medium (500) / #343A40
  • H4 (Sub-Section Title): 18px / Poppins / Regular (400) / #343A40
  • Body Text Large: 16px / Open Sans / Regular (400) / #495057
  • Body Text Standard: 14px / Open Sans / Regular (400) / #495057
  • Small Text/Captions: 12px / Open Sans / Regular (400) / #495057
  • Button Text: 16px / Poppins / Semi-Bold (600) / #FFFFFF (for primary), #007BFF (for secondary)

Line Height: Generally 1.5 for body text for optimal readability.

4.4. Iconography

  • Style: Line-based, minimalist, consistent stroke weight. Filled icons can be used for active states or primary actions.
  • Library: Font Awesome, Material Icons, or a custom set. Consistency is key.
  • Examples of common icons:

* Creator: + (Add), Edit (Pencil), Delete (Trash), Preview (Eye), Settings (Cog), Share (Share icon), Analytics (Bar Chart), Drag Handle (Six dots).

* Taker: Next (Right Arrow), Previous (Left Arrow), Timer (Clock), Correct (Checkmark), Incorrect (X-mark), Info (i in a circle).

4.5. Imagery & Illustrations

  • Style: Clean, modern, potentially flat or semi-flat vector illustrations. Avoid overly complex or realistic imagery unless specifically uploaded by the user.
  • Purpose: Enhance user engagement, provide visual cues, break up text, illustrate concepts (e.g., empty states, onboarding).
  • Consistency: If custom illustrations are used, maintain a consistent style throughout the application.
  • User Uploads: Ensure clear guidelines and tools for image cropping, resizing, and optimization for user-uploaded quiz thumbnails and question media.

4.6. Interactive Elements & Components

  • Buttons:

* Primary: Solid background (#007BFF), white text, slightly rounded corners. Hover state: darker background (#0056B3).

* Secondary: Outlined (#007BFF border, white background), #007BFF text. Hover state: light blue background (#E6F2FF).

* Danger: Solid red (#DC3545), white text.

* Text Buttons: For less prominent actions.

  • Input Fields:
interactive_quiz_builder.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);}});}