myFood is a cross-platform mobile application designed to simplify meal planning by generating personalized weekly meal plans using AI. Built with React Native and Expo, the app leverages a Large Language Model (LLM) and Retrieval-Augmented Generation (RAG) via the Open AI Assistant to create meal plans based on users’ dietary needs, nutritional goals, and available ingredients. It features ingredient inventory tracking to reduce food waste, grocery list generation, and a community platform for sharing recipes and achievements. The backend, built with Express and Node.js, handles data management and AI integration, using MongoDB for storage. The app aims to alleviate meal planning stress, particularly for international students adapting to new environments, by providing tailored, healthy meal options.
This project is organized into a monorepo structure for clarity and ease of management:
packages/app: Contains the React Native frontend of the "myFood" app, built with Expo. This folder includes all the mobile app code, including screens (e.g., Meal Plan, Ingredients), services (e.g.,api.tsfor API calls), and assets.packages/backend: Contains the Express backend, responsible for API endpoints, data management, and communication with the Open AI Assistant for meal generation. It uses MongoDB for storing user data, meal plans, and ingredient inventories.
- Node.js (v16 or higher)
- npm or Yarn
- MongoDB (local or cloud instance)
- Expo CLI (
npm install -g expo-cli) - Open AI API key (for meal generation)
-
Clone the Repository
Clone this repository to your local machine. -
Install Dependencies
Navigate to the root directory and install dependencies for both the app and backend:cd packages/app && npm install cd ../backend && npm install -
Set Up Environment Variables
- In
packages/backend, create a.envfile and add your MongoDB URI and Open AI API key:MONGODB_URI=your_mongodb_uri OPENAI_API_KEY=your_openai_api_key - In
packages/app, ensure the backend URL is correctly set inservices/api.ts.
- In
-
Run the Backend
Start the Express server from thepackages/backendfolder:cd packages/backend && npm startThe backend will run on
http://localhost:3000(or your configured port). -
Run the App
Start the React Native app from thepackages/appfolder:cd packages/app && expo startUse the Expo Go app on your mobile device or an emulator to view the app.
- The app has been tested on both iOS and Android devices via Expo.
- Sample user data and meal plans are included in the MongoDB database for testing.
- The project report provides detailed documentation of the development process, testing, and findings.
Thank you for reviewing my project! I hope "myFood" demonstrates the potential to simplify meal planning with AI.