Mobile App UI Designer
Run ID: 69bca9cb77c0421c0bf4a4462026-03-29Design
PantheraHive BOS
BOS Dashboard

Mobile App UI Design Concept: sharper4k (Social)

App Name: sharper4k

App Type: Social (focused on high-quality visual content)

Number of Screens: 5

Workflow Step: Generate (Step 1 of 2)


1. App Concept & Core Identity

sharper4k is envisioned as a premium social platform for visual creators – photographers, videographers, and digital artists – to showcase their highest quality work, discover inspiration, and connect with a discerning community. Unlike general social media, sharper4k prioritizes artistic integrity and technical excellence, providing a curated space where high-definition visuals truly shine. It aims to foster a professional environment for critique, collaboration, and appreciation of visual art.

Key Differentiators:

  • High-Fidelity Content: Emphasis on 4K/UHD image and video uploads.
  • Curated Community: Attracts serious creators and enthusiasts.
  • Professional Tools: Features tailored for artists (e.g., advanced metadata, structured critique).
  • Content-First Design: Minimalist UI to let visuals dominate.

2. Target Audience

  • Demographics: Primarily 18-55, global, tech-savvy.
  • Interests: Professional and serious amateur photographers, videographers, graphic designers, digital artists, art directors, curators, and enthusiasts who value high-quality visual content.
  • Needs: A platform to showcase their best work, receive constructive feedback, discover new talent, and connect with peers or potential clients in a visually rich and professional environment.

3. Overall Design Principles

  • Content-First Minimalism: The UI should be unobtrusive, allowing high-resolution images and videos to be the focal point. Whitespace (or rather, "dark space") will be generous.
  • Elegance & Professionalism: A sophisticated, refined aesthetic that reflects the quality of the content and the community. Avoid clutter and overly playful elements.
  • Intuitive & Efficient: Smooth navigation, clear hierarchy, and minimal steps for core actions (upload, view, interact).
  • High Fidelity & Performance: Optimized for displaying high-resolution media with fast loading times and smooth transitions.
  • Consistency: Uniformity in design elements, interactions, and user experience across all screens.
  • Accessibility: Consideration for diverse users, including good contrast and clear typography.

4. Color Palette

A dark theme is recommended to make high-resolution visuals pop and provide a professional, gallery-like experience.

  • Primary Background: #1A1A1A (Deep Charcoal) - Provides a sophisticated, unobtrusive canvas.
  • Secondary Background/Cards: #2B2B2B (Dark Grey) - For subtle differentiation of UI elements.
  • Accent/Primary CTA: #00BFA5 (Teal) - A vibrant yet professional color for interactive elements, highlights, and calls to action.
  • Highlight/Secondary Accent: #00E5FF (Aqua) - A brighter, complementary shade for active states, small details, or progress indicators.
  • Primary Text/Icons: #E0E0E0 (Light Grey) - High contrast for readability on dark backgrounds.
  • Secondary Text/Subtle Icons: #B0B0B0 (Medium Grey) - For less prominent information, metadata.
  • Error/Warning: #FF5252 (Red) - Standard color for alerts and errors.

5. Typography

Clean, modern sans-serif fonts that are highly readable on digital screens, especially against dark backgrounds.

  • Headings & Titles: Inter (or Montserrat, Poppins)

Weight:* Semi-bold (600) for major titles, Medium (500) for subheadings.

Purpose:* Conveys modern professionalism and clear hierarchy.

  • Body Text & Labels: Roboto (or Open Sans, Lato)

Weight:* Regular (400) for main content, Light (300) for metadata/subtle text.

Purpose:* Optimized for legibility at various sizes, ensuring a comfortable reading experience.

6. Iconography Style

  • Style: Minimalist Outline/Line Icons.
  • Characteristics:

* Consistent Stroke Weight: Ensures a cohesive and polished look.

* Geometric Shapes: Clean and modern.

* Subtle Fills: Used sparingly for active states or specific functional icons (e.g., "liked" heart icon).

* Scalable: Vector-based icons for clarity across different screen densities.

  • Color: Primarily #E0E0E0, with accent colors (#00BFA5) for active or highlighted states.

7. Interaction & Animation Principles

  • Smooth Transitions: Seamless and fluid transitions between screens and content states to enhance the premium feel.
  • Subtle Micro-interactions: Deliberate, small animations for user feedback (e.g., liking a post, saving an image, successful upload).
  • Performance-Oriented: Animations should feel fast and responsive, never hindering content loading.
  • Parallax Scrolling (Optional for detail views): To add depth and engagement when viewing high-resolution images in full-screen mode.
  • Haptic Feedback: Light vibrations for key actions (e.g., confirming an upload, long-press options) to add a tactile dimension.

8. Screen Breakdown (5 Screens)

Below are the 5 core screens, detailing their purpose, key elements, and user flow context.

8.1. Screen 1: Sharper Feed (Home)

  • Purpose: The primary content consumption screen, showcasing high-resolution photos and videos from followed creators and trending content.
  • Key Elements:

* Top Bar: "sharper4k" logo/text (left), search icon (middle), direct message icon (right).

* Content Cards: Full-width display of high-resolution images/videos.

* Creator avatar and username (top left).

* Optional title/caption overlay (subtle, bottom of content).

* Engagement icons (like, comment, save, share) and metadata (views, likes count) at the bottom.

* Option for "Critique Request" badge/icon if the creator enables it.

* Navigation Bar (Bottom): Home (active), Discover, Upload, Activity, Profile.

* Scroll Behavior: Infinite scroll for continuous content discovery.

  • User Flow Context: First screen after login/onboarding. Users browse content, interact with posts, and discover new creators.

8.2. Screen 2: My Portfolio (Profile)

  • Purpose: A creator's personal showcase, displaying their portfolio, statistics, and professional information.
  • Key Elements:

* Top Bar: User's username (center), settings icon (right).

* Header Section:

* Circular profile picture.

* Follow/Message buttons (for other users viewing).

* Follower/Following/Posts counts.

* Bio/Artist Statement.

* Optional: Link to external portfolio/website.

* Content Grid: A visually appealing grid layout (e.g., 2 or 3 columns) of the user's uploaded high-resolution works.

* Thumbnails should be crisp and high-quality.

* Optional: Tabs for "Posts," "Collections," "Critiques Received."

* Navigation Bar (Bottom): Home, Discover, Upload, Activity, Profile (active).

  • User Flow Context: Accessed via the bottom navigation bar or by tapping a creator's name/avatar from the feed. Allows users to manage their presence and showcase their work.

8.3. Screen 3: Capture & Share (Upload)

  • Purpose: Facilitates the uploading of new high-resolution visual content with options for editing and metadata.
  • Key Elements:

* Top Bar: "Cancel" (left), "New Post" (center), "Next" (right, active when content selected).

* Media Selection:

* Access to device gallery (photos & videos).

* Live camera/video capture option.

* Preview area for selected media.

* Filter/editing tools (cropping, basic color adjustments, sharpness, resolution check).

* Post Details:

* Caption input field.

* Tagging features (hashtags, other users).

* Location tagging.

* Advanced Options:

* "Enable Critique Request" toggle.

* Metadata input (camera model, lens, settings - auto-populate if EXIF data available).

* Category/Genre selection.

* Navigation Bar (Bottom): Home, Discover, Upload (active), Activity, Profile (hidden during active upload process, but implied for context).

  • User Flow Context: Initiated from the bottom navigation bar. Guides users through selecting, preparing, and publishing their high-quality work.

8.4. Screen 4: Discover & Connect (Explore)

  • Purpose: Helps users find new content, trending artists, and explore different categories of visual art.
  • Key Elements:

* Top Bar: Search bar (prominent), filter icon (right).

* Content Categories/Tags: Horizontally scrollable list of popular categories (e.g., Landscape, Portrait, Street, Abstract, Video Art).

* Featured Sections:

* "Trending Now" (grid of popular posts).

* "Featured Artists" (carousel of influential creators).

* "Sharper Picks" (curated selections by the platform).

* Discovery Grid: A dynamic grid of diverse high-resolution content, potentially grouped by theme or algorithm.

* Navigation Bar (Bottom): Home, Discover (active), Upload, Activity, Profile.

  • User Flow Context: Accessed via the bottom navigation bar. Users explore the broader community, find inspiration, and connect with new creators.

8.5. Screen 5: Activity & Critiques (Notifications)

  • Purpose: Informs users about interactions on their posts, new followers, and specific critique requests or responses.
  • Key Elements:

* Top Bar: "Activity" (center).

* Tab Navigation: "All," "Mentions," "Critiques."

* Activity Feed List:

* Chronological list of notifications.

* Each item includes: User avatar, name, action (e.g., "liked your photo," "commented on your video," "started following you").

* Thumbnail of the related post.

* Timestamp.

* Critique Section (under "Critiques" tab):

* List of posts where critique was requested, showing new feedback.

* Option to view detailed critique (potentially with annotations or structured feedback).

* Notifications for new critique requests on their own posts.

* Navigation Bar (Bottom): Home, Discover, Upload, Activity (active), Profile.

  • User Flow Context: Accessed via the bottom navigation bar. Users stay updated on their social interactions and manage feedback on their work.

9. Actionable Recommendations for Next Steps

  1. Wireframing: Begin creating low-fidelity wireframes for each of the 5 screens outlined above. Focus on element placement and user flow without detailed styling.
  2. User Flow Mapping: Create a detailed user flow diagram showing how users navigate between these 5 screens and complete key tasks (e.g., upload a photo, view a critique).
  3. Mood Board Creation: Develop a visual mood board incorporating inspiration for the proposed color palette, typography, iconography, and overall aesthetic.
  4. Competitor Analysis (UI/UX): Analyze UI/UX patterns of similar high-quality visual platforms (e.g., Behance, Dribbble, 500px, Flickr) to identify best practices and potential areas for differentiation.
  5. Refine Core Features: Based on wireframes and user flows, prioritize and refine the specific features within each screen.
  6. Accessibility Audit: Consider initial accessibility requirements for color contrast and font legibility, especially given the dark theme.

This comprehensive output provides a solid foundation for the UI design of the "sharper4k" mobile app, setting the stage for detailed design work in the next steps.

Step 2: collab

Workflow Execution Summary

The "Mobile App UI Designer" workflow (category: Design) has been successfully executed.

App Type: Social

Number of Screens: 5

App Name Generated: Collab

This document provides a comprehensive UI design specification for the "Collab" mobile application, focusing on the core 5 screens required for a social networking experience.

Overall Design Philosophy: Collab

Vision: Collab aims to be an intuitive, engaging, and modern social platform that fosters genuine connections and seamless content sharing.

Core Principles:

  • Clarity & Simplicity: Clean layouts, easy-to-understand navigation, and minimal visual clutter.
  • Engagement: Design elements that encourage interaction, content consumption, and creation.
  • Personalization: A user experience that feels tailored and relevant to each individual.
  • Accessibility: Consideration for diverse users, including clear typography, sufficient contrast, and intuitive interaction patterns.
  • Modern Aesthetic: A fresh, contemporary look with a focus on usability and visual appeal.

Color Palette (Example):

  • Primary: #6A0DAD (Deep Violet - for branding, primary CTAs)
  • Secondary: #8A2BE2 (Blue Violet - for accents, interactive elements)
  • Accent: #FFD700 (Gold - for highlights, notifications, new content)
  • Text: #2C3E50 (Dark Charcoal), #7F8C8D (Light Gray for secondary text)
  • Background: #F8F8F8 (Light Gray), #FFFFFF (Pure White for cards)

Typography (Example):

  • Headings: Poppins / Montserrat (Bold, Sans-serif)
  • Body Text: Roboto / Open Sans (Regular, Sans-serif)
  • Sizes: Varied for hierarchy (e.g., H1: 24pt, Body: 16pt, Caption: 12pt)

Core Features & Screen Mapping

The 5 screens for "Collab" are designed to cover the fundamental functionalities of a social app:

  1. Home Feed: Discover and interact with content from connections.
  2. Profile Screen: Manage personal presence and view user-generated content.
  3. Create Post Screen: Publish new text, image, or video content.
  4. Notifications Screen: Stay updated on account activity and interactions.
  5. Messages List Screen: Access and manage private conversations.

Detailed UI Design for Each Screen

1. Home Feed

  • Purpose: To present a personalized, scrollable stream of posts from followed users and communities, enabling quick consumption and interaction.
  • Key Elements:

* Top Navigation Bar:

* App Logo/Name ("Collab")

* Search Icon (magnifying glass)

* Direct Messages Icon (chat bubble)

* Content Feed:

* Individual "Post Cards" for each item.

* Each Post Card includes:

* User Profile Picture & Username (tappable)

* Timestamp

* Post Content (text, image gallery, video player)

* Interaction Bar: Like Icon (heart), Comment Icon (speech bubble), Share Icon (arrow/paper plane)

* Like Count & Comment Count

* Optional: "View all comments" link

* Bottom Navigation Bar:

* Home Icon (active state)

* Search/Explore Icon

* Create Post Icon (plus sign)

* Notifications Icon (bell)

* Profile Icon (user silhouette)

  • Layout Description:

* Fixed top navigation bar for quick access to search and messages.

* Vertically scrollable feed occupies the main screen area, displaying posts in a card-like structure.

* Each post card is clearly separated, providing ample whitespace.

* Fixed bottom navigation bar for primary app navigation, always visible.

  • User Interactions:

* Scroll: Vertically scroll through the feed; pull-to-refresh.

* Tap Profile/Username: Navigate to the user's profile.

* Tap Post Content: View full post details (if applicable, e.g., for long text or multiple images).

* Tap Interaction Icons: Like a post, open comment section, initiate sharing.

* Tap Bottom Nav Icons: Switch between main app sections.

  • Visual Style Notes:

* Clean, minimalist card design for posts.

* Prominent display of media (images/videos).

* Subtle shadows or borders for post cards to create depth.

* Clear, readable typography for usernames, timestamps, and post text.

  • Accessibility Considerations:

* Ensure sufficient contrast for text and icons.

* Provide alt-text fields for images during post creation.

* Large enough tap targets for interaction icons.

2. Profile Screen

  • Purpose: To display a user's personal information, shared content, and connections, while also allowing the user to manage their own profile.
  • Key Elements:

* Top Navigation Bar:

* Back Arrow (to previous screen, e.g., Home Feed)

* Username (centered)

* Settings/More Options Icon (three dots/hamburger menu)

* Profile Header:

* Large Circular Profile Picture

* Username & Display Name

* Bio/Status Text Area

* Follower Count, Following Count (tappable to view lists)

* "Edit Profile" Button (for own profile) / "Follow" or "Message" Button (for other users' profiles)

* Content Navigation Tabs:

* "Posts" Tab (default)

* "Media" Tab (e.g., photos, videos)

* "Saved" Tab (private, for own profile)

* Content Display Area:

* Grid view of user's posts (thumbnails, tappable to view full post).

  • Layout Description:

* Profile header prominently displays user identity.

* Tabbed navigation below the header organizes user-generated content.

* Content area dynamically changes based on selected tab, typically a grid for visual content.

  • User Interactions:

* Tap Edit Profile: Access profile editing interface.

* Tap Follower/Following Counts: View lists of followers/following.

* Tap Tabs: Switch between different content categories.

* Tap Post Thumbnails: Open the full view of a specific post.

* Tap Settings Icon: Access account settings and privacy options.

  • Visual Style Notes:

* Emphasis on the profile picture.

* Clear hierarchy for profile information.

* Consistent grid layout for content display.

* Active tab indicator should be visually distinct.

  • Accessibility Considerations:

* Ensure all interactive elements have clear labels.

* Provide options for text resizing.

3. Create Post Screen

  • Purpose: To provide a dedicated interface for users to compose and publish new text, image, or video content to their feed.
  • Key Elements:

* Top Navigation Bar:

* "Cancel" or "Close" Icon (X)

* "New Post" Title (centered)

* "Post" Button (primary call-to-action)

* Content Input Area:

* Large, multi-line Text Input Field (placeholder: "What's on your mind?")

* Attachment/Feature Icons:

* Camera Icon (to take a photo/video)

* Gallery Icon (to select from device library)

* Video Icon (specific video upload/record)

* Location Icon (to add location tag)

* Tag Friends Icon (user silhouette with plus)

* Privacy/Audience Selector: (Optional, e.g., "Public", "Friends Only")

  • Layout Description:

* Input field dominates the screen, providing ample space for content creation.

* Actionable icons are neatly arranged below the input field.

* "Post" button is clearly visible and activated once content is present.

  • User Interactions:

* Type Text: Enter post content.

* Tap Attachment Icons: Open camera, gallery, or other relevant selectors.

* Tap Privacy Selector: Choose audience for the post.

* Tap "Post" Button: Publish the content.

* Tap "Cancel": Discard the draft and return to the previous screen.

  • Visual Style Notes:

* Minimalist design to reduce distractions.

* Clear, intuitive icons for attachments.

* "Post" button should be a prominent primary color when active.

  • Accessibility Considerations:

* Input fields should have clear focus states.

* All icons should have descriptive labels (e.g., via tooltips or accessibility text).

4. Notifications Screen

  • Purpose: To inform users about recent activities related to their account, such as likes, comments, new followers, and mentions.
  • Key Elements:

* Top Navigation Bar:

* "Activity" or "Notifications" Title (centered)

* Notification List:

* Individual "Notification Items"

* Each item includes:

* User Profile Picture (of the interacting user)

* Descriptive Text (e.g., "John Doe liked your post," "Jane Smith started following you," "Mike commented on your photo: 'Great shot!'")

* Timestamp (e.g., "2m ago," "yesterday")

* Optional: Small Thumbnail of the related post/content

* Optional: "Follow Back" button for new followers

  • Layout Description:

* A simple, vertically scrollable list of notification items, typically ordered chronologically (newest first).

* Each item is a distinct row, easy to scan.

  • User Interactions:

* Scroll: Browse through past notifications.

* Tap Notification Item: Navigate to the related content (e.g., the post that was liked, the profile of the new follower, the comment thread).

* Tap "Follow Back": Initiate following the new user.

  • Visual Style Notes:

* Clear visual distinction between read and unread notifications (e.g., a subtle background color for unread).

* Concise and informative notification text.

* Consistency in the layout of each notification item.

  • Accessibility Considerations:

* Sufficient contrast for text, especially for timestamps.

* Clear indication of interactive elements.

5. Messages List Screen

  • Purpose: To display a list of ongoing direct message conversations, allowing users to quickly access and manage their private chats.
  • Key Elements:

* Top Navigation Bar:

* "Messages" Title (centered)

* New Message Icon (pencil and paper, or plus in a chat bubble)

* Search Bar: To find specific conversations or contacts.

* Conversation List:

* Individual "Chat Thread Items"

* Each item includes:

* Sender Profile Picture

* Sender Name (or Group Name)

* Preview of the Last Message

* Timestamp of the Last Message

* Unread Message Indicator (e.g., a badge with count, or bold text)

  • Layout Description:

* Fixed top navigation bar and search bar.

* Main area is a vertically scrollable list of chat threads.

* Each chat thread is a distinct row, providing a summary of the conversation.

  • User Interactions:

* Scroll: Browse through conversation history.

* Tap Chat Thread Item: Open the specific conversation (leads to a hypothetical "Conversation View" screen).

* Tap New Message Icon: Start a new direct message conversation.

* Tap Search Bar: Filter conversations or search for contacts.

  • Visual Style Notes:

* Clean, list-based design.

* Clear visual cues for unread messages.

* Profile pictures help quickly identify senders.

  • Accessibility Considerations:

* Clear focus states for the search bar and chat items.

* Sufficient space between chat items to prevent accidental taps.

Navigation Flow

The primary navigation of Collab is managed by a persistent Bottom Navigation Bar present on the Home Feed, Search/Explore (implied), Notifications, and Profile screens.

  • Home Feed: Default landing screen.

From Home Feed:* Tap Search -> Search/Explore (hypothetical). Tap Create Post -> Create Post Screen. Tap Notifications -> Notifications Screen. Tap Profile -> Profile Screen. Tap Message Icon -> Messages List Screen.

  • Profile Screen: Accessible from Home Feed (via bottom nav or tapping username/profile pic) or Notifications.

From Profile Screen:* Tap Back -> Previous screen. Tap Settings -> Settings menu (hypothetical).

  • Create Post Screen: Accessible from Home Feed (via bottom nav).

From Create Post Screen:* Tap Post -> Returns to Home Feed (post is published). Tap Cancel -> Returns to Home Feed.

  • Notifications Screen: Accessible from Home Feed (via bottom nav).

From Notifications Screen:* Tap notification item -> Related post/profile (could lead to Home Feed, Profile, or a specific Post Detail screen).

  • Messages List Screen: Accessible from Home Feed (via top nav).

From Messages List Screen:* Tap New Message Icon -> New Chat Composer (hypothetical). Tap a chat thread -> Conversation View (hypothetical).

Recommended UI Kit/Design System Elements

To ensure consistency and accelerate development, the following common UI components should be part of Collab's design system:

  • Typography System: Defined font families, sizes, weights, and line heights.
  • Color Palette: Primary, secondary, accent, success, warning, error, and neutral colors.
  • Iconography Set: Consistent style for all icons (e.g., filled, outlined, duotone).
  • Buttons: Primary, secondary, ghost, and icon-only buttons with defined states (hover, active, disabled).
  • Input Fields: Text inputs, search bars, text areas with clear focus and error states.
  • Cards: Standardized card component for posts, notifications, and chat items.
  • Navigation Bars: Top App Bar and Bottom Navigation Bar components.
  • Avatars/Profile Pictures: Standardized circular image component.
  • Loaders/Spinners: For indicating ongoing processes.
  • Toasts/Snackbars: For transient messages (e.g., "Post created successfully").
  • Modals/Dialogs: For critical actions or additional information (e.g., "Are you sure you want to delete?").

Next Steps & Recommendations

  1. Wireframing & Low-Fidelity Prototyping: Create basic wireframes for each screen and link them to establish the user flow. This helps in validating the layout and navigation logic.
  2. High-Fidelity UI Design: Translate these specifications into detailed visual designs using a UI design tool (e.g., Figma, Sketch, Adobe XD). Apply the defined color palette, typography, and iconography.
  3. Interactive Prototyping: Build an interactive prototype to simulate the user experience, allowing for testing and feedback.
  4. User Testing: Conduct usability testing with target users to gather feedback on the design, identify pain points, and iterate on improvements.
  5. Accessibility Audit: Perform a detailed review to ensure the UI meets accessibility standards (WCAG guidelines).
  6. Developer Handoff: Prepare detailed design specifications, asset exports, and a style guide for the development team.
  7. Consider Additional Screens: As the app evolves, plan for screens like "Search Results," "Post Details," "Settings," "Onboarding," and the "Conversation View" for direct messages.
mobile_app_ui_designer.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);}});}