Skip to content

curiosum-dev/openai-example-app-blog-post

Repository files navigation

React Native openeai example diet app

React Native Badge OpenAI Badge MIT License Badge

This example diet app is a React Native application that generates personalized diet plans based on user's BMI and body features using OpenAI's machine learning algorithms. The app is built with React Native framework and integrated with OpenAI's package to retrieve diet plans in JSON format from the AI model. The generated diet plans are then displayed in the app's UI with a custom React Native component.

Table of Contents

Installation Usage Contributing License

Installation

Before running the app, make sure you have the following software installed on your machine:

Node.js v14.0 or higher React Native CLI

Once you have these dependencies installed, follow these steps to install the app:

Step 1. Clone the repository to your local machine:

git clone https://github.com/curiosum-dev/openai-example-app-blog-post

Step 2. Change into the app directory:

cd your-diet-app

Step 3. Install the app dependencies:

npm install

Step 4. Install OpenAI package:

Install the OpenAI package by following the instructions provided in the official OpenAI documentation: https://beta.openai.com/docs/api-reference/installation

Usage

To run the app on your local machine, follow these steps:

Step 1. Open a terminal and change into the app directory:

cd your-diet-app

Step 2. Start the Metro bundler:

npx react-native start

Step 3. Open another terminal and start the app on an Android or iOS simulator:

npx react-native run-android or npx react-native run-ios

Step 4. Once the app is running on the simulator, you can use it to generate personalized diet plans based on your BMI and body features.

Contributing

If you find a bug or want to contribute to the app, feel free to open an issue or submit a pull request.

License

This app is licensed under the terms of the MIT license.