This repository contains a full-stack GPT-wrapper mobile app developed using React Native and Expo for the frontend, with a Flask backend for handling API requests.
- Mobile GPT Application: Mobile GPT App built using React Native with Expo.
- Backend API: built with Flask for interacting with language models.
- Cross-Platform Compatibility: Supports both iOS and Android devices.
- Voice Interaction Mode: Enable users to interact via voice commands.
- Streaming Text Output: Implement streaming text output for responses.
- App Packaging Commands: streamlined commands for building and packaging the app for iOS and Android deployment.
- Database Integration: Connect with a MySQL database to store user data and conversation history.
- User Authentication and Authorization: Implement secure user authentication and authorization mechanism.
- Cloud Deployment: Deploy the backend API to a cloud platform.
- Push Notifications: Enable push notifications for mobile app.
- Node.js (v22.3)
- Python (v3.11+)
- Expo CLI
npm install -g expo-cli
- Create .env file under both frontend and backend folders. Write
Replace
OPENAI_API_KEY=your_openai_api_key
your_openai_api_keywith your OpenAI API key.
-
Clone the repository:
git clone https://github.com/quao627/gpt-wrapper.git cd gpt-wrapper/frontend -
Install dependencies:
npm install
-
Start the Expo development server:
npx expo start
This will start the Expo development environment. You can use an emulator or scan the QR code with Expo Go on your mobile device to test the app.
If you want to use the backend API, follow these steps:
- Navigate to the backend folder:
cd backend - Install Python dependencies:
pip install -r requirements.txt
- Run the Flask development server:
The backend should now be running on port 8080.
python main.py
- Change the code in frontend/components/ChatScreen.js to point to the backend server. Replace the URL in the fetch request with your backend server URL.