{"id":28089300,"url":"https://github.com/mxcaoalina/datemeal_mobile","last_synced_at":"2026-02-25T18:03:18.973Z","repository":{"id":290834857,"uuid":"971007689","full_name":"mxcaoalina/DateMeal_Mobile","owner":"mxcaoalina","description":"DateMeal is a mobile AI assistant that helps users discover ideal date restaurants via natural chat.","archived":false,"fork":false,"pushed_at":"2025-04-30T20:42:21.000Z","size":26814,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T20:43:08.681Z","etag":null,"topics":["ai-agent","fastapi","react-native"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxcaoalina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-22T21:47:56.000Z","updated_at":"2025-04-30T20:42:24.000Z","dependencies_parsed_at":"2025-04-30T20:53:41.598Z","dependency_job_id":null,"html_url":"https://github.com/mxcaoalina/DateMeal_Mobile","commit_stats":null,"previous_names":["mxcaoalina/datemeal_mobile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcaoalina%2FDateMeal_Mobile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcaoalina%2FDateMeal_Mobile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcaoalina%2FDateMeal_Mobile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcaoalina%2FDateMeal_Mobile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxcaoalina","download_url":"https://codeload.github.com/mxcaoalina/DateMeal_Mobile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948336,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","fastapi","react-native"],"created_at":"2025-05-13T12:56:05.690Z","updated_at":"2026-02-25T18:03:18.911Z","avatar_url":"https://github.com/mxcaoalina.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DateMeal Mobile App - Full Stack Documentation\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/solution.png\" alt=\"DateMeal App Banner\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n\n---\n\n## Project Overview\n\n**DateMeal** is an AI-powered mobile application that helps users find ideal restaurants for a date by chatting with a personalized recommendation agent. The app tailors suggestions based on mood, ambience, budget, cuisine preferences, and dietary needs.\n\nWith a delightful onboarding experience, natural-language chat, and a sleek mobile UI, DateMeal guides users from selection to detail view—and even saves favorites. It uses Azure OpenAI (GPT-4o) to generate recommendations and optionally enriches them with real-world data via Bing Web Search Grounding.\n\n---\n\n\n## Why It's Innovative\n- Uses **conversational AI** (Azure OpenAI) to recommend restaurants, instead of forms or filters.\n- Supports **real-time refinement** via follow-up chat.\n- Applies **Human-in-the-Loop design** for interactive, evolving suggestions.\n- Augments AI responses with **Bing Web Search** for real-world accuracy and visuals.\n\n---\n\n## Responsible AI\n\n- All AI-generated content is reviewed by the user before action—ensuring human oversight (Human-in-the-Loop).\n- User preferences and past interactions are stored locally using AsyncStorage to preserve privacy.\n- GPT-4o prompts are explicitly scoped to avoid biased, harmful, or sensitive content.\n- The app avoids storing personal data in the cloud and includes fallback logic to ensure safety in the event of AI errors.\n\n\n---\n\n## Real-World Use Case\n\nDateMeal solves a familiar but often frustrating problem: *“Where should we eat tonight?”* \n\nBy offering personalized suggestions based on context (budget, mood, vibe, etc.) via natural conversation, it removes friction from decision-making. We envision this tool being used by:\n- Couples planning a date night\n- Groups deciding on dinner while traveling\n- Users with dietary restrictions looking for safe dining options\n\nThe mobile-first, chat-based experience fits seamlessly into users’ lives—like having a restaurant-savvy friend in your pocket.\n\n\n---\n\n## Tech Stack\n\n| Layer           | Technology                                  |\n|----------------|----------------------------------------------|\n| Mobile Frontend | React Native (Expo), TypeScript, Zustand     |\n| Backend API     | FastAPI (Python), Azure OpenAI, Bing Search  |\n| Storage         | AsyncStorage (local)                         |\n| Hosting         | Azure App Service (Backend) + EAS (Frontend) |\n| AI Services     | Azure OpenAI (GPT-4o), Bing Web Search        |\n| Styling         | Custom theming + StyleSheet                  |\n\n---\n\n## System Architecture\n```\nUser (Mobile App)\n    ↓\nReact Native (Expo)\n    ↓\nFastAPI Backend (Azure App Service)\n    ↓\nAzure OpenAI (GPT-4o)\n    ⇳ (optional) Bing Web Search Grounding\n```\n- The mobile client calls the FastAPI backend.\n- The backend constructs a structured prompt, sends it to Azure OpenAI, and parses the structured JSON response.\n- If available, the backend enriches results with real images and links via Bing Search API.\n\n\n---\n\n## Project Structure\n\n### Frontend (`app/`)\n```plaintext\napp/\n├── components/          # Reusable UI elements\n├── navigation/          # Stack navigator\n├── screens/             # Chat, Onboarding, Details, Home\n├── services/            # API adapters (axios)\n├── store/               # Zustand + AsyncStorage\n├── theme/               # Style constants\n├── types/               # Shared interfaces\n├── utils/               # API base URL config, helpers\n├── App.tsx              # Entry point\n```\n\n### Backend (`backend-python/`)\n```plaintext\nbackend-python/\n├── api/                 # API route handlers\n│   ├── advise.py\n│   ├── health.py\n│   └── refine.py\n├── models/              # Pydantic schemas\n├── services/            # Azure OpenAI \u0026 Bing search wrappers\n├── utils/               # Logger setup, etc.\n├── main.py              # FastAPI app\n├── requirements.txt     # Dependencies\n├── .env                 # API keys and configs\n```\n\n---\n\n\n## System Flow Overview\n\n```\n+--------------------+         +--------------------+\n|  React Native App  |         |   AsyncStorage     |\n|--------------------|         |--------------------|\n| - User Onboarding  |\u003c-------\u003e| - Preferences      |\n| - Chat Interface   |         | - Cached Results   |\n+--------+-----------+         +---------^----------+\n         |                               |\n         | HTTP Request                  |\n         v                               |\n+--------+-----------+         +---------+----------+\n|       FastAPI      |         | Azure OpenAI (GPT) |\n|--------------------|         |--------------------|\n| - Receives input   |         | - Chat Completion  |\n| - Formats prompt   |--------\u003e| - Returns JSON     |\n| - Handles fallback |         +--------------------+\n+--------+-----------+                   \n         |                                   \n         v                                   \n+--------------------+         +--------------------+\n|  Bing Search API   |--------\u003e|  Restaurant Data   |\n|--------------------|         | (Structured JSON)  |\n| - Image lookup     |         +--------------------+\n| - URL enrichment   |\n+--------------------+\n```\n\n\n---\n\n\n## API Endpoints\n| Method | Endpoint             | Purpose                                    |\n|--------|----------------------|--------------------------------------------|\n| GET    | `/health`            | Health check                               |\n| POST   | `/advise`            | Generate restaurant recommendations        |\n| POST   | `/restaurant/refine` | Refine a previous recommendation           |\n\n---\n\n## Key Frontend Features\n- **Onboarding Flow**: Set preferences (mood, party size, cuisine, vibe, budget, allergies).\n- **Chat Interface**: Converse with DateMeal AI Agent to discover ideal restaurants.\n- **Restaurant Detail View**: Menus, hours, contact, map links.\n- **Save for Later**: Saved restaurants displayed on home.\n- **Offline Storage**: Preferences and past results stored via AsyncStorage.\n\n---\n\n## Key Backend Features\n- **AI-Powered JSON Recommendations**: GPT-4o returns structured JSON.\n- **Bing Enrichment (optional)**: Uses Bing Search API to add live URLs and photos.\n- **Validation**: Strong schema enforcement with Pydantic.\n- **Graceful Fallbacks**: If GPT fails, user still receives a static response.\n- **CORS**: Enabled for Expo device access.\n\n---\n\n\n## Prompting Strategy\n\nThe backend sends a structured system prompt with examples, instructing GPT-4o to return exactly 3 restaurant recommendations in valid JSON format with specific fields such as:\n- `name`, `description`, `cuisine`, `priceRange`, `rating`\n- `menuItems` (array of dishes)\n- `highlights`, `website`, `location`\n\n\u003e **Example System Prompt**:\n\u003e\n\u003e You are a restaurant recommender AI. Based on the following user preferences, return 3 diverse restaurant suggestions in strict JSON format.\n\u003e - Cuisine: Korean  \n\u003e - Budget: $$  \n\u003e - Mood: Cozy\n\n\nIt uses dynamic input from the user (e.g., \"Romantic Italian in Brooklyn\") to populate the prompt. If the response is malformed or missing, fallback handling is triggered.\n\n---\n\n## App Screens \u0026 Demo Walkthrough\n\n**▶ [Watch the 3-min DateMeal demo](https://drive.google.com/file/d/1_zzxjOtndYJLJsYm19UYlWKZYLyoMRw1/view?usp=share_link)** – user flow + architecture snapshot\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/home.png\" alt=\"Home Screen\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003eHome Screen\u003c/b\u003e: Displays a greeting, shows saved restaurants and quick actions like chatting or editing preferences.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/preferences.png\" alt=\"Preferences Page\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003ePreferences Page\u003c/b\u003e: Update dietary restrictions, must-not-haves, and more to refine future results.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/onboarding.png\" alt=\"Onboarding Flow\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003eOnboarding Flow\u003c/b\u003e: Users specify vibe, cuisine, party size, budget, dietary needs, and no-gos before receiving tailored results.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/chat.png\" alt=\"Chat Assistant\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003eChat Assistant\u003c/b\u003e: Conversational UI lets users ask for suggestions and receive real-time responses from the AI agent.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/refine-chat.png\" alt=\"Refine Recommendations\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003eRefine Recommendations\u003c/b\u003e: After receiving suggestions, users can refine results by asking the agent to adjust based on new criteria.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/restaurant-detail.png\" alt=\"Restaurant Detail View\" width=\"250\"/\u003e\n  \u003cp\u003e\u003cb\u003eRestaurant Detail View\u003c/b\u003e: Expanded view of a selected restaurant, including highlights, contact info, hours, and curated menu.\u003c/p\u003e\n\u003c/div\u003e\n\n\n---\n\n## Deployment\n\n- **Backend**: Deployed to Azure App Service — [View Deployment](https://datemeal-backend-cga2d8fqfsctesh9.eastus2-01.azurewebsites.net/)\n- **Frontend**: Published via Expo EAS Update — [Expo Dashboard](https://expo.dev/accounts/mxcao_alina/projects/DateMealMobile)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/qr-code.svg\" alt=\"QR Code to try the DateMeal app\" width=\"200\"/\u003e\u003cbr/\u003e\n  \u003cem\u003eScan to preview the latest DateMeal app\u003c/em\u003e\n\u003c/p\u003e\n\n\n---\n\n\n## Running Locally\n\n### 1. Start Backend\n```bash\ncd backend-python\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\nuvicorn main:app --reload --port 8001\n```\n\n### 2. Configure Frontend (for device testing)\nEdit `utils/networkUtils.ts`:\n```ts\nconst YOUR_COMPUTER_IP = '192.168.x.x';\n```\n\n### 3. Run Expo Frontend\n```bash\nnpm install\nnpx expo start\n```\n\nScan QR code to run on mobile or simulator.\n\n---\n\n© AI Agent Hackathon 2025 · Team: mxcaoalina, ziqun-liu, RajasekharwhY\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcaoalina%2Fdatemeal_mobile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxcaoalina%2Fdatemeal_mobile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcaoalina%2Fdatemeal_mobile/lists"}