Mobile App Wireframe Kit
Run ID: 69bca62277c0421c0bf49ab32026-03-29Design
PantheraHive BOS
BOS Dashboard

Generate a complete mobile app wireframe specification with screen flows, component library, interaction patterns, and developer handoff notes.

Mobile App Wireframe Specification: Test App Name (iOS - Social)

Project Name: Test App Name

App Type: Social

Platform: iOS

Design System: Material Design

Date: October 26, 2023


1. Executive Summary

This document outlines the complete wireframe specification for "Test App Name," a social application designed for the iOS platform, leveraging principles from Material Design. The goal is to provide a comprehensive blueprint covering key screen flows, a reusable component library, core interaction patterns, and essential notes for development handoff. This specification aims to ensure a consistent user experience, streamline development, and facilitate clear communication across the product team.


2. App Overview: Test App Name

"Test App Name" is envisioned as a dynamic social platform enabling users to connect, share content, and engage with communities. The app will prioritize ease of use, visual appeal, and robust social interaction features. Key functionalities will include:

  • User authentication and profile management.
  • Content feed (posts, media).
  • Content creation and sharing.
  • Direct messaging and group chats.
  • Notifications and activity tracking.
  • Search and discovery.

The application will adopt Material Design principles for its UI/UX foundation, adapted for a native iOS experience where necessary to ensure platform consistency and user expectations are met.


3. Key Screens & Screen Flows

This section details the primary screens of "Test App Name" and their interconnected navigation paths. For each flow, screen names are followed by a brief description and the primary navigation options.

3.1. User Authentication & Onboarding Flow

Purpose: To allow new users to register and existing users to log in, guiding them through initial setup.

  • Screen 1.0: Splash Screen

* Description: Displays app logo and name briefly on launch.

* Transition: Automatic to Onboarding/Login.

  • Screen 1.1: Onboarding Carousel (First-time users)

* Description: 2-3 screens highlighting key features with illustrations.

* Navigation: Swipe left/right for next screen, "Skip" or "Get Started" button (leads to 1.2).

  • Screen 1.2: Welcome / Login & Signup Choice

* Description: Prompts user to "Log In" or "Sign Up."

* Navigation:

* "Log In" button (leads to 1.3)

* "Sign Up" button (leads to 1.4)

  • Screen 1.3: Login Screen

* Description: Email/Username and Password input fields. "Forgot Password?" link. Social login options (Google, Apple, Facebook).

* Navigation:

* "Log In" button (on success, leads to 2.0 Home Feed)

* "Sign Up" link (leads to 1.4)

* "Forgot Password?" (leads to Password Reset Flow)

  • Screen 1.4: Signup Screen (Step 1: Basic Info)

* Description: Email, Username, Password input fields. Password strength indicator.

* Navigation: "Next" button (leads to 1.5)

  • Screen 1.5: Signup Screen (Step 2: Profile Details - Optional)

* Description: Name, Profile Picture upload, Bio (optional).

* Navigation: "Skip" or "Complete Profile" button (leads to 2.0 Home Feed)

3.2. Home Feed Flow

Purpose: To display a personalized stream of content from followed users and communities.

  • Screen 2.0: Home Feed

* Description: Scrollable list of content cards (text, images, videos). Top app bar with app logo/name, "Create Post" button (floating action button), and notification icon. Bottom navigation bar.

* Components: App Bar, Content Cards, Floating Action Button (FAB), Bottom Navigation.

* Navigation:

* Tap on content card (leads to 3.0 Post Detail Screen)

* Tap on user avatar/name (leads to 4.0 User Profile)

* Tap "Like," "Comment," "Share" icons (trigger in-line actions/modals)

* Tap FAB (leads to 5.0 Create Post)

* Tap Notification icon (leads to 6.0 Notifications)

* Bottom Navigation: "Home" (current), "Search" (leads to 7.0 Search), "Messages" (leads to 8.0 Messages), "Profile" (leads to 4.0 User Profile)

  • Screen 3.0: Post Detail Screen

* Description: Full view of a single post, including all comments.

* Components: App Bar (with back button), Post Card, Comment Input, Comment List.

* Navigation:

* Back button (leads to 2.0 Home Feed)

* Tap on user avatar/name (leads to 4.0 User Profile)

* Input field for adding comments.

3.3. User Profile Flow

Purpose: To view and manage user profiles.

  • Screen 4.0: My Profile / User Profile

* Description: Displays user's profile picture, name, bio, follower/following counts, and a grid/list of their posts. "Edit Profile" button (for own profile), "Follow/Unfollow" button (for other profiles). Settings icon in top right (for own profile).

* Components: App Bar, Profile Header, Tab Bar (Posts, Media, Saved), Grid/List of content.

* Navigation:

* Tap on a post thumbnail (leads to 3.0 Post Detail Screen)

* "Edit Profile" button (leads to 4.1 Edit Profile)

* Settings icon (leads to 4.2 Settings)

* Tap Follower/Following count (leads to list of users)

* Back button (if navigating from another screen)

  • Screen 4.1: Edit Profile

* Description: Fields for updating name, bio, profile picture, and other details.

* Navigation: "Save" button (leads back to 4.0 My Profile)

  • Screen 4.2: Settings

* Description: List of settings categories (Account, Privacy, Notifications, Help, About).

* Navigation: Tap on category (leads to sub-settings screen). "Log Out" option.

3.4. Content Creation Flow

Purpose: To allow users to create and share new posts.

  • Screen 5.0: Create New Post (Modal/Full Screen)

* Description: Input field for text, buttons for adding photo/video, location tag, tagging users.

* Components: App Bar (with "Cancel" and "Post" buttons), Text Area, Media Picker, Toggle switches.

* Navigation:

* "Cancel" button (discards post, leads back to previous screen)

* "Add Photo/Video" (opens native media picker)

* "Post" button (uploads post, leads to 2.0 Home Feed or Profile)

  • Screen 5.1: Media Editor (Optional)

* Description: Basic photo/video editing tools (crop, rotate, filters).

* Navigation: "Done" button (applies edits, leads back to 5.0 Create New Post)

3.5. Notifications Flow

Purpose: To inform users of activity related to their account.

  • Screen 6.0: Notifications

* Description: Scrollable list of notification items (likes, comments, new followers, mentions). Categorization (e.g., "All," "Mentions").

* Components: App Bar (with back button), Segmented Control/Tabs, Notification Cards.

* Navigation:

* Tap on a notification item (leads to relevant screen, e.g., 3.0 Post Detail, 4.0 User Profile)

* Back button (leads to 2.0 Home Feed)

3.6. Search & Discovery Flow

Purpose: To allow users to find other users, posts, or topics.

  • Screen 7.0: Search

* Description: Search bar at the top. Below, displays trending topics, suggested users, or recent searches.

* Components: App Bar with Search Input, Search Results List, Suggested Content Cards.

* Navigation:

* Type in search bar (displays 7.1 Search Results)

* Tap on a trending topic/suggestion (leads to 7.1 Search Results filtered by topic)

* Bottom Navigation: "Home," "Search" (current), "Messages," "Profile"

  • Screen 7.1: Search Results

* Description: Displays results categorized by "Users," "Posts," "Topics."

* Navigation:

* Tap on a user (leads to 4.0 User Profile)

* Tap on a post (leads to 3.0 Post Detail Screen)

* Back button (leads to 7.0 Search)

3.7. Messaging Flow

Purpose: To enable direct and group communication between users.

  • Screen 8.0: Messages / Inbox

* Description: List of active chat conversations. "New Message" FAB.

* Components: App Bar, Conversation List Items, FAB.

* Navigation:

* Tap on a conversation (leads to 8.1 Chat Screen)

* Tap FAB (leads to 8.2 New Message / Select Recipients)

* Bottom Navigation: "Home," "Search," "Messages" (current), "Profile"

  • Screen 8.1: Chat Screen

* Description: Displays chat history. Input field for new messages, emoji picker, attachment button.

* Components: App Bar (with recipient name/avatar, back button), Message Bubbles, Message Input Bar.

* Navigation:

* Back button (leads to 8.0 Messages)

* Tap recipient name/avatar (leads to 4.0 User Profile)

* Attachment button (opens media picker)

  • Screen 8.2: New Message / Select Recipients

* Description: Search bar to find users to start a new chat. List of suggested contacts.

* Navigation:

* Select a user (leads to 8.1 Chat Screen with that user)

* "Cancel" button (leads to 8.0 Messages)


4. Component Library (Material Design for iOS)

This section details the reusable UI components, adhering to Material Design principles while considering iOS platform conventions for optimal user experience.

4.1. Navigation & Bars

  • Top App Bar (Material Design "TopAppBar")

* Usage: Primary navigation and branding at the top of the screen.

* Elements: App Title/Logo, Action Icons (e.g., Search, Notifications, Settings), Back Button (contextual).

* iOS Adaptation: Will align with UINavigationBar behavior and styling, potentially using Material theming for color and typography.

  • Bottom Navigation Bar (Material Design "BottomNavigation")

* Usage: Persistent navigation between primary destinations.

* Elements: 3-5 icon/text pairs.

* States: Selected (active icon/text, potentially color change), Unselected.

* iOS Adaptation: Will align with UITabBar behavior. Material iconography and color palette will be applied.

  • Tab Bar (Material Design "Tabs")

* Usage: Organize content within a screen (e.g., "Posts," "Media," "Saved" on a profile).

* Elements: Text labels or icons, with an indicator for the active tab.

* States: Selected, Unselected.

* iOS Adaptation: Will align with UISegmentedControl or custom tab views for more flexibility, applying Material theming.

4.2. Buttons & Actions

  • Floating Action Button (FAB)

* Usage: Prominent action, typically content creation (e.g., "Create Post").

* Types: Standard, Extended (with text label).

* States: Default, Pressed, Disabled.

* Material Specifics: Circular shape, elevated, shadow.

  • Contained Button (Material Design "Elevated Button")

* Usage: High-emphasis actions, primary calls-to-action (e.g., "Log In," "Sign Up," "Post").

* States: Default, Hover/Focused, Pressed, Disabled.

  • Outlined Button (Material Design "Outlined Button")

* Usage: Medium-emphasis actions, secondary calls-to-action (e.g., "Skip," "Edit Profile").

* States: Default, Hover/Focused, Pressed, Disabled.

  • Text Button (Material Design "Text Button")

* Usage: Low-emphasis actions, often within modals or card footers (e.g., "Cancel," "Learn More").

* States: Default, Hover/Focused, Pressed, Disabled.

  • Icon Button

* Usage: Small, contextual actions (e.g., "Like," "Share," "Menu").

* States: Default, Pressed.

4.3. Input Fields

  • Text Field (Material Design "Filled" or "Outlined")

* Usage: Single-line text input (e.g., Username, Password, Search).

* Elements: Label, Input Area, Helper Text, Error Text, Leading/Trailing Icons (e.g., eye for password visibility).

* States: Default, Focused, Error, Disabled.

  • Text Area (Multi-line Text Field)

* Usage: Multi-line text input (e.g., Post content, Bio).

* Elements: Label, Input Area, Character Counter (optional).

4.4. Cards & Containers

  • Card (Material Design "Card")

* Usage: Group related content and actions (e.g., individual posts in the feed).

* Elements: Media area, Title, Subtitle, Text content, Action buttons/icons.

* Material Specifics: Elevated surface with rounded corners and shadow.

  • List Item (Material Design "ListItem")

* Usage: Rows of content in lists (e.g., Notifications, Messages, Settings).

* Elements: Leading avatar/icon, Primary text, Secondary text, Trailing icon/action.

4.5. Indicators & Feedback

  • Progress Indicator (Material Design "Circular Progress" / "Linear Progress")

* Usage: Shows loading state (e.g., fetching feed, uploading content).

* Types: Indeterminate (spinning), Determinate (progress bar).

  • Snackbar (Material Design "Snackbar")

* Usage: Brief, non-disruptive messages (e.g., "Post uploaded successfully," "Network error").

* Elements: Text message, Optional action button.

* iOS Adaptation: Will be implemented as a custom view, similar to a toast notification, appearing temporarily from the bottom of the screen.

  • Dialog (Material Design "AlertDialog")

* Usage: Critical alerts or confirmations (e.g., "Discard Post?", "Are you sure you want to log out?").

* Elements: Title, Message, Action buttons.

* iOS Adaptation: Will align with UIAlertController for native feel, but themed with Material typography/colors.

4.6. Other Components

  • Avatar: Circular image representing a user.
  • Iconography: Material Icons library will be used for system icons, ensuring consistency.
  • Switch (Material Design "Switch"): Toggle between two states (e.g., push notifications on/off).
  • Slider (Material Design "Slider"): For selecting a value from a range.
  • Chip (Material Design "Chip"): Compact elements representing an attribute, text, entity, or action.

5. Interaction Patterns

This section describes how users will interact with "Test App Name," focusing on common gestures and feedback mechanisms consistent with both iOS and Material Design.

5.1. Navigation & Gestures

  • Tapping: Primary interaction for activating buttons, selecting items, and navigating.
  • Swiping:

* Horizontal Swipes: Used for navigating between tabs (e.g., on profile screen) or dismissing items (e.g., swipe to dismiss a notification).

* Vertical Swipes: Standard for scrolling through lists and feeds. Pull-to-refresh will be implemented on content feeds.

  • Long Press: For contextual actions (e.g., long press on a post to bring up a share sheet, long press on a message for options).
  • Pinch-to-Zoom: For viewing images in detail.
  • Edge Swipe (iOS specific): Swiping from the left edge of the screen will trigger a back navigation, aligning with standard iOS behavior.

5.2. Feedback Mechanisms

  • Visual Feedback:

* Ripple Effect (Material Design): Taps on interactive elements will display a subtle ripple animation.

* State Changes: Buttons and interactive elements will visibly change state (e.g., color, opacity, elevation) on press, hover, or focus.

* Progress Indicators: Displayed during loading or processing states.

  • Haptic Feedback (iOS specific):

* Subtle vibrations will be used for key interactions such as confirming an action (e.g., "Like" a post), successful form submission, or error states.

  • Auditory Feedback (Optional):

* Minimal, non-intrusive sounds for critical actions (e.g., sending a message) can be considered, with an option to disable in settings.

5.3. Animations & Transitions

  • Screen Transitions: Standard iOS navigation animations (slide-in from right for push, slide-out for pop) will be used. Modals will slide up from the bottom.
  • Component Animations:

* FAB transform: FAB may animate into a new screen or expand to reveal more options.

* Content loading animations: Skeleton loaders or shimmer effects for content cards while data is being fetched.

* Micro-interactions: Subtle animations for liking a post, expanding/collapsing sections.


6. Design System Integration: Material Design on iOS

While Material Design is primarily associated with Android, its principles provide a robust framework for UI/UX. When applied to iOS, careful consideration is needed to ensure the app feels native while retaining Material's benefits.

6.1. Color Palette

  • Primary Color: A dominant color for branding and key UI elements (e.g., App Bar, FAB, active states).
  • Secondary Color: An accent color for secondary actions, new elements, or to create contrast.
  • Surface Colors: Defined for backgrounds, cards, and other elevated surfaces.
  • On-Colors: Colors for text and icons placed on primary, secondary, and surface colors to ensure accessibility and contrast.
  • Semantic Colors: Red for error, Green for success, Yellow for warning.
  • Recommendation: Use Material Design color tool to generate a harmonious palette. Ensure sufficient contrast ratios for accessibility (WCAG 2.1 AA).

6.2. Typography

  • Material Type Scale: Utilize Material's predefined type scale (e.g., headlineLarge, titleMedium, bodyLarge, labelSmall) for consistent text hierarchy.
  • Font Choice:

* iOS Native: Prioritize Apple's San Francisco font family for a native feel, adapting Material's type scale to its weights and sizes.

* Material Default: If a custom Material font is desired (e.g., Roboto), ensure it is licensed for iOS and fallback options are defined.

  • Text Alignment: Default to left-aligned for most content, centered for titles where appropriate.

6.3. Iconography

  • Material Icons: The Material Symbols library (outlined, filled, rounded, sharp, two-tone) will be the primary source for icons.
  • Consistency: Maintain a consistent icon style throughout the app.
  • Size & Scale: Standard icon sizes (e.g., 24x24dp) will be scaled appropriately for iOS's pixel density (@2x, @3x).

6.4. Spacing & Layout

  • 8dp Grid System: All spacing and sizing will adhere to an 8dp (density-independent pixel) grid system, a core Material Design principle. This promotes visual harmony and ease of development.
  • Keylines: Define keylines for alignment of elements within containers (e.g., 16dp padding for content within cards, 72dp for aligned list items with avatars).
  • Responsive Layout: Designs will consider different iOS screen sizes (iPhone SE, iPhone 15 Pro Max) and orientations (though primarily portrait).

6.5. Adaptation Strategy for iOS

  • Native Components with Material Theming: Where possible, leverage native iOS components (UINavigationBar, UITabBar, UIAlertController) but apply Material Design colors, typography, and iconography. This ensures platform familiarity while maintaining brand consistency.
  • Custom Material Components: For elements without direct iOS equivalents (e.g., FAB, Snackbars, Material Cards with specific shadows/elevation), custom implementations will be required, adhering to Material's specifications.
  • Gesture Parity: Ensure Material Design interactions (e.g., ripple effects) don't conflict with or override essential iOS gestures (e.g., edge swipe to go back).

7. Developer Handoff Notes

This section provides crucial information and considerations for the development team to ensure accurate and efficient implementation of the wireframe specification.

7.1. Technical Considerations

  • Platform Specifics:

* iOS HIG Adherence: While using Material Design, ensure the final implementation respects critical aspects of Apple's Human Interface Guidelines (HIG) for a natural iOS user experience (e.g., navigation patterns, system modals, accessibility features).

* Safe Area Layout Guides: All UI elements must properly use safeAreaLayoutGuide to avoid overlapping with notches, status bars, and home indicators.

* Dark Mode: The app should be designed with dark mode compatibility in mind from the outset. Define separate color palettes and asset variations for dark mode.

  • Accessibility:

* VoiceOver Support: All interactive elements and meaningful content must have appropriate accessibilityLabel and accessibilityHint properties.

* Dynamic Type: Support for larger text sizes via Dynamic Type for improved readability.

* Color Contrast: Ensure all text and interactive elements meet WCAG 2.1 AA contrast ratios.

  • Performance:

* Smooth Scrolling: Implement efficient cell reuse mechanisms for UITableView and UICollectionView to ensure smooth scrolling performance, especially in feeds.

* Image Loading: Utilize efficient image loading and caching libraries to prevent memory issues and ensure fast display of media.

* API Integration: Define clear API contracts for data fetching and submission.

  • Offline Experience: Consider basic offline capabilities (e.g., caching feed content, drafting posts) where feasible to improve user experience.

7.2. Asset Requirements

  • Vector Assets: Prioritize SVG or PDF vector assets for icons and illustrations where possible to ensure scalability and crispness across all device resolutions.
  • Image Optimization: All raster images (e.g., profile pictures, post media) should be optimized for web/mobile to balance quality and file size. Provide @2x and @3x versions for specific raster assets.
  • Font Files: Provide all custom font files (if not using system fonts) in appropriate formats (e.g., .ttf, .otf).

7.3. Version Control & Documentation

  • Source Control: All UI code should be managed in a version control system (e.g., Git).
  • Component Documentation: Maintain clear documentation for each UI component, including its properties, states, and usage guidelines. This promotes reusability and consistency.
  • Design Tokens: Consider implementing design tokens (e.g., for colors, typography, spacing) to create a single source of truth for design decisions, easily consumable by developers.

7.4. Collaboration & Handoff Process

  • Design Tools: Final designs will be delivered via a tool like Figma, Sketch, or Adobe XD, providing inspectable properties for developers.
  • Communication Channel: Establish a clear communication channel (e.g., Slack, Jira, dedicated meetings) for designers and developers to discuss implementation details, raise questions, and provide feedback.
  • Regular Syncs: Schedule regular design-dev syncs to review progress, address discrepancies, and ensure alignment.

This comprehensive wireframe specification serves as the foundational document for the development of "Test App Name." Adherence to these guidelines will ensure a high-quality, consistent, and user-friendly social application on the iOS platform.

Step 2: collab

As a professional AI assistant within PantheraHive, I am executing the "Mobile App Wireframe Kit" workflow for "Test App Name".


Mobile App Wireframe Kit: Test App Name (iOS Social App)

Project Summary:

This document provides a comprehensive wireframe specification for "Test App Name," a social mobile application targeting the iOS platform, leveraging the Material Design system. It outlines key screen layouts, user flows, a foundational component library, interaction patterns, and critical developer handoff notes to facilitate the subsequent design and development phases.


1. Project Overview

  • App Name: Test App Name
  • App Type: Social
  • Platform: iOS
  • Design System: Material Design
  • Primary Goal: To establish a clear structural and functional blueprint for the "Test App Name" iOS application, ensuring consistent user experience and efficient communication between design and development teams.
  • Scope: This kit includes wireframes for core social app functionalities, a global component library, interaction guidelines, and initial accessibility and developer considerations.

2. Design System & Platform Considerations

Material Design on iOS

The choice of Material Design for an iOS application presents specific considerations. While Material Design offers a robust and well-documented design system, native iOS applications typically adhere to Apple's Human Interface Guidelines (HIG) for a truly "native" look and feel.

Recommendations:

  1. Adaptation Strategy: Clearly define how Material Design principles and components will be adapted for iOS. This might involve:

* Using Material components that have direct or close equivalents in iOS HIG (e.g., text fields, buttons).

* Carefully integrating Material-specific elements (e.g., Floating Action Buttons, Snackbars) in a way that feels natural on iOS.

* Prioritizing Material Design's emphasis on motion, elevation, and typography.

  1. User Expectation: Be mindful that iOS users are accustomed to certain interaction patterns and visual cues. While Material Design is adopted, ensure core iOS gestures (e.g., swipe-to-go-back) and system-level integrations (e.g., share sheets) are respected.
  2. Future-Proofing: Consider if a hybrid approach (Material-inspired, but respecting HIG where critical) or a full Material Design implementation is the long-term vision. This document proceeds with a strong Material Design influence as requested.

3. Key Screen Wireframes & Flows

This section details the wireframes for the core screens of the "Test App Name" social application, outlining their purpose, key elements, and user interaction flows.

3.1. Onboarding & Authentication Flow

  • Screen Name: Welcome & Login/Signup
  • Purpose: To introduce new users to the app, provide options for account creation, or allow existing users to log in.
  • Key Elements (Material Design):

* Welcome Screen: Centered app logo/name, brief value proposition text, Contained Button for "Get Started" or "Create Account," Text Button for "Log In."

* Login Screen: App Bar (optional back button), Outlined Text Fields for Email/Username and Password, Contained Button for "Log In," Text Button for "Forgot Password?", Contained Buttons with icons for "Sign in with Google," "Sign in with Apple."

* Signup Screen: Similar to Login, with additional Outlined Text Fields for Name, Email, Password (and confirm password), Contained Button for "Sign Up."

  • Interaction Flow:

1. Launch App: User sees Splash Screen (App Logo).

2. Welcome Screen: User taps "Get Started" (for new users) or "Log In" (for existing users).

3. New User Path:

* Taps "Get Started" -> Navigates to Signup Screen.

* Fills details -> Taps "Sign Up" -> Navigates to Profile Setup (optional) -> Navigates to Home Feed.

4. Existing User Path:

* Taps "Log In" -> Navigates to Login Screen.

* Enters credentials -> Taps "Log In" -> Navigates to Home Feed.

* Taps "Forgot Password?" -> Navigates to Password Reset flow.

* Taps "Sign in with Google/Apple" -> Initiates OAuth flow -> Navigates to Home Feed.

3.2. Home Feed

  • Screen Name: Home Feed (Main Content Stream)
  • Purpose: To display a personalized stream of content (posts, updates) from followed users and recommended content.
  • Key Elements (Material Design):

* Top App Bar: Centered App Logo/Name, IconButton for "Search," IconButton for "Notifications."

* Content Cards: Card component for each post, containing:

* Avatar and Username of poster.

* Timestamp.

* Image/Video content area.

* Text for caption.

* IconButtons for Like, Comment, Share.

* Like count and first few comments summary.

* Floating Action Button (FAB): Extended FAB or FAB in bottom-right corner, labeled "Create Post" or with a "+" icon.

* Bottom Navigation Bar: Bottom Navigation with Navigation Items for "Home," "Search," "Create," "Notifications," "Profile." (Note: "Create" might be a dedicated FAB or an item here).

  • Interaction Flow:

1. Arrive: User lands on Home Feed after login/onboarding.

2. Scroll: User scrolls vertically to browse content. Pull-to-refresh gesture initiated by scrolling to top and pulling down.

3. Interact with Post: Taps on image/video to view details, taps on Like/Comment/Share icons to perform actions, taps on username/avatar to view profile.

4. Create Post: Taps FAB -> Navigates to Create Post Screen.

5. Navigate: Taps Navigation Items in Bottom Navigation Bar to switch sections.

3.3. User Profile

  • Screen Name: Profile
  • Purpose: To display a user's personal information, posted content, and provide access to settings or profile editing.
  • Key Elements (Material Design):

* Top App Bar: User's display name, IconButton for "Settings," IconButton for "Edit Profile."

* Profile Header: Avatar (large), user's full name, bio/description, follower/following counts with Text Buttons to view lists.

* Action Buttons: Outlined Button for "Follow/Unfollow," Contained Button for "Message."

* Content Tabs: Tab Bar with Tabs for "Posts," "Saved," "Tagged."

* Content Grid: Image List or Grid List displaying thumbnails of user's posts.

  • Interaction Flow:

1. Arrive: User accesses their own profile via Bottom Navigation Bar or another user's profile by tapping their avatar/name.

2. View Information: User sees profile picture, bio, stats.

3. Interact with Other User: If viewing another user's profile, taps "Follow/Unfollow" or "Message."

4. Edit Profile: If viewing their own profile, taps "Edit Profile" icon -> Navigates to Edit Profile Screen.

5. Settings: If viewing their own profile, taps "Settings" icon -> Navigates to Settings Screen.

6. Browse Content: Taps Tabs to switch between "Posts," "Saved," "Tagged" content. Taps on a post thumbnail -> Navigates to Post Detail Screen.

3.4. Create Post/Upload

  • Screen Name: Create Post
  • Purpose: To enable users to create and share new content (text, images, videos) with various options.
  • Key Elements (Material Design):

* Top App Bar: Text Button for "Cancel," Title "New Post," Text Button for "Post/Share."

* Content Input: Outlined Text Field (multi-line) for caption/text.

* Media Picker: Image List or grid for selecting photos/videos from gallery, IconButton for Camera, IconButton for Video.

* Options: Chip components for "Tag People," "Add Location," Switch for "Private Post."

  • Interaction Flow:

1. Arrive: User taps FAB on Home Feed or Create item in Bottom Navigation Bar.

2. Select Media: User taps on images/videos from gallery or camera icon to capture new media. Selected media appears in a preview area.

3. Add Details: User types caption in Text Field.

4. Add Tags/Location: User taps Chips to tag friends or add a location.

5. Set Privacy: User toggles Switch for private/public.

6. Post: User taps "Post/Share" -> Content is uploaded -> Navigates back to Home Feed (potentially with a Snackbar confirmation).

7. Cancel: User taps "Cancel" -> AlertDialog asks "Discard Post?" -> User confirms or cancels.

3.5. Notifications

  • Screen Name: Notifications
  • Purpose: To inform users about recent activities related to their account (likes, comments, new followers, mentions, etc.).
  • Key Elements (Material Design):

* Top App Bar: Title "Notifications," IconButton for "Filter" or "Settings."

* Notification List: List Item components, each containing:

* Avatar of the user who performed the action.

* Text describing the action (e.g., "John Doe liked your photo," "Jane Smith started following you").

* Timestamp.

* (Optional) Thumbnail of the related content.

* Tabs (Optional): Tab Bar with Tabs for "All," "Mentions," "Messages."

  • Interaction Flow:

1. Arrive: User taps Notifications icon from Top App Bar or Bottom Navigation Bar.

2. Browse: User scrolls through the list of notifications.

3. Action: User taps a specific notification -> Navigates to the relevant content (e.g., Post Detail, User Profile, Chat).

4. Filter/Manage: User taps "Filter" icon to apply filters or manage notification settings.

3.6. Search & Discover

  • Screen Name: Search & Discover
  • Purpose: To allow users to find other users, content (posts, hashtags), or explore trending topics.
  • Key Elements (Material Design):

* Top App Bar: Search Bar (integrated into App Bar) with IconButton for "Voice Search" and "Clear Text."

* Recent Searches: List Items or Chip components displaying recent search queries.

* Trending/Suggested Content: Grid List or Image List displaying popular posts, users, or hashtags. Each item might be a Card with an image and a label.

* Search Results: Dynamic display of List Items (for users/hashtags) or Card components (for posts) as the user types.

  • Interaction Flow:

1. Arrive: User taps Search icon from Top App Bar or Bottom Navigation Bar.

2. Search Input: User taps Search Bar and starts typing. Auto-suggestions may appear below.

3. View Results: As user types, search results update dynamically. User taps a result -> Navigates to relevant profile, post, or hashtag page.

4. Explore: User browses "Trending" or "Suggested" content by scrolling and tapping items.

5. Clear Search: User taps Clear Text icon to clear the search bar.

3.7. Direct Messaging / Chat

  • Screen Name: Messages (Conversation List) & Chat Screen
  • Purpose: To facilitate private communication between users.
  • Key Elements (Material Design):

* Messages List (Conversation List):

* Top App Bar: Title "Messages," IconButton for "New Message."

* Search Bar: Outlined Text Field for searching conversations.

* Conversation List: List Item components, each showing: Avatar of sender, sender's name, last message preview, timestamp, (optional) unread indicator.

* Chat Screen:

* Top App Bar: Avatar and name of recipient, IconButton for "Video Call," IconButton for "Info/Details."

* Message Bubbles: Card components or custom shapes for sender/receiver messages, differentiated by color/alignment.

* Input Field: Outlined Text Field for typing messages, IconButton for "Attach Media," IconButton for "Send."

  • Interaction Flow:

1. Arrive at Messages List: User taps Messages icon (if available in App Bar or Bottom Navigation Bar).

2. View Conversations: User sees a list of ongoing conversations.

3. Start New Chat: User taps "New Message" icon -> Navigates to "New Chat" screen (select contact).

4. Open Conversation: User taps a Conversation List Item -> Navigates to Chat Screen.

5. Send Message: In Chat Screen, user types in Text Field -> Taps "Send" icon.

6. Attach Media: User taps "Attach Media" icon -> Opens media picker.

7. Back: User taps back arrow in Top App Bar -> Navigates back to Messages List.


4. Global Component Library (Material Design for iOS)

This section lists common Material Design components that will be consistently used across the "Test App Name" application.

  • App Bars:

* Top App Bar: For screen titles, actions (search, notifications, settings).

* Bottom App Bar / Bottom Navigation: For primary app navigation (Home, Search, Create, Notifications, Profile).

  • Buttons:

* Contained Button: High-emphasis actions (e.g., "Log In," "Sign Up," "Post").

* Outlined Button: Medium-emphasis actions (e.g., "Follow," "Edit Profile").

* Text Button: Low-emphasis actions (e.g., "Cancel," "Forgot Password?").

* Floating Action Button (FAB): Primary, positive action (e.g., "Create Post").

* Icon Button: For small, iconic actions (e.g., Like, Comment, Share, Search, Settings).

  • Cards: For displaying distinct content blocks like posts, profile summaries, or search results.
  • Text Fields:

* Outlined Text Field: For all text inputs (e.g., username, password, captions, search).

  • Lists:

* List Item: For displaying rows of information (e.g., notifications, conversation list, settings menu).

* Image List / Grid List: For displaying collections of images/videos (e.g., user's posts, discover feed).

  • Chips: For filtering, tagging, or small interactive elements (e.g., "Add Location," "Tag People," "Trending Hashtags").
  • Avatars: For user profile pictures.
  • Dialogs & Modals:

* Alert Dialog: For critical user confirmations (e.g., "Discard Post?").

* Bottom Sheet: For contextual actions or options.

  • Snackbars: For brief, non-intrusive feedback messages (e.g., "Post created successfully").
  • Progress Indicators: For loading states (e.g., Circular Progress Indicator for refreshing, Linear Progress Indicator for uploads).
  • Switches: For toggling settings (e.g., "Private Account").
  • Tabs: For organizing content within a screen (e.g., "Posts," "Saved," "Tagged").
  • Icons: Material Icons will be used consistently for all iconography.

5. Interaction Patterns

This section outlines common interaction patterns that will be implemented across the "Test App Name" application.

  • Navigation:

* Primary Navigation: Utilizes a Bottom Navigation Bar for core sections.

* Secondary Navigation: Top App Bar for context-specific actions and back navigation.

* Hierarchical Navigation: Tapping an item (e.g., a post, user profile) navigates to a detail view.

  • Content Display & Interaction:

* Scrolling: Vertical scrolling for feeds and lists.

* Pull-to-Refresh: Standard gesture for refreshing content in feeds.

* Tap to Action: Tapping buttons, icons, or list items to trigger actions or navigate.

* Swipe Gestures: Potentially for dismissing notifications or swiping between tabs (if applicable).

  • Input & Feedback:

* Text Input: Standard Outlined Text Fields with clear labels and hints.

* Media Selection: Access to camera roll and camera for image/video uploads.

* Confirmation: AlertDialogs for critical actions, Snackbars for non-critical confirmations.

* Loading States: Visual indicators (Progress Indicators) for asynchronous operations.


6. Accessibility Considerations

Ensuring "Test App Name" is accessible to all users is paramount. Key considerations include:

  • Color Contrast: Adherence to WCAG 2.1 AA guidelines for text and interactive elements to ensure readability for users with visual impairments.
  • Dynamic Type/Text Scaling: Support for iOS's Dynamic Type feature, allowing users to adjust text size system-wide. All text elements should scale appropriately without breaking layouts.
  • VoiceOver/Screen Reader Support:

* All interactive elements (buttons, icons, text fields) must have meaningful accessibility labels.

* Images and media should have descriptive alt-text where appropriate.

* Logical reading order for screen reader users.

  • Target Sizes: All tappable elements (buttons, icons, list items) should have a minimum target size of 44x44 points to accommodate users with motor impairments.
  • Haptic Feedback: Judicious use of haptic feedback for key interactions (e.g., successful post, long-press actions) to provide tactile confirmation.

7. Developer Handoff Notes

This section provides crucial information for the development team to ensure accurate implementation of the wireframe specifications.

  • Design System Implementation:

* Material Design Kit for iOS: Developers should utilize an official or well-maintained Material Design component library for iOS (e.g., material-components-ios from Google) where possible, ensuring consistency with Material Design specifications.

* Custom Components: Clearly identify any components that are not standard Material Design and require custom implementation.

  • Platform Specifics:

* iOS Version Support: Target iOS 15+ (or specified minimum version).

* Native Features: Integrate seamlessly with native iOS features where appropriate (e.g., system share sheets, photo picker, Face ID/Touch ID for authentication).

  • State Management:

* Empty States: Wireframes for empty states (e.g., "No posts yet," "No notifications") should be designed and implemented.

* Loading States: Visual indicators for all data loading (e.g., Circular Progress Indicator for initial load, skeleton loaders for content feeds).

* Error States: Clear and user-friendly error messages for network issues, failed uploads, invalid inputs, etc.

  • Typography:

* Reference Material Design Typography guidelines. Specific font families (e.g., Roboto, though iOS typically uses San Francisco) and their usage (H1-H6, Body1, Body2, etc.) should be defined in the subsequent UI specification.

  • Color Palette:

* Primary, secondary, and accent colors, along with their usage, will be defined in the visual design phase. Adhere to Material Design's color system.

  • Spacing & Layout:

* Utilize a consistent 4pt or 8pt grid system for spacing and alignment of elements.

* Responsive layouts should primarily focus on adapting to different iOS device sizes (e.g., iPhone SE vs. iPhone Pro Max).

  • Animations & Transitions:

* Implement standard Material Design motion patterns for transitions between screens and component interactions (e.g., FAB expansion, navigation transitions).

  • Asset Export:

* Icons: Exported as SVG or high-resolution PNGs (e.g., @2x, @3x).

* Images: Optimized for web/mobile, provided in appropriate formats (JPG, PNG).


8. Next Steps & Recommendations

This wireframe kit serves as a foundational blueprint. The following steps are recommended to move forward:

  1. Stakeholder Review & Feedback: Present these wireframes to key stakeholders for review and gather feedback to ensure alignment with business goals and user needs.
  2. User Testing (Wireframe/Prototype): Conduct early-stage user testing with interactive prototypes built from these wireframes to validate user flows and identify usability issues before visual design.
  3. Visual Design & UI Specification:

* Translate these wireframes into high-fidelity mockups, applying the full Material Design visual language, color palette, and typography.

* Develop a detailed UI specification document outlining exact measurements, colors, fonts, and states for all components.

  1. Interaction Design & Micro-interactions: Define specific animations, transitions, and micro-interactions that enhance the user experience, adhering to Material Design motion principles.
  2. Technical Feasibility Assessment: Conduct a technical review with the development team to identify any potential challenges or opportunities early in the process.
  3. Content Strategy: Begin planning and drafting actual content (text, imagery) to populate the screens, ensuring it aligns with the app's tone and purpose.
  4. Clarify Design System Alignment: Revisit the Material Design on iOS strategy. If a truly native iOS feel is paramount, consider a phased approach to gradually shift towards iOS HIG where beneficial, or clearly document the Material Design adaptations.

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