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

Interactive Quiz Builder: Design Requirements and Specifications

This document outlines the detailed design requirements, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Interactive Quiz Builder" platform. This foundational research ensures a robust, intuitive, and engaging product for quiz creators and takers alike.


1. Detailed Design Specifications

1.1. Core Functional Requirements

The platform will provide comprehensive features for creating, managing, and taking interactive quizzes.

A. Quiz Creator Module:

  • User Authentication & Authorization:

* Secure user registration, login (email/password, social login options like Google, Facebook).

* Password recovery and account management.

* Role-based access (e.g., Creator, Admin - for future scalability).

  • Quiz Creation & Editing:

* Basic Info: Define quiz title, description, topic/category tags, and an optional cover image.

* Question Types: Support for:

* Multiple Choice (Single Answer): Select one correct option.

* Multiple Choice (Multiple Answers): Select all applicable correct options.

* True/False: Binary choice.

* Short Answer/Text Input: User types a response; creator defines one or more correct answers (with optional case-insensitivity or partial matching).

* Question Content:

* Rich text editor for question text.

* Ability to embed images, GIFs, and videos into questions.

* Ability to add an explanation/feedback for each question (shown after answer submission).

* Answer Options:

* For MCQs/TFs: Rich text editor for answer options, ability to mark correct answer(s).

* Ability to embed images/media within answer options (e.g., "Which image shows X?").

* Points & Weighting: Assign points value per question.

* Question Bank/Library (Future): Ability to save questions for reuse across multiple quizzes.

* Reordering: Drag-and-drop functionality to reorder questions within a quiz.

* Drafting & Publishing: Save quizzes as drafts, publish when ready.

  • Quiz Settings:

* Access Control: Public (shareable via link), Private (requires invite/password), or Restricted (only for registered users).

* Time Limits: Set overall quiz time limits (e.g., 30 minutes).

* Attempts: Configure number of allowed attempts per user.

* Feedback:

* Immediate Feedback: Show correct/incorrect status and explanation after each question.

* End-of-Quiz Feedback: Show results and explanations only after quiz completion.

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

* Randomization: Option to randomize question order and/or answer option order.

  • Quiz Management Dashboard:

* List of all created quizzes with status (draft, published).

* Search, filter, and sort functionality.

* Actions: Edit, Duplicate, Delete, View Analytics, Share.

  • Analytics & Reporting:

* Overall quiz performance (average score, completion rate, number of attempts).

* Per-question analysis (e.g., percentage of users who answered correctly).

* List of individual attempts with scores and completion times.

* Export results (CSV, PDF).

  • Sharing:

* Generate shareable links.

* Embed code for websites/blogs.

B. Quiz Taker Module:

  • Quiz Discovery: Access quizzes via direct link, embed, or internal directory (if applicable).
  • Pre-Quiz Info: Display quiz title, description, number of questions, estimated time, and any specific instructions.
  • Interactive Quiz Interface:

* Clear display of question text and media.

* Intuitive selection for answer options (radio buttons, checkboxes, text input).

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

* Timer display (if applicable).

* Navigation buttons (Previous, Next, Submit).

* Ability to review answers before final submission (optional).

  • Results & Feedback:

* Instant score display upon completion.

* Summary of correct/incorrect answers.

* Detailed feedback for each question (if configured), showing correct answer and explanation.

* Pass/Fail status.

* Option to retake the quiz (if allowed).

1.2. Non-Functional Requirements

  • Performance:

* Fast loading times for all pages and interactive elements.

* Responsive interactions with minimal latency.

* Efficient handling of concurrent users during quiz taking.

  • Scalability:

* Architecture designed to support a growing number of users, quizzes, and questions without performance degradation.

* Ability to easily add new features and question types.

  • Security:

* Industry-standard authentication and authorization (e.g., OAuth2, JWT).

* Data encryption (in transit and at rest).

* Protection against common web vulnerabilities (XSS, CSRF, SQL injection).

* Regular security audits.

  • Accessibility (WCAG 2.1 AA Compliance):

* Keyboard navigation for all interactive elements.

* Screen reader compatibility (semantic HTML, ARIA attributes).

* Sufficient color contrast ratios.

* Clear focus indicators.

  • Responsiveness:

* Optimized user experience across various devices: desktop, tablet, and mobile.

* Fluid layouts and adaptive components.

  • Usability:

* Intuitive user interface and workflow.

* Clear error messages and guidance.

* Consistent design language.

  • Maintainability:

* Clean, modular, and well-documented codebase.

* Automated testing for core functionalities.

1.3. High-Level Data Model

  • User: id, email, password_hash, username, created_at, updated_at
  • Quiz: id, creator_id (FK to User), title, description, topic, status (draft, published), settings (JSONB for time_limit, attempts, feedback_type, etc.), cover_image_url, created_at, updated_at
  • Question: id, quiz_id (FK to Quiz), type (mcq_single, mcq_multiple, true_false, short_answer), text, media_url, points, order_index, explanation_text, created_at, updated_at
  • AnswerOption: id, question_id (FK to Question), text, is_correct (boolean), media_url, order_index (for MCQs/TFs)
  • ShortAnswerMatch: id, question_id (FK to Question), correct_answer_text, case_sensitive (boolean), partial_match_allowed (boolean)
  • QuizAttempt: id, user_id (FK to User, can be NULL for anonymous), quiz_id (FK to Quiz), started_at, completed_at, score, status (in_progress, completed), time_taken_seconds
  • AttemptAnswer: id, quiz_attempt_id (FK to QuizAttempt), question_id (FK to Question), selected_option_ids (array of FK to AnswerOption for MCQs), submitted_text (for Short Answer), is_correct (boolean, calculated), points_earned

2. Wireframe Descriptions

The following descriptions outline the key screens and their primary components, providing a blueprint for the user interface.

2.1. Quiz Creator Dashboard

  • Layout:

* Header: Logo, User Profile/Account menu, "Create New Quiz" button.

* Sidebar (Optional): Navigation to "My Quizzes", "Analytics", "Settings".

* Main Content Area:

* Title: "My Quizzes".

* Search & Filter Bar: Input field for quiz titles, dropdowns for topic, status (Draft, Published).

* Quiz List: A grid or list view of created quizzes. Each card/row includes:

* Quiz Title

* Description/Topic

* Status (Draft/Published)

* Number of Questions

* Last Modified Date

* Performance Snapshot (e.g., "Avg. Score: 75%")

* Action Buttons: "Edit", "View Analytics", "Share", "Delete" (with confirmation).

* Pagination: For navigating through multiple pages of quizzes.

2.2. Quiz Editor (Question Builder)

  • Layout:

* Header: Logo, Quiz Title (editable), "Save Draft", "Publish Quiz" buttons, "Preview" button.

* Left Sidebar (Quiz Structure):

* Quiz Info Panel: Editable fields for Title, Description, Topic, Cover Image.

* Quiz Settings Panel: Toggles/inputs for Time Limit, Attempts, Feedback Type, Pass/Fail Threshold, Randomization.

* Question List (Navigable): A numbered list of questions, each showing a snippet of the question text. Click to jump to question editor. Drag-and-drop handles for reordering. "Add New Question" button at the bottom.

* Main Content Area (Question Editor):

* Question Type Selector: Radio buttons/dropdown for "Multiple Choice (Single)", "Multiple Choice (Multiple)", "True/False", "Short Answer".

* Question Text Input: Rich text editor for the question body.

* Media Uploader: Button to "Add Image/Video" for the question.

* Points Input: Numeric input for points awarded for the question.

* Answer Section (dynamically changes based on question type):

* MCQ/TF: List of answer options. Each option has:

* Rich text input for option text.

* Checkbox/radio button to mark as correct.

* Optional media upload for the option.

* "Add Option" and "Remove Option" buttons.

* Short Answer:

* Input field(s) for "Correct Answer(s)".

* Checkboxes for "Case Sensitive" and "Partial Match Allowed".

* Explanation/Feedback Input: Rich text editor for optional feedback shown to the user.

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

2.3. Quiz Taker (Question View)

  • Layout:

* Header: Logo, Quiz Title, Progress Indicator (e.g., "Question 5 of 12"), Timer (if active).

* Main Content Area:

* Question Number: Clearly displayed.

* Question Text & Media: Large, legible display of the question and any associated images/videos.

* Answer Options/Input:

* MCQ/TF: Clearly spaced radio buttons or checkboxes with answer text/media.

* Short Answer: Text input field.

* Navigation Buttons: "Previous Question", "Next Question" (or "Submit Answer" if immediate feedback).

*

gemini Output

Step 2 of 3: Design Specifications for Interactive Quiz Builder

This document outlines the comprehensive design specifications for the "Interactive Quiz Builder" application, providing a detailed blueprint for its visual and interactive elements. These specifications aim to create an intuitive, engaging, and highly functional platform for users to create, manage, and deploy interactive quizzes.


1. Introduction & Design Goals

The "Interactive Quiz Builder" is designed to empower users to effortlessly create dynamic and engaging quizzes for various purposes, including education, marketing, training, and entertainment. This document details the visual and interactive design elements, ensuring a consistent, user-friendly, and aesthetically pleasing experience.

Core Design Goals:

  • Intuitive Usability: Simplify the quiz creation process with clear navigation and logical workflows.
  • Visual Engagement: Employ a modern, clean, and appealing aesthetic that encourages creativity.
  • Flexibility & Customization: Provide robust options for question types, settings, and branding.
  • Responsiveness: Ensure a seamless experience across all devices (desktop, tablet, mobile).
  • Actionability: Design elements to guide users through the building process effectively and efficiently.

2. Target Audience

The primary target audience includes:

  • Educators & Trainers: Seeking to create interactive learning assessments.
  • Marketers & Businesses: Aiming to generate leads, gather feedback, or engage audiences.
  • Content Creators: Looking to add interactive elements to blogs, websites, or social media.
  • Individuals: For personal projects, fun quizzes, or informal assessments.

The design will cater to users with varying levels of technical proficiency, prioritizing clarity and ease of use.


3. Core Functionalities (Context for Design)

While the focus is on design, understanding the core functionalities helps frame the design choices:

  • Quiz Creation & Editing: Add questions, answers, media, and customize settings.
  • Multiple Question Types: Support for various formats (Multiple Choice, True/False, Short Answer, Image Select, etc.).
  • Quiz Settings: Configure scoring, timers, feedback, attempts, and access controls.
  • Media Integration: Easily embed images, videos, and audio.
  • Preview & Test: Ability to preview the quiz from a participant's perspective.
  • Publish & Share: Options to embed, link, or share quizzes.
  • Analytics & Reporting: View results and performance data (future enhancement, but design should allow for this).

4. Detailed Design Specifications

4.1. Wireframe Descriptions (Key Screens)

Here are detailed descriptions for the primary screens of the Interactive Quiz Builder.

A. Dashboard / "My Quizzes" Screen

  • Purpose: Central hub for users to manage existing quizzes and create new ones.
  • Layout:

* Header: Fixed navigation bar at the top, including:

* Logo: Prominently displayed on the left.

* Main Navigation: "Dashboard," "Create New Quiz," "Help," "Account/Profile."

* User Avatar/Name: On the right, for quick access to settings/logout.

* Main Content Area:

* "Create New Quiz" Button: Large, prominent primary call-to-action (CTA) button, possibly centered or aligned top-left.

* Quiz List/Cards: A grid or list view displaying existing quizzes. Each card/row will include:

* Quiz Title

* Creation Date / Last Modified Date

* Status (Draft, Published, Archived)

* Number of Questions

* Number of Participants / Submissions (if applicable)

* Action Buttons (Icon-based): Edit, Preview, Share/Publish, Duplicate, Delete.

* Search/Filter Bar: Above the quiz list, allowing users to find quizzes by title, status, or date.

  • Interaction: Clicking "Create New Quiz" navigates to the Quiz Editor. Clicking a quiz card/row's "Edit" icon opens that quiz in the editor.

B. Quiz Editor Screen (Main)

  • Purpose: The primary interface for building and customizing a quiz.
  • Layout:

* Header: Consistent with the dashboard, but may include "Save," "Preview," and "Publish" buttons on the right.

* Left Sidebar (Navigation):

* Quiz Sections: "Questions," "Settings," "Branding," "Results." (Clicking these updates the main content area).

* Question List (within "Questions" section): A collapsible/expandable list of questions within the current quiz, allowing for quick navigation between questions. Each item shows question number and type.

* Main Content Area (Contextual):

* Quiz Title & Description Editor: A prominent field for the quiz title and a rich-text editor for the description.

* "Add New Question" Button: Large, clear CTA to add a new question, leading to a question type selection modal.

* Question Card/Block: Each question is presented as an editable block.

* Question Text Input: Rich-text editor field.

* Media Uploader: Icon/button to add images, videos, or audio related to the question.

* Answer Options: Depending on question type (e.g., radio buttons for MCQs, checkboxes for multiple select, text input for short answer). Each option has an input field and an indicator for the correct answer.

* Feedback Fields: Optional fields for correct/incorrect answer feedback.

* Question Settings: Points value, required/optional, time limit (per question).

* Action Icons: Duplicate, Delete, Reorder (drag-and-drop handles).

* Right Sidebar (Optional / Contextual Settings Panel):

* Could be used for quick access to quiz-level settings (e.g., general styling, default points per question) or contextual help.

  • Interaction: Drag-and-drop to reorder questions. In-line editing for all fields. Modals for media upload and advanced settings.

C. Question Type Selection Modal

  • Purpose: Allows users to choose the type of question they want to add.
  • Layout:

* Modal Overlay: Appears centered on the screen, blurring the background.

* Title: "Choose Question Type."

* Grid of Question Types: Visually distinct cards or buttons for each question type (e.g., Multiple Choice, True/False, Short Answer, Image Select, Rating Scale, Open Text).

* Each card includes an icon and the question type name.

* A brief description of the question type might appear on hover.

* "Cancel" Button: To close the modal without adding a question.

  • Interaction: Clicking a question type card adds a new question of that type to the editor and closes the modal.

D. Quiz Settings Screen (within Editor)

  • Purpose: Configure global quiz parameters.
  • Layout:

* Tabbed or Accordion Interface: Sections for different categories of settings (e.g., "General," "Scoring," "Timing," "Access & Sharing," "Feedback").

* Form Elements:

* Toggle Switches: For enabling/disabling features (e.g., "Show correct answers immediately," "Allow multiple attempts").

* Input Fields: For numeric values (e.g., "Quiz duration (minutes)"), text inputs for custom messages.

* Dropdowns: For selection of options (e.g., "Scoring method: Points / Percentage").

* Radio Buttons: For mutually exclusive choices.

* Save Button: To apply changes to settings.

  • Interaction: Real-time updates where possible, clear validation messages.

4.2. Color Palettes

We propose a modern, clean, and inviting color palette to ensure a pleasant user experience.

Palette Name: "Interactive Horizon"

  • Primary Brand Color (Action/Accent): #007BFF (Vibrant Blue)

Usage:* Primary CTA buttons ("Create New Quiz," "Save," "Publish"), active navigation states, key interactive elements, progress bars.

Psychology:* Trust, reliability, professionalism, innovation, clarity.

  • Secondary Accent Color (Highlight/Success): #28A745 (Emerald Green)

Usage:* Success messages, correct answer indicators, "Published" status, positive feedback.

Psychology:* Growth, success, freshness, balance.

  • Neutral Base Colors (Backgrounds/Text):

* Background: #F8F9FA (Light Gray/Off-White)

Usage:* Main content area backgrounds, card backgrounds.

Psychology:* Cleanliness, spaciousness, neutrality.

* Text - Dark: #343A40 (Dark Charcoal)

Usage:* Primary text, headings, labels.

Psychology:* Readability, sophistication.

* Text - Medium: #6C757D (Medium Gray)

Usage:* Secondary text, descriptions, inactive states.

* Borders/Dividers: #DEE2E6 (Light Border Gray)

Usage:* Separators, input field borders, card outlines.

  • Warning/Error Color: #DC3545 (Crimson Red)

Usage:* Error messages, incorrect answer indicators, "Delete" buttons, validation errors.

Psychology:* Urgency, warning, stop, attention.

Accessibility Note: Ensure sufficient contrast ratio (WCAG 2.1 AA standard) between text and background colors.

4.3. Typography

  • Primary Font Family: Inter (or similar modern sans-serif like Roboto, Open Sans).

Why:* Highly readable, clean, and professional across various screen sizes and resolutions. Excellent for both headings and body text.

  • Font Sizes (Responsive Scale):

* Headings (H1): 2.5rem - 3rem (e.g., Quiz Title on editor)

* Headings (H2): 2rem - 2.5rem (e.g., Section titles)

* Headings (H3): 1.5rem - 1.75rem (e.g., Question titles)

* Body Text: 1rem - 1.125rem (for readability)

* Small Text/Captions: 0.875rem - 0.9rem

  • Font Weights:

* Light/Regular: For body text and descriptions.

* Medium/Semi-Bold: For secondary headings, labels, and emphasis.

* Bold: For primary headings, CTAs, and strong emphasis.

  • Line Height: 1.5 - 1.6 for body text to improve readability.

4.4. Iconography

  • Style: Flat or subtly outlined, consistent, and recognizable.
  • Icon Library: Recommend using a well-established library like Font Awesome, Material Icons, or custom SVG icons.
  • Examples:

* Create New: plus-circle, add

* Edit: pencil, edit

* Preview: eye, visibility

* Share: share-alt, share

* Delete: trash, delete

* Settings: cog, settings

* Save: save, disk

* Question Types: list-ul (MCQ), check-square (True/False), text-fields (Short Answer), image (Image Select).

4.5. Imagery & Media

  • Illustrations: Use modern, flat, or isometric illustrations for empty states, onboarding, and feature explanations to add visual appeal and clarity.
  • User-Uploaded Media: Provide clear guidelines for image/video sizes and formats. Implement robust upload tools with progress indicators and error handling.
  • Placeholders: Use generic, visually appealing placeholders for images/videos that haven't been uploaded yet.

5. User Experience (UX) Recommendations

  • Progressive Disclosure: Only show information or options when the user needs them. For example, advanced quiz settings can be hidden behind an expandable section or a dedicated tab.
  • Direct Manipulation: Allow users to drag-and-drop questions to reorder them, and use in-line editing for question text and answers.
  • Instant Feedback: Provide immediate visual feedback for user actions (e.g., a "Saved" notification after changes, visual cues for correct/incorrect answers in preview mode).
  • Undo/Redo Functionality: Essential for a builder tool to mitigate accidental changes.
  • Clear Call-to-Actions (CTAs): Use distinct colors, sizes, and microcopy for primary actions (e.g., "Add New Question," "Publish Quiz").
  • Guided Onboarding: For first-time users, offer a brief, interactive tour or tooltips to highlight key features.
  • Empty States: Design engaging empty states for "My Quizzes" when no quizzes have been created, providing a clear CTA to start.
  • Responsive Design: Implement a mobile-first approach, ensuring all elements are accessible and usable on smaller screens.
  • Consistent Navigation: Maintain a consistent header and sidebar navigation across the application.
  • Keyboard Navigation: Ensure all interactive elements are reachable and operable via keyboard for users who don't use a mouse.
  • Error Prevention & Recovery:

* Confirmations: For destructive actions (e.g., deleting a quiz).

* Validation: Provide real-time validation feedback for forms.

* Autosave: Implement an autosave feature for quiz drafts to prevent data loss.


6. Accessibility Considerations

  • Color Contrast: Adhere to WCAG 2.1 AA standards for all text and interactive elements.
  • Keyboard Navigability: Ensure all interactive elements (buttons, links, form fields) are tabbable and operable using keyboard commands.
  • ARIA Attributes: Use appropriate ARIA roles, states, and properties to enhance screen reader compatibility.
  • Focus Indicators: Provide clear visual focus indicators for keyboard users.
  • Semantic HTML: Structure content using proper HTML semantics (e.g., <header>, <nav>, <main>, <button>, <label>).
  • Descriptive Alt Text: Require or provide guidance for meaningful alt text for all images.
  • Form Labels: Ensure all form inputs have associated <label> elements.

7. Future Enhancements (Design Considerations)

The design should be scalable to accommodate future features, such as:

  • Analytics Dashboard: Dedicated screen for quiz performance metrics (completion rates, average scores, per-question analysis).
  • User Management/Teams: For collaborative quiz building.
  • Template Library: Pre-designed quiz templates.
  • Integration Options: APIs for connecting with other platforms.

8. Conclusion

These design specifications provide a robust foundation for developing an intuitive, visually appealing, and highly functional Interactive Quiz Builder. By adhering to these guidelines, we will deliver a product that not only meets user needs but also delights them with its ease of use and engaging interface. The focus on clear wireframes, a harmonious color palette, and strong UX principles will ensure a successful and impactful application.

gemini Output

This document outlines the finalized design assets for the "Interactive Quiz Builder," serving as a comprehensive guide for its visual and interactive implementation. This deliverable focuses on creating an intuitive, engaging, and highly functional user interface (UI) and user experience (UX) that empowers users to effortlessly create, manage, and deploy interactive quizzes across various topics.


1. Executive Summary & Design Philosophy

The Interactive Quiz Builder is designed with a core philosophy centered on simplicity, flexibility, and engagement. Our goal is to provide a powerful tool that feels intuitive even for novice users, while offering advanced customization options for seasoned creators. The design prioritizes clear information architecture, accessible interactions, and a visually appealing aesthetic that minimizes cognitive load and enhances the creative process.

Key principles guiding this design:

  • User-Centric: Prioritizing the needs and workflows of quiz creators.
  • Intuitive & Efficient: Streamlined processes and clear navigation.
  • Modern & Clean: A contemporary visual style that is easy on the eyes.
  • Flexible & Scalable: Designed to accommodate various quiz types, content, and future features.
  • Engaging: Encouraging creativity and providing a positive user experience.

2. Core Design Specifications

2.1. User Flows (Key Journeys)

2.1.1. Create a New Quiz

  1. Login/Dashboard Access: User logs in and lands on the main dashboard/quiz list.
  2. Initiate Creation: Clicks "Create New Quiz" button.
  3. Basic Quiz Settings: User inputs Quiz Title, Description, Category, and selects initial settings (e.g., timed, randomized questions).
  4. Enter Quiz Editor: System navigates to the main Quiz Editor interface.
  5. Add Questions: User clicks "Add Question" button.
  6. Select Question Type: Chooses from Multiple Choice, True/False, Short Answer, Image-Based, etc.
  7. Design Question: Fills in question text, options, correct answer, feedback, media (image/video).
  8. Save Question: Question is added to the quiz list within the editor.
  9. Repeat/Reorder: User adds more questions, or drags and drops to reorder existing ones.
  10. Preview Quiz: User clicks "Preview" to test the quiz as a participant.
  11. Save & Publish: User clicks "Save" and then "Publish" to make the quiz live, generating a shareable link/embed code.

2.1.2. Edit an Existing Quiz

  1. Login/Dashboard Access: User logs in and lands on the main dashboard/quiz list.
  2. Select Quiz: User clicks on an existing quiz from the list.
  3. Enter Quiz Editor: System navigates to the main Quiz Editor interface, pre-populating all data.
  4. Modify Questions/Settings: User makes desired changes (edit question text, options, reorder, change quiz settings).
  5. Save Changes: User clicks "Save" to persist modifications.
  6. Preview/Publish Updates: User can preview changes and then "Update Published Quiz" if applicable.

2.1.3. View Quiz Performance (Basic)

  1. Login/Dashboard Access: User logs in and lands on the main dashboard/quiz list.
  2. Select Quiz: User clicks on an existing quiz from the list.
  3. Access Analytics: Clicks on a "Results" or "Analytics" tab/button.
  4. View Summary: Displays overall quiz performance (e.g., average score, number of attempts).
  5. View Question-Level Data: (Optional) Drill down to see performance per question.

2.2. Key Screens & Components

2.2.1. Dashboard / Quiz List

  • Header: Logo, User Avatar/Name, "Create New Quiz" button, Search bar.
  • Sidebar Navigation (Optional/Contextual): Links to Dashboard, Analytics, Settings, Help.
  • Main Content Area:

* Filter/Sort Options: By category, status (draft/published), date created/modified.

* Quiz Cards/List Items: Each item displays:

* Quiz Title

* Status (Draft, Published, Archived)

* Number of Questions

* Last Modified Date

* Action Buttons: Edit, Preview, Share, Duplicate, Delete, View Results.

* "Create New Quiz" Call-to-Action: Prominent button.

2.2.2. Quiz Editor (Main Interface)

  • Header: Quiz Title (editable), "Save" button, "Preview" button, "Publish" button, "Exit" button.
  • Left Panel (Quiz Settings & Structure):

* Quiz Details: Title, Description, Category, Tags.

* General Settings: Timed quiz (toggle, duration input), randomized questions (toggle), show answers at end (toggle), score visibility.

* Branding/Theming: (Advanced) Options to customize colors, background images for the quiz taker's view.

* Question List: A collapsible/expandable list of all questions in the quiz. Each item shows question number, type, and a snippet of the question text. Drag-and-drop handles for reordering.

* "Add New Question" Button: Prominently placed at the bottom of the left panel or in the main content area.

  • Main Content Area (Question Editor View):

* Contextual Display: When a question is selected from the left panel or a new one is added, this area transforms into the Question Editor.

* Empty State: If no questions are added, a friendly message with a large "Add Your First Question" button.

2.2.3. Question Editor (Specific Question Type View)

  • Question Type Selector: Dropdown or tabs to change question type (e.g., Multiple Choice, True/False, Short Answer).
  • Question Input Field: Rich text editor for the main question text.
  • Media Uploader: Button to add images, videos, or audio relevant to the question.
  • Answer Options (Dynamic based on type):

* Multiple Choice: List of input fields for options. Checkbox/radio button to mark correct answer. "Add Option" button, "Remove" icon for each option.

* True/False: Two radio buttons: "True", "False".

* Short Answer: Single input field for the expected correct answer(s). Option for case sensitivity.

  • Feedback/Explanation: Rich text editor for feedback shown after the answer (correct/incorrect).
  • Points/Weight: Input field for the score value of the question.
  • "Save Question" / "Cancel" Buttons: To commit changes or discard them and return to the Quiz Editor.

2.2.4. Quiz Preview Mode

  • Simulated Quiz Taker View: Displays the quiz exactly as a participant would see it.
  • Navigation: "Next Question," "Previous Question" (if enabled), "Submit Quiz" button.
  • Exit Preview: "Exit Preview" button in a prominent but non-intrusive header.

2.2.5. Publish / Share Modal

  • Shareable Link: Display the unique URL for the quiz, with a "Copy Link" button.
  • Embed Code: Provide HTML embed code for websites, with a "Copy Code" button.
  • Social Share Buttons: Links to share on popular social media platforms.
  • QR Code (Optional): Generate a QR code for easy mobile access.
  • Status Update: Confirmation message that the quiz is now live/updated.

2.3. Interactive Elements

  • Drag-and-Drop: For reordering questions within the Quiz Editor. Clear visual cues during dragging.
  • In-line Editing: For quiz title and question text where applicable, allowing quick edits without full modal pop-ups.
  • Toggle Switches: For binary settings (e.g., "Randomize Questions").
  • Rich Text Editor: For question text, descriptions, and feedback, supporting basic formatting (bold, italic, lists, links).
  • Media Uploaders: Clear "Upload Image/Video" buttons with progress indicators and thumbnail previews.
  • Context Menus: Right-click or "..." menu for quick actions on quiz cards or question items (Edit, Duplicate, Delete).

2.4. Responsiveness

The UI will be designed using a mobile-first approach, ensuring optimal usability across various screen sizes:

  • Breakpoints: Defined breakpoints for mobile (320px-767px), tablet (768px-1023px), and desktop (1024px+).
  • Layout Adaptations:

* Mobile: Collapsible sidebars, stacked content, full-width buttons.

* Tablet: Two-column layouts where feasible, larger touch targets.

* Desktop: Multi-panel layouts, persistent sidebars.

  • Touch Targets: Minimum 48x48px for interactive elements on touch devices.
  • Font Sizes: Scaled appropriately for readability on smaller screens.

2.5. Accessibility

  • Keyboard Navigation: All interactive elements reachable and operable via keyboard (Tab, Enter, Space).
  • ARIA Labels: Proper use of ARIA attributes for screen readers.
  • Color Contrast: Ensuring sufficient contrast ratio (WCAG 2.1 AA compliant) for text and interactive elements.
  • Focus Indicators: Clear visual focus states for keyboard users.
  • Descriptive Alt Text: For all images.
  • Form Labels: Explicitly associated with input fields.

3. Wireframe Descriptions (Conceptual)

As an AI, I cannot generate visual wireframes, but I can provide detailed descriptions that serve the same purpose for development.

3.1. Dashboard / Quiz List Wireframe

  • Layout: Standard web application layout with a fixed header, optional left sidebar, and main content area.
  • Header:

* [Logo] [Application Title] (Left)

* [Search Bar] (Center-Right)

* [User Avatar / Profile Menu] (Far Right)

  • Optional Left Sidebar (Collapsed by default on mobile):

* [Dashboard Icon] Dashboard

* [Analytics Icon] Analytics

* [Settings Icon] Settings

* [Help Icon] Help

  • Main Content Area:

* Top Row:

* ## My Quizzes (H2 heading)

* [Filter Dropdown] All Categories

* [Sort Dropdown] Last Modified

* [Button] + Create New Quiz (Prominent, primary button)

* Quiz Cards (Grid or List Layout):

* Each card:

* [Quiz Title] (H3 heading)

* [Status Tag] Published / Draft

* [Text] 12 Questions

* [Text] Last Modified: YYYY-MM-DD

* [Small Icon Button] Edit

* [Small Icon Button] Preview

* [Small Icon Button] Share

* [Small Icon Button] More Options (...)

* Empty State: If no quizzes, a central illustration, [Text] No Quizzes Yet!, and a [Large Button] Create Your First Quiz.

3.2. Quiz Editor Wireframe

  • Layout: Two-column layout (Desktop/Tablet) or stacked (Mobile).
  • Header (Fixed):

* [Icon Button] < Back to Quizzes

* [Editable Text Input] Quiz Title (H2 style, placeholder "Untitled Quiz")

* [Button] Save (Secondary)

* [Button] Preview (Secondary)

* [Button] Publish (Primary, green)

  • Left Panel (Quiz Settings & Questions - Fixed, Scrollable):

* Section: Quiz Details

* [Label] Title: [Input Field] (Pre-filled)

* [Label] Description: [Textarea]

* [Label] Category: [Dropdown]

* [Label] Tags: [Tag Input with Suggestions]

* Section: General Settings

* [Toggle Switch] Timed Quiz: [Input Field] Duration (minutes)

* [Toggle Switch] Randomize Questions

* [Toggle Switch] Show Answers at End

* [Toggle Switch] Allow Multiple Attempts

* Section: Questions

* ### Questions (X) (H3 heading, X = count)

* [Button] + Add New Question (Prominent, secondary)

* Question List Items (Drag-and-Drop enabled):

* [Drag Handle Icon] [Question Number]. [Question Type Icon] [Question Text Snippet]

* [Icon Button] Edit

* [Icon Button] Duplicate

* [Icon Button] Delete

  • Main Content Area (Question Editor - Scrollable):

* Initially: [Illustration] Start building your quiz! [Large Button] Add Your First Question

* When a question is selected/added:

* [Dropdown/Tabs] Question Type: Multiple Choice | True/False | Short Answer

* [Label] Question Text:

* [Rich Text Editor]

* [Button] + Add Media (Image/Video)

* Dynamic Answer Section (e.g., Multiple Choice):

* [Label] Options:

* [Text Input] Option 1 [Radio Button/Checkbox] Correct [Icon Button] Delete

* [Text Input] Option 2 [Radio Button/Checkbox] Correct [Icon Button] Delete

* [Button] + Add Option

* [Label] Points: [Number Input]

* [Label] Feedback (Optional):

* [Rich Text Editor]

* [Button] Save Question (Primary)

* [Button] Cancel (Secondary)

3.3. Quiz Preview Wireframe

  • Layout: Centered content, simulating a quiz taker's experience.
  • Header (Minimal):

* [Icon Button] X Exit Preview (Top Right)

  • Main Content Area (Quiz Taker View):

* [H2] Quiz Title

* [H3] Question X of Y

* [Progress Bar]

* `[Image/Video (

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