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

Mobile App UI Design Concept: sharper4k

App Name: sharper4k

App Type: Social

Number of Screens: 5

Tagline: See the world in sharper detail.

1. App Concept & Core Functionality

sharper4k is envisioned as a premium social media platform specifically designed for photographers, videographers, and visual artists who prioritize sharing and experiencing high-resolution photography and 4K video content. It aims to be a curated space where visual fidelity, artistic expression, and a supportive community for creators take precedence over fleeting trends.

Core Value Proposition:

  • Uncompromised Quality: Support for minimal compression, ensuring visuals are displayed as intended by the creator.
  • Immersive Experience: A clean, minimalist UI that puts content first, offering an unparalleled viewing experience.
  • Creator-Centric Tools: Features designed to empower artists, from rich profile portfolios to detailed metadata display.
  • Curated Discovery: Intelligent and human-curated feeds to help users discover high-quality content and artists.

Target Audience:

  • Professional and aspiring photographers, videographers, and digital artists.
  • Content enthusiasts who appreciate and seek out high-quality visual media.
  • Individuals looking for a visually rich and inspiring social community.
  • Brands and agencies seeking to showcase their high-fidelity visual campaigns.

Key UI/UX Principles:

  • Content-First Design: UI elements are subtle and recede, allowing visuals to dominate.
  • Dark Mode Native: A sophisticated dark theme to enhance visual contrast and reduce eye strain.
  • Intuitive Navigation: Streamlined user flows and clear calls to action.
  • Performance & Responsiveness: Optimized for smooth media loading and fluid interactions.
  • Accessibility: Consideration for diverse user needs, including high contrast and clear typography.

2. Branding Elements

2.1. Logo Concept

The sharper4k logo will be a modern, minimalist emblem that subtly combines the concept of a camera lens aperture or a pixel with the letter 'S' or '4'.

  • Visual Elements: A stylized, geometric 'S' or '4' that could also represent a camera shutter blade or a sharp, perfect pixel. The design should convey precision, clarity, and visual excellence.
  • Wordmark: A clean, contemporary sans-serif typeface (e.g., Montserrat or Inter) for the "sharper4k" text, maintaining a sleek and professional aesthetic.
  • Color Use: Primarily monochromatic (white or light gray on dark backgrounds) or a subtle, sophisticated gradient (e.g., deep blue to violet) to signify premium quality.

2.2. Color Palette

A deep, dark-themed palette designed to make vibrant visuals pop, accented by subtle yet elegant interactive colors.

  • Primary Background: #1A1A2E (Deep Indigo) - The main canvas for content, providing a rich, immersive backdrop.
  • Secondary Background: #2C2C42 (Dark Slate Gray) - Used for cards, modals, and distinct UI sections to create depth.
  • Accent Color 1 (Primary Interaction): #E0BBE4 (Soft Lavender) - For primary buttons, active states, and highlights, offering a touch of elegance.
  • Accent Color 2 (Secondary Interaction): #957DAD (Muted Purple) - For secondary actions, subtle indicators, and less prominent interactive elements.
  • Primary Text Color: #F0F0F0 (Off-White) - Ensures high readability against dark backgrounds.
  • Secondary Text Color: #B0B0B0 (Light Gray) - For metadata, captions, and less critical information.
  • Success Indicator: #6FCF97 (Soft Green)
  • Error/Warning Indicator: #FF6B6B (Vibrant Red)

2.3. Typography

A selection of modern sans-serif fonts chosen for legibility, versatility, and a clean, professional appearance.

  • Headings (H1, H2, H3): Montserrat Bold / Semi-Bold - Used for prominent titles and section headers, providing strong visual hierarchy.
  • Body Text & UI Elements: Inter Regular / Medium - Highly optimized for screen readability, used for paragraphs, labels, and general UI text.
  • Captions & Metadata: Inter Light / Regular (smaller font size) - For detailed information that supports the primary content without distracting from it.

2.4. Iconography Style

  • Style: Minimalist, line-based, and consistent throughout the application. Icons should be clear, universally recognizable, and complement the clean UI.
  • Weight: Medium stroke weight to ensure visibility on dark backgrounds.
  • Color: Primarily off-white (#F0F0F0) for inactive states, transitioning to the primary accent color (#E0BBE4) for active or interactive states.
  • Consistency: All icons should adhere to a unified aesthetic (e.g., rounded corners or sharp corners).

3. Screen Breakdown (5 Screens)

3.1. Screen 1: Home Feed (Immersive Discovery)

  • Purpose: The primary content consumption screen, offering an endless, high-fidelity stream of photos and 4K videos from followed creators and curated channels.
  • Layout: Content-first, full-width media display.

* Top Bar: Minimalist, transparent or semi-transparent.

* sharper4k logo (left).

* Search icon (right) for quick discovery.

* Upload icon (right) for new posts.

* Content Cards: Each post takes up significant vertical space, with the media (photo/video) being the dominant element.

* Overlayed Info (subtle, fade-in/out on tap): Creator's profile picture & username (top left), post title/short caption (bottom left).

* Interaction Bar (bottom of media, subtle): Like, Comment, Share, Bookmark icons. These can be semi-transparent or appear on interaction.

* Video Specifics: Muted auto-play, tap to unmute and expand controls.

* Bottom Navigation Bar: Persistent navigation with icons for Home (active), Explore, Upload (central, prominent), Notifications, Profile.

  • User Flow: Default landing screen. Users scroll vertically to discover new content. Tapping on media provides an immersive full-screen view.

3.2. Screen 2: Explore (Curated Discovery & Trends)

  • Purpose: To facilitate discovery of new artists, trending content, specific categories, and challenges.
  • Layout: Organized content sections with a clear search functionality.

* Top Bar: "Explore" title (left). Prominent, full-width search bar for tags, users, or keywords.

* Content Sections:

* Trending Now: Horizontal scrollable carousel of the most popular photos/videos.

* Categories: A grid or list of visually rich categories (e.g., Landscape, Portrait, Street, Abstract, Nature, Cinematography), each with a representative thumbnail. Tapping leads to a category-specific feed.

* Featured Artists: A horizontal scrollable list of recommended creators, with their profile picture and name.

* Weekly Challenges: Card-based display of ongoing photography/videography challenges or contests.

* "For You" Recommendations: Algorithmically generated content suggestions based on user preferences.

* Bottom Navigation Bar: Same as Home Feed, with "Explore" in active state.

  • User Flow: Users navigate here to find new inspiration, specific types of content, or engage in community challenges.

3.3. Screen 3: Upload/Create Post (Streamlined Submission)

  • Purpose: To guide users through the process of uploading high-resolution photos or 4K videos and adding relevant details.
  • Layout: A multi-step, intuitive form focused on media first.

* Top Bar: "New Post" title (centered). "Cancel" (left), "Next" (right, enabled after media selection).

* Media Selection:

* Large central area for "Select from Gallery" or "Open Camera/Video."

* Thumbnail previews of recently taken photos/videos from the device's gallery at the bottom.

* Media Preview & Basic Editing (after selection, before "Next"):

* Full-screen preview of selected media.

* Basic tools: Crop/Rotate (for images), Trim (for videos). No heavy filters to preserve quality.

* Add Details Screen (after "Next"):

* Title Input: Concise title for the post.

* Caption Input: Detailed description, story behind the shot.

* Tags/Keywords: Input field with auto-suggestions.

* Location Tagging: Optional.

* Gear Used: Input fields for Camera Model, Lens, ISO, Aperture, Shutter Speed (pre-fill from EXIF data if available).

* Privacy Settings: Toggle for Public/Private.

* "Publish" Button: Prominent call to action at the bottom.

  • User Flow: Initiated from the Home Feed or Explore screen. Designed to be efficient for creators to share their work.

3.4. Screen 4: User Profile (Creator Portfolio)

  • Purpose: To serve as a digital portfolio for creators, showcasing their work and providing personal information.
  • Layout: A clean, organized profile with distinct sections for content and information.

* Top Bar: User's Username (centered). Settings icon (right) for account management. Share Profile icon (right).

* Profile Header:

* Large circular profile picture.

* Username & Display Name.

* Follow/Message Button (for other users viewing this profile).

* Short Bio/Artist Statement.

* Follower/Following counts.

* Optional link to personal website/portfolio.

* Content Tabs:

* Posts (Default): A clean grid of uploaded photos/video thumbnails.

* Saved: Grid of bookmarked content.

* Collections: User-curated albums or themed folders.

* About: Detailed bio, gear list, awards, contact info.

* Content Grid: Tapping a thumbnail opens the full Post Details screen.

* Bottom Navigation Bar: Same as Home Feed, with "Profile" in active state.

  • User Flow: Users visit their own profile to manage content and settings, or visit others' profiles to explore their work.

3.5. Screen 5: Post Details / Full View (Immersive Content Deep Dive)

  • Purpose: To provide an immersive, full-screen view of a single piece of media with all associated details and interaction options.
  • Layout: Media-centric with overlayed information that can be toggled.

* Top Bar: Back button (left) to return to the previous screen. Options menu (right, e.g., Report, Share to external, Download if creator allows).

* Media Display: Dominant full-screen photo or 4K video.

* Video Controls: Subtle overlay that fades out when not in use.

* Zoom/Pan: Pinch-to-zoom for photos.

* Overlayed Information (can be revealed/hidden by a single tap on media):

* Creator's profile picture, username, and "Follow" button (top left).

* Post Title (prominent, below media).

* Caption/Description (scrollable if long).

* Interaction Bar: Like, Comment, Share, Bookmark icons (persistent at bottom or as a floating action button).

* Comments Section: Display of existing comments, with an input field to add new comments.

* Detailed Metadata: Expandable section for Camera, Lens, Settings (ISO, Aperture, Shutter Speed), Location, Tags.

* Related Content (optional, at very bottom): A small horizontal carousel of similar posts from the same artist or category.

  • User Flow: Accessed by tapping on any post thumbnail from the Home Feed, Explore, or a User Profile. This is the screen for deep engagement and detailed content review.

4. Interaction & Animation Concepts

  • Fluid Transitions: Smooth, subtle fades and slides between screens to create a seamless user experience.
  • Hero Animations: When tapping a thumbnail, the image/video should smoothly expand to fill the screen in the Post Details view.
  • Interactive Feedback:

* Likes: A small, delightful animation (e.g., heart icon growing/shrinking, subtle particle burst) when a post is liked.

* Pull-to-Refresh: Standard iOS/Android pull-down animation for refreshing feeds.

  • Content Overlay Control: A single tap on any media in the Home Feed or Post Details view should toggle the visibility of UI overlays (user info, caption, interaction bar) to allow for full immersion.
  • Video Playback: Muted auto-play in feeds, with a clear tap target to unmute and access full controls.
  • Scroll-Driven Effects: Parallax scrolling for hero images in profiles or subtle depth effects for content cards.

5. Monetization Strategy (Brief)

  • Premium Creator Subscriptions: Offer advanced features such as enhanced analytics, higher storage/upload limits for original files, advanced portfolio customization, priority support, and an ad-free experience.
  • Curated Content Promotion: Allow creators to pay to promote their work to specific target audiences or within curated sections of the "Explore" page.
  • Brand Partnerships & Sponsored Challenges: Collaborate with camera manufacturers, lens brands, and photography accessory companies for sponsored content, exclusive challenges, or product showcases.
  • Print/Digital Asset Marketplace (Future): Integrate a seamless marketplace allowing creators to sell high-quality prints or digital licenses of their work directly through their profiles, with sharper4k taking a commission.

6. Future Considerations & Next Steps

  • Detailed Wireframing: Develop low-fidelity wireframes for each screen to solidify layout and information architecture.
  • High-Fidelity Mockups: Create pixel-perfect visual designs based on the defined branding elements and color palette.
  • Interactive Prototyping: Build clickable prototypes to simulate user flows and test interactions.
  • User Testing: Conduct usability tests with target users to gather feedback and iterate on the design.
  • Content Moderation Strategy: Develop robust guidelines and tools to maintain the high quality and integrity of shared content.
  • Accessibility Audit: Ensure the final UI design meets accessibility standards for users with diverse needs.
  • Performance Benchmarking: Given the focus on high-resolution media, rigorous testing and optimization for loading times and smooth playback will be critical.
  • Backend Integration Planning: Consider how the UI elements will map to backend data structures for efficient content delivery and user management.
Step 2: collab

As a professional AI assistant within PantheraHive, I have executed the "Mobile App UI Designer" workflow.

Workflow Execution Summary

  • Workflow: Mobile App UI Designer
  • Category: Design
  • App Name: collab
  • App Type: Social
  • Number of Screens: 5
  • Objective: To provide a comprehensive UI design concept, including branding, core features, and conceptual wireframes for a 5-screen social media application named "collab."

1. App Concept: "collab"

"collab" is envisioned as a modern social media application designed to foster community, shared interests, and collaborative content creation. The app aims to provide a platform where users can connect, share their experiences, and discover new ideas and people in a clean, intuitive, and engaging environment. The name "collab" emphasizes the core idea of collaboration and community interaction.

Core Features

  • Personalized Feed: A dynamic stream of content from connections and relevant communities.
  • Content Creation: Easy tools for sharing text, photos, and short videos.
  • User Profiles: Customizable profiles showcasing user activity and connections.
  • Discovery & Search: Features to explore new content, trends, users, and communities.
  • Engagement: Liking, commenting, and sharing functionalities to foster interaction.

2. Target Audience

  • Demographics: Primarily Gen Z and Millennials (16-35 years old), but designed to be accessible to a broader audience interested in digital social interaction.
  • Interests: Individuals passionate about sharing their lives, creative expression, discovering new trends, connecting with like-minded people, and participating in online communities.
  • Needs: A platform that is easy to use, visually appealing, secure, and offers meaningful connections beyond superficial interactions.

3. Branding & Style Guide (High-Level)

3.1. Logo Concept

  • Concept: A minimalist, modern logo that subtly represents connection, community, and sharing. Could involve intertwined shapes, abstract speech bubbles, or a stylized "C" that suggests collaboration.
  • Example Idea: Two overlapping, slightly transparent circles or speech bubbles forming a new shape in the center, conveying interaction and shared space.

3.2. Color Palette

The chosen palette aims for a fresh, inviting, and trustworthy feel, suitable for a social platform.

  • Primary Color: #4A90E2 (Vibrant Blue) - Represents trust, communication, and community.
  • Secondary Color: #50E3C2 (Aqua Green) - Adds a touch of freshness, creativity, and balance.
  • Accent Color: #F5A623 (Warm Orange) - Used for call-to-action buttons, notifications, and highlights, adding energy and visibility.
  • Neutral Palette:

* #2C3E50 (Dark Charcoal) - For primary text, headings.

* #7F8C8D (Medium Gray) - For secondary text, borders, subtle UI elements.

* #ECF0F1 (Light Gray) - For backgrounds, separators.

* #FFFFFF (White) - For card backgrounds, primary content areas.

3.3. Typography

  • Primary Font (Headings & UI Elements): Montserrat (or similar clean sans-serif like Poppins, Lato)

* Rationale: Modern, geometric, highly readable, and versatile.

  • Secondary Font (Body Text): Open Sans (or similar highly readable sans-serif like Roboto, Noto Sans)

* Rationale: Excellent readability at various sizes, friendly, and neutral.

3.4. Iconography Style

  • Style: Line icons (stroke icons) with a consistent weight and rounded corners.
  • Appearance: Clean, simple, easily recognizable, and scalable.
  • Example: A heart icon for 'like', a speech bubble for 'comment', a magnifying glass for 'search'.

3.5. Overall Aesthetic

  • Clean & Minimalist: Emphasize content with ample white space.
  • Intuitive: Clear navigation and predictable interactions.
  • Engaging: Use of vibrant accent colors for key actions and visual hierarchy.
  • Modern: Flat design principles with subtle shadows for depth where necessary (e.g., floating action buttons, cards).

4. Screen Breakdown & Conceptual Wireframes

This section outlines the 5 core screens for "collab," detailing their purpose, key UI elements, and user flow.

4.1. Screen 1: Onboarding & Authentication

  • Purpose: To introduce new users to "collab" and facilitate account creation or login for existing users.
  • Key UI Elements:

* App Logo/Brand Name

* Catchy tagline/value proposition

* Primary Call-to-Action (CTA) buttons: "Sign Up," "Log In"

* Social Login options: "Continue with Google," "Continue with Apple," "Continue with Facebook"

* Login Form: Email/Username input, Password input, "Forgot Password?" link, "Log In" button.

* Sign Up Form: Email input, Username input, Password input, "Sign Up" button, "Terms & Privacy" link.

  • User Flow:

1. User opens app.

2. Presented with welcome screen and options to "Sign Up" or "Log In."

3. If "Sign Up," user fills out form or uses social login.

4. If "Log In," user fills out form.

5. Upon successful authentication, user is directed to the Home Feed.

  • Conceptual Layout:

* Top: Centered app logo and name.

* Middle: A concise welcome message or visual illustration.

* Bottom: Prominent "Sign Up" button, followed by "Log In" button. Below these, a clear separator ("Or") and icons/buttons for social login options. Login/Signup forms appear as overlays or dedicated screens accessible from the initial options.

4.2. Screen 2: Home Feed

  • Purpose: To display a personalized, scrollable feed of content from users and communities the user follows. This is the primary engagement screen.
  • Key UI Elements:

* Header: App logo (left), Search icon (right), Notification bell icon (right, with badge for unread notifications).

* Content Cards: Each card represents a post, including:

* User Avatar & Username (tappable to profile)

* Timestamp

* Post Content (image/video/text)

* Like button (heart icon), Comment button (speech bubble), Share button (arrow icon)

* Like count & first few comments.

* Floating Action Button (FAB): Centered at the bottom, for "Create New Post."

* Bottom Navigation Bar: Icons for "Home" (active), "Discovery," "Create" (often integrated with FAB), "Profile."

  • User Flow:

1. After login, user lands on Home Feed.

2. User scrolls through posts.

3. User can tap on posts, profiles, or icons to interact.

4. Tapping FAB initiates new post creation.

5. Tapping bottom nav icons navigates to other core sections.

  • Conceptual Layout:

* Top Bar: Fixed header with branding and utility icons.

* Main Area: Vertically scrollable list of content cards, each card clearly separated and containing all post-related information and actions.

* Bottom Bar: Fixed navigation bar with 4-5 core tabs, including a central FAB.

4.3. Screen 3: Create Post

  • Purpose: To allow users to easily upload and share new content (text, images, videos) with the "collab" community.
  • Key UI Elements:

* Header: "Cancel" button (left), "Post" button (right, initially disabled until content is added).

* Content Input Area: Large text field for captions/status updates.

* Media Picker: Icons for "Add Photo/Video" (gallery access), "Take Photo" (camera access).

* Optional Enhancements:

* Location tag button.

* Tag friends button.

* Privacy settings dropdown (e.g., Public, Friends Only).

* Community/Topic selection.

* Preview Area: A small thumbnail or preview of selected media.

  • User Flow:

1. User taps "Create Post" FAB or bottom nav icon.

2. User enters text, selects media from gallery, or takes a new photo/video.

3. User can add optional details (location, tags, privacy).

4. User taps "Post" to share the content.

5. Upon successful posting, user is typically returned to the Home Feed.

  • Conceptual Layout:

* Top Bar: Header with "Cancel" and "Post" actions.

* Main Area: A large, prominent text input field at the top. Below that, a row of icons for adding media (gallery, camera). If media is selected, a preview area appears. Further down, optional settings like location, tags, and privacy.

4.4. Screen 4: User Profile (Self)

  • Purpose: To display the logged-in user's personal profile, showcasing their shared content, connections, and personal information.
  • Key UI Elements:

* Header: "Settings" icon (right), potentially "Share Profile" icon.

* Profile Header Area:

* Large Profile Picture.

* Username.

* "Edit Profile" button.

* Short Bio/Description.

* Follower/Following counts (tappable to view lists).

* Content Display: Tabs or segmented controls for "Posts," "Saved," "Collaborations" (or other relevant categories).

* Grid or list view of the user's uploaded content.

* Bottom Navigation Bar (as per Home Feed).

  • User Flow:

1. User taps "Profile" icon in the bottom navigation.

2. User views their profile, can tap "Edit Profile" to modify details.

3. User can tap on their posts to view them in detail.

4. User can navigate between different content categories via tabs.

  • Conceptual Layout:

* Top Bar: Fixed header with settings/utility icons.

* Upper Section: Profile picture, username, bio, and follower/following stats, "Edit Profile" button.

* Middle Section: Horizontal tabs for filtering content (e.g., Posts, Saved).

* Lower Section: A scrollable grid or list of the user's content based on the active tab.

* Bottom Bar: Fixed navigation bar.

4.5. Screen 5: Discovery / Search

  • Purpose: To help users find new content, trending topics, other users, and communities within "collab."
  • Key UI Elements:

* Header: Prominent Search Bar (with placeholder text like "Search collab...").

* Trending Section: Carousel or grid of trending topics, hashtags, or popular posts.

* Suggested Users/Communities: Cards or list items for recommended accounts/groups to follow.

* Categories/Interests: Visual representation of different content categories (e.g., Art, Music, Travel, Tech).

* Recent Searches: A list of the user's recent search queries.

* Bottom Navigation Bar (as per Home Feed).

  • User Flow:

1. User taps "Discovery" icon in the bottom navigation.

2. User can type into the search bar to find specific content or users.

3. User can browse trending topics or suggested profiles.

4. Tapping on a search result, trend, or suggested profile navigates to the relevant content/profile page.

  • Conceptual Layout:

* Top Bar: Fixed header containing the full-width search bar.

* Main Area: Vertically scrollable content divided into sections: "Trending Now," "Suggested for You," "Explore Categories," etc. Each section would have its own layout (e.g., horizontal carousels for trends, vertical lists for suggestions, grids for categories).

* Bottom Bar: Fixed navigation bar.


5. Key UI/UX Considerations

5.1. Navigation & Information Architecture

  • Bottom Navigation Bar: Essential for primary app navigation (Home, Discovery, Create, Profile). Consistent icons and clear labels.
  • In-App Navigation: Clear back buttons (<) for hierarchical navigation. Contextual menus (e.g., ... for post options).
  • Consistency: Maintain consistent placement of interactive elements (e.g., like/comment buttons, settings icons).

5.2. Interactions & Animations

  • Micro-interactions: Subtle animations for likes, comments, and button taps to provide feedback and delight users.
  • Transitions: Smooth screen transitions (e.g., slide-in/out, fade) to make the app feel fluid and responsive.
  • Haptic Feedback: Consider subtle vibrations for key actions (e.g., long-press, successful post).

5.3. Accessibility

  • Color Contrast: Ensure sufficient contrast between text and background colors for readability (WCAG guidelines).
  • Text Sizing: Support dynamic text sizing for users with visual impairments.
  • Descriptive Labels: Provide clear and concise labels for all interactive elements for screen readers.
  • Touch Target Size: Ensure all tappable elements meet minimum recommended touch target sizes (e.g., 44x44 dp/pt).

5.4. Future Enhancements (Beyond 5 Screens)

  • Direct Messaging/Chat: Allow users to communicate privately.
  • Group/Community Features: Dedicated spaces for specific interests.
  • Live Streaming: Enable real-time content sharing.
  • Monetization: Explore options like premium features (e.g., ad-free experience, advanced analytics), virtual goods, or integrated e-commerce for creators.
  • Analytics: In-app insights for content creators.

6. Actionable Recommendations & Next Steps

  1. Detailed Wireframing: Develop low-fidelity wireframes for each screen, mapping out all UI elements and their hierarchy.
  2. User Flows: Create comprehensive user flow diagrams to illustrate how users navigate between screens and complete key tasks.
  3. High-Fidelity Mockups: Translate the conceptual designs into high-fidelity mockups using the defined branding, color palette, and typography.
  4. Prototyping: Build interactive prototypes to simulate the app's functionality and user experience.
  5. User Testing (Early Stage): Conduct usability testing with target users using prototypes to gather feedback and iterate on the design.
  6. Technical Feasibility Assessment: Collaborate with development teams to ensure the proposed UI/UX is technically achievable within project constraints.
  7. Icon & Asset Creation: Develop all necessary icons, illustrations, and other graphic assets.

Disclaimer

This document provides a conceptual UI design and high-level recommendations for the "collab" mobile application based on the provided inputs. Further detailed design, user research, and technical considerations will be required to bring this concept to a fully functional product. This output serves as a foundational guide for the next stages of UI/UX development.

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