HyperFlow / docs /ui_design_plan.md
Gaurav711's picture
deploy: revert to 733e96b
d491dc1
|
Raw
History Blame Contribute Delete
20.5 kB

HyperFlow 3.0 β€” UI / UX Design Master Plan

This is the FRONTEND / DESIGN plan. Backend plan lives in implementation_plan.md β€” do not merge.


1. What Makes Us Different

Feature Swiggy Zomato Blinkit HyperFlow
ETA display Static estimate Static estimate Countdown timer Live ML-smoothed ETA with confidence band
Restaurant cards Rating + time Rating + time N/A Fraud score + SLA confidence + AI pick badge
Search Text + voice Text + voice + image Text Natural language + dietary constraint parser
Nutrition None None None Live macro tracker as you add items
Group order Basic Basic None Multi-person dietary constraint solver
Membership Swiggy One Zomato Gold None HyperFlow Pro β€” AI-powered benefits
Dark mode Yes Yes No Default dark, glassmorphism throughout
Personalization Order history Order history Order history ML demand forecast + predictive reorder
Order tracking Map + steps Map + steps Dark store map Live rider on real map + ML ETA smoother

2. WOW Factors Extracted (Best of All 3 Apps)

From Swiggy

  • πŸ”₯ Floating persistent cart bar (always visible, swipe-up to expand)
  • πŸ”₯ "Trending near you" real-time section
  • πŸ”₯ Instamart 10-min promise with live countdown
  • πŸ”₯ Live rider tracking with animated scooter on map
  • πŸ”₯ Smart search returning dish-level results (not just restaurant)
  • πŸ”₯ "Your usual?" quick reorder strip
  • πŸ”₯ Schedule for later (dinner booking flow)

From Zomato

  • πŸ”₯ Blinking urgency indicators (X people viewing this restaurant)
  • πŸ”₯ Collections curated by personality ("Date Night", "Healthy Eats", "Late Night")
  • πŸ”₯ Food diary / nutrition log per order
  • πŸ”₯ "Trending this week in [City]" social proof strip
  • πŸ”₯ Photo-rich reviews with dish tagging
  • πŸ”₯ Gold benefits stack display (how much saved this month)

From Blinkit

  • πŸ”₯ 10-minute delivery countdown WITH dark store distance visualization
  • πŸ”₯ "Running low?" smart pantry suggestions
  • πŸ”₯ Scan-to-search (camera opens, scans barcode)
  • πŸ”₯ Category speed tiles (Meds, Grocery, Electronics β€” all sub-10min)
  • πŸ”₯ Price drop alerts

HyperFlow-Only Additions (no one has these)

  • ⚑ AI Confidence Badge β€” every restaurant card shows ML SLA confidence %
  • ⚑ Live Macro Ring β€” circular progress ring in cart showing protein/carb/fat as you add
  • ⚑ Surge Detector β€” "Prices may be 12% higher than usual right now β€” order in 20 min for best rate"
  • ⚑ Group Solve β€” enter dietary constraints for all people β†’ AI filters to dishes everyone can eat
  • ⚑ Inventory Intelligence β€” "Stock running low at this store" warnings from Tobit model
  • ⚑ Combined Evening β€” single flow: book a table + order dessert delivery to arrive when you get home
  • ⚑ Carbon Score β€” CO2 estimate per order, green alternatives shown
  • ⚑ Fraud Shield Badge β€” on delivery: "Your rider is verified βœ“ | Payment secured βœ“"

3. Design System (Stitch Tokens)

Brand:       HyperFlow
Mode:        DARK (default, light optional)
Font:        INTER (headings), JetBrains Mono (metrics only)
Roundness:   ROUND_EIGHT (8px radius β€” modern, not bubbly)
Saturation:  3 (vibrant but not neon)

Colors:
  --hf-primary:    #6C63FF   Electric Violet  (CTAs, active states)
  --hf-accent:     #00D4AA   Emerald Teal     (live indicators, success)
  --hf-danger:     #FF4757   Alert Red        (fraud, SLA breach, urgent)
  --hf-warn:       #FFB347   Amber            (surge, low stock)
  --hf-surface-0:  #0A0A0F   Near Black       (page background)
  --hf-surface-1:  #12121A   Card background
  --hf-surface-2:  #1A1A26   Elevated card
  --hf-glass:      rgba(255,255,255,0.05) + backdrop-blur(20px)
  --hf-border:     rgba(255,255,255,0.08)
  --hf-text-1:     #FFFFFF   Primary text
  --hf-text-2:     #A0A0B8   Secondary text
  --hf-text-3:     #606075   Muted text

Gradients:
  --grad-hero:     linear-gradient(135deg, #6C63FF 0%, #00D4AA 100%)
  --grad-card:     linear-gradient(180deg, rgba(108,99,255,0.15) 0%, transparent 100%)
  --grad-danger:   linear-gradient(135deg, #FF4757 0%, #FF6B35 100%)

Animations:
  --ease-smooth:   cubic-bezier(0.23, 1, 0.32, 1)   (all transitions)
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1) (micro-interactions)
  Duration fast:   150ms
  Duration normal: 300ms
  Duration slow:   500ms

4. App Structure β€” All Screens

Bottom Navigation (5 tabs, always visible)

🏠 Home  |  πŸ” Search  |  ⚑ Quick  |  πŸ“¦ Orders  |  πŸ‘€ Profile

Screen 1: Splash / Onboarding

Layout: Full-screen gradient (#6C63FF β†’ #00D4AA) + animated HyperFlow logo

  • Logo: "HF" monogram, particle explosion on load
  • Tagline: "Smarter Food. Faster Everything."
  • 3-slide onboarding: Food β†’ Grocery β†’ Dineout, each with Lottie animation
  • "Continue with Phone" button (violet CTA)
  • Swiggy OAuth happens here silently in background

Screen 2: Home Feed

Layout: Scrollable feed, sticky top bar, floating cart

Section A β€” Top Bar (sticky)

[HF logo]  [Bhubaneswar β–Ό]  [πŸ”” bell]  [avatar]
[Search bar β€” "Biriyani, groceries, restaurants..."]
  • Location pill: tap to change address (shows saved addresses from MCP)
  • Search bar: glassmorphism card, placeholder rotates between 4 suggestions
  • Bell: shows order status badge when active

Section B β€” Live Status Strip (only when order active)

[πŸ›΅ animated scooter] Your Biryani is 4 min away β€” ETA 9:32pm [Track β†’]
  • Full-width violet bar, pulsing animation, slides in from top

Section C β€” Hero Banner

  • 3-card horizontal carousel, auto-advances every 4s
  • Card 1: "10-min grocery delivery" β†’ links to Quick tab
  • Card 2: "Tuesday Offer: 30% off your usual" β†’ personalized from ML
  • Card 3: "Book a table tonight" β†’ links to Dineout
  • Parallax on scroll: banner images shift at 0.5x scroll speed

Section D β€” Category Pills (horizontal scroll, no scrollbar)

[πŸ• Pizza] [πŸ— Chicken] [πŸ₯— Healthy] [🍜 Chinese] [πŸŽ‚ Dessert] [πŸ₯€ Drinks] [πŸ›’ Grocery]
  • Active pill: filled violet
  • Each pill: 48px tall, rounded pill shape, emoji + label
  • Haptic-style scale animation on tap (0.95 β†’ 1.05 β†’ 1.0)

Section E β€” AI Pick of the Day

⚑ HyperFlow AI Pick
"Based on your order history and current weather β€” try this"
[Large restaurant card with AI badge]
  • Single full-width card
  • AI badge: small violet chip "πŸ€– AI Recommended"
  • Shows: restaurant name, cuisine, rating, ETA (ML-smoothed), SLA confidence %

Section F β€” Your Usual (if returning user)

"Your Tuesday usual πŸ‘‡"
[Horizontal scroll of past order items with quick re-add buttons]
  • Each item: dish thumbnail, name, restaurant, "+Add" button
  • Predictive based on day-of-week ML model

Section G β€” Trending Near You

Trending in Bhubaneswar πŸ”₯
[Restaurant card grid β€” 2 columns]
  • Cards show: image (4:3), name, cuisine tags, rating chip, time, HF confidence badge
  • Confidence badge: green "98% on-time" or amber "SLA variable"

Section H β€” Collections

Curated for you
[Horizontal scroll of collection cards]
  • "Date Night πŸ•―οΈ" | "Healthy & Light πŸ₯—" | "Late Night Cravings πŸŒ™" | "Budget Bites πŸ’°"
  • Each: gradient background, 3 restaurant thumbnails peeking

Section I β€” Grocery Strip

⚑ Quick Delivery
"Fresh fruits, dairy, snacks β€” in 10 minutes"
[Horizontal product scroll]
  • Products from Instamart MCP your_go_to_items
  • Each card: image, name, weight/qty, price, "+Add" button
  • Stock status: green "In stock" or amber "Only 3 left" (Tobit model)

Section J β€” Dineout Spotlight

Dine Out Tonight 🍽️
[Horizontal restaurant cards for table booking]
  • From Dineout MCP search_restaurants_dineout
  • Shows: image, name, cuisine, cost-for-two, available slots count

Screen 3: Search

Layout: Full screen, keyboard-first

Top:

  • Back arrow | large search input (auto-focused) | voice 🎀 | camera πŸ“·

Before typing β€” Discovery state:

Recent Searches      [Clear all]
  Chicken Biryani  Γ— | Paneer Tikka  Γ— | Maggi  Γ—

Trending Dishes πŸ”₯
  [Grid of dish cards with photos]

Popular Near You
  [Restaurant list]

While typing β€” Live results (50ms debounce):

Dishes matching "bir..."
  πŸ› Chicken Biryani β€” Behrouz Biryani (2.1km, 28 min)
  πŸ› Veg Biryani β€” Paradise (1.4km, 22 min)
  
Restaurants
  Biryani Blues (4.3⭐, 0.8km)

Filters panel (bottom sheet, swipe up):

  • Veg only toggle
  • Max delivery time slider
  • Min rating selector
  • Cuisine multi-select
  • Sort: Relevance | Rating | ETA | Price

Screen 4: Restaurant Page

Layout: Fullscreen hero β†’ sticky header β†’ menu

Hero (parallax):

  • Full-width image (16:9), parallax at 0.4x scroll speed
  • Gradient overlay bottom: restaurant name, cuisine, rating pill
  • On scroll: image compresses, sticky header appears

Sticky Header (appears at scroll 200px):

← [Restaurant Name]           πŸ” 🀍 β‹―

Info Bar:

⭐ 4.2 (2.1k reviews) · 2.1 km · 28-35 min
[Offers available 🏷️]  [Pure Veg 🟒]  [AI: 97% SLA βœ“]

Offer Strip (horizontal scroll):

[50% off up to β‚Ή100] [Free delivery on β‚Ή199+] [HYPERONE: Extra 10%]

Menu (sectioned list):

  • Left: sticky category sidebar (vertical scroll)
  • Right: items list

Each menu item card:

[item image 80x80]  Chicken Biryani
                    Fragrant rice with...    ⭐ 4.5 (312)
                    β‚Ή249                     [+ Add]
                    πŸ₯© Protein: 32g  πŸ”₯ Cal: 480
  • Nutrition shown subtly β€” expandable with chevron
  • "Bestseller" badge on top items
  • Veg/Non-veg indicator dot (green/red)
  • Customise button appears after Add

Floating Bottom Cart Bar:

[basket icon] 2 items | β‚Ή498        [View Cart β†’]
  • Slides up from bottom when first item added
  • Shows live macro summary on tap

Screen 5: Cart

Layout: Bottom sheet β†’ full screen

Top:

Your Order                                    [Edit ✏️]
From: Behrouz Biryani

Items list:

Chicken Biryani x1                           β‚Ή249
  [- 1 +]
  Customisation: Extra raita
  
Garlic Naan x2                               β‚Ή120
  [- 2 +]

AI Nutrition Ring (collapsible section):

🧬 Your Meal
[Circular progress: Protein 42g/60g goal | Carbs 78g | Fat 22g]
[Suggested add: "Add a salad for complete nutrition β†’"]

Offers:

Offers & Benefits        [Browse coupons β†’]
[SWIGGY50] 50% off applied β€” Saving β‚Ή124 βœ“

Bill Summary:

Item total          β‚Ή369
Delivery partner fee  β‚Ή40
Platform fee          β‚Ή5
Taxes               β‚Ή18.45
━━━━━━━━━━━━━━━━━━
To Pay             β‚Ή432.45

πŸ’³ Pay via UPI / Card / Cash

Place Order CTA:

[    Place Order β€” β‚Ή432.45    ]    ← large violet button, full width
  • Pulsing glow animation when ready
  • Disabled state: grey + spinner while verifying

Screen 6: Live Order Tracking

Layout: Map fills top 60%, status below

Map section:

  • Leaflet map, dark tiles (Carto)
  • Animated scooter marker (SVG, smooth interpolation)
  • Store pin (purple), home pin (teal)
  • Route line: dashed violet β†’ solid teal as rider progresses
  • Map auto-zooms to keep both store + rider visible

Status section (below map):

🟒 Rider picked up your order · 9:14pm

━━━●━━━━━━━━━━━━━━━━━━━━
Placed  Accepted  Picked  ●Nearby  Delivered

ETA: 9:28pm (14 min)  Β·  ML confidence: High βœ“
[Rider: Rajesh K  β˜…4.9]    [πŸ“ž Call]  [πŸ’¬ Chat]

Fraud Shield Footer:

πŸ›‘οΈ Fraud Shield Active
Your rider is verified Β· Payment secured Β· Order insured

Screen 7: Quick Tab (10-min Grocery)

Layout: Blinkit-inspired speed-first design

Header:

⚑ Quick Delivery
[Countdown: 00:09:42 to your door]

Top Categories:

[πŸ₯› Dairy] [πŸ₯¬ Veggies] [🍎 Fruits] [πŸ’Š Meds] [🧴 Care] [🧹 Home]
  • Each: icon + label, pill shape, 56px tall, glassmorphism

Your Go-To Items (from your_go_to_items Instamart MCP):

"Restock your basics"
[Horizontal product cards]

Flash Deals:

⚑ Ends in 02:14:37
[Product grid β€” 2 columns, price strikethrough + new price]

Inventory Intelligence Bar:

⚠️ Tomatoes running low at your nearest store
   Order now β€” only ~12 units left   [Add to cart]

← Powered by Tobit demand model


Screen 8: Orders Tab

Layout: Tab bar (Active / Past) at top

Active Orders card:

[Live animated status bar]
Chicken Biryani + 2 items
Behrouz Biryani β†’ Home
ETA: 14 min  🟒 Rider en route
[Track Order]

Past Orders (infinite scroll):

[Restaurant image 48x48]  Behrouz Biryani     Tue, Jul 8
                          Chicken Biryani...  β‚Ή432
                          ⭐ Rate order    [Reorder]

Reorder button:

  • Tap β†’ shows smart reorder sheet
  • "Same items?" / "Update cart?"
  • If any item unavailable: "Chicken Biryani unavailable β€” try X instead?"

Screen 9: Profile Tab

Layout: Hero section + settings list

Hero:

[Avatar circle β€” initials GN]
Gaurav Nayak
πŸ“ Bhubaneswar Β· Member since 2023
[HyperFlow Pro πŸ‘‘]  [Edit Profile ✏️]

Stats Strip:

[47 Orders]  [β‚Ή12,840 spent]  [3.2kg CO2 saved]

HyperFlow Pro Card:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
πŸ‘‘ HyperFlow Pro
Free delivery Β· Extra 10% off Β· Priority support
Saved this month: β‚Ή847
[Manage subscription]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Settings Sections:

Account

  • Saved Addresses (4 saved)
  • Payment Methods
  • Dietary Preferences (Veg / Keto / Gluten-free)
  • Nutrition Goals (daily macro targets)

HyperFlow

  • AI Preferences (what the agent knows about you)
  • Notification Settings
  • Order History Export

Security

  • Fraud Shield Status βœ“
  • Active Sessions
  • Change Phone Number

App

  • Dark Mode (default on)
  • Language
  • About HyperFlow
  • Rate the App

Screen 10: AI Agent Chat (Hidden Power Feature)

Access: Long press on search bar β†’ "Ask HyperFlow AI"

Layout: Chat interface

[← Back]   πŸ€– HyperFlow AI   [⚑ Powered by Gemini]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"I want 150g protein today. Already had 80g.
 Budget under β‚Ή300."

πŸ€– Searching restaurants...
   πŸ”§ search_restaurants(lat: 20.29, lng: 85.82...)  βœ“
   πŸ”§ search_menu(query: "high protein")...  βœ“

Here's what works for you:
[Card: Grilled Chicken Bowl β€” 45g protein, β‚Ή220]
[Card: Paneer Tikka Wrap β€” 32g protein, β‚Ή180]

Want me to add one to cart?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  • Tool calls shown as animated glass chips
  • Each chip: tool name + status indicator
  • Streaming text with typewriter effect

Screen 11: Dineout / Table Booking

Layout: Discovery + booking flow

Discovery:

  • Map view / List view toggle
  • Filters: Cuisine, Occasion, Budget, Available Now
  • Restaurant cards: image, name, rating, cost-for-two, distance, slots available

Restaurant Detail:

  • Hero image gallery (swipeable)
  • Ratings + reviews
  • Available slots calendar (from get_available_slots)
  • Slot grid: Morning / Afternoon / Evening
  • Guest count selector

Booking Confirmation:

βœ“ Table booked!
[Restaurant name]
Saturday, Jul 12 Β· 8:00pm Β· 2 guests

Your booking ID: HF-2847
Add to Calendar  |  Get Directions

5. Animations Specification

Element Animation Duration Easing
Screen transitions Slide + fade 300ms ease-smooth
Bottom sheet open Slide up + blur bg 350ms ease-smooth
Cart bar appear Slide up from bottom 250ms ease-bounce
Add to cart button Scale 0.95β†’1.05β†’1.0 200ms ease-bounce
Restaurant card hover Lift (translateY -4px) + shadow 200ms ease-smooth
Scooter on map Linear interpolation continuous linear
ETA countdown Flip number animation 1000ms ease
Macro ring progress Stroke-dashoffset draw 600ms ease-smooth
Tool call chips Slide in from left 150ms ease-smooth
Hero banner Parallax at 0.4x continuous linear
Category pills Scale on tap 150ms ease-bounce
Loading skeleton Shimmer gradient 1500ms linear loop

6. Stitch Build Order (Screen Priority)

Use Google Stitch MCP to generate each screen in this order:

Priority Screen Stitch Prompt Theme
1 Home Feed Dark food delivery home, violet/teal, glassmorphism
2 Restaurant Page Menu browser, parallax hero, sticky nav
3 Cart + Checkout Cart summary, nutrition ring, place order
4 Live Tracking Map view, progress steps, rider info
5 Quick Grocery Blinkit-style speed, 10min promise
6 Search Keyboard-first discovery, filters
7 Profile Account dashboard, membership card
8 Orders Timeline view, reorder flow
9 AI Chat Chat bubbles, tool call chips
10 Dineout Table booking calendar
11 Onboarding 3-slide intro, OAuth trigger

7. Stitch Design System Config

{
  "designTheme": {
    "colorMode": "DARK",
    "font": "INTER",
    "roundness": "ROUND_EIGHT",
    "customColor": "#6C63FF",
    "saturation": 3
  },
  "deviceType": "MOBILE"
}

8. File Structure (Frontend Only)

frontend/src/
β”œβ”€β”€ App.jsx                    # Router + bottom nav shell
β”œβ”€β”€ App.css                    # Global tokens + resets
β”œβ”€β”€ screens/
β”‚   β”œβ”€β”€ Home.jsx               # Home feed (Screen 2)
β”‚   β”œβ”€β”€ Search.jsx             # Search (Screen 3)
β”‚   β”œβ”€β”€ Restaurant.jsx         # Restaurant page (Screen 4)
β”‚   β”œβ”€β”€ Cart.jsx               # Cart (Screen 5)
β”‚   β”œβ”€β”€ Tracking.jsx           # Live tracking (Screen 6)
β”‚   β”œβ”€β”€ Quick.jsx              # Grocery quick (Screen 7)
β”‚   β”œβ”€β”€ Orders.jsx             # Orders tab (Screen 8)
β”‚   β”œβ”€β”€ Profile.jsx            # Profile (Screen 9)
β”‚   β”œβ”€β”€ AgentChat.jsx          # AI agent (Screen 10)
β”‚   └── Dineout.jsx            # Table booking (Screen 11)
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ BottomNav.jsx          # 5-tab navigation
β”‚   β”œβ”€β”€ TopBar.jsx             # Sticky header
β”‚   β”œβ”€β”€ RestaurantCard.jsx     # Reusable restaurant card
β”‚   β”œβ”€β”€ ProductCard.jsx        # Grocery product card
β”‚   β”œβ”€β”€ CartBar.jsx            # Floating cart bar
β”‚   β”œβ”€β”€ NutritionRing.jsx      # Macro circular progress
β”‚   β”œβ”€β”€ LiveETA.jsx            # ETA display + ML confidence
β”‚   β”œβ”€β”€ ToolCallChip.jsx       # Agent tool call display
β”‚   β”œβ”€β”€ FraudShield.jsx        # Security status indicator
β”‚   └── SkeletonLoader.jsx     # Loading states
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ useSwiggyMCP.js        # API calls to backend
β”‚   β”œβ”€β”€ useCart.js             # Cart state management
β”‚   β”œβ”€β”€ useLocation.js         # Address management
β”‚   └── useAgent.js            # WebSocket for AI agent
└── utils/
    β”œβ”€β”€ nutrition.js           # Macro calculations
    └── animations.js          # Shared animation configs

9. What Makes HyperFlow DIFFERENT in 1 Sentence per Feature

  • Every restaurant card β†’ shows ML SLA confidence, not just a static rating
  • Every ETA β†’ ML-smoothed, with confidence band (not a guess)
  • Every cart β†’ live nutrition macro ring updating as you add items
  • Every order β†’ Fraud Shield active badge throughout delivery
  • Every grocery item β†’ Tobit model stock intelligence ("only 3 left")
  • Search β†’ natural language dietary constraint parser ("high protein, no onion, under β‚Ή250")
  • Group order β†’ AI finds menu items every person can eat simultaneously
  • AI Chat β†’ shows every tool call transparently β€” you see the AI thinking
  • Combined Evening β†’ book table + schedule food delivery for when you get home, one flow