Team 13 - Yecheng Wang, Tianxi Huang, Yvan Zhang, Albert Zhang
Built with React Native, OpenAI API, and demo deployed on Vercel.
Try out our app simulator! đź”— Web App Simulator
Watch the video walkthrough: Youtube
GitGPT is an improvement of ChatGPT on mobile, where we aim to resolve the key pain points using ChatGPT for coding: The lack of context and inability to paste large code blocks or import files.
There are 2 main tasks that our prototype implements:
- Importing a repository for contextual information
- Editing code and pushing back to the repository
This ReadMe walks through
(a) how to clone and run the project on personal devices, and
(b) how to effectively navigate the application and use all features provided
I suggest using the web app simulator as it already integrates an OpenAI API key, otherwise you would be required to create your own API key. You can follow the steps below.
- Cloning the project
- Project Setup and API Key
- Running the Project
- Step-by-Step App Walkthrough
- Additional Features
First clone the repository in your desired directory, in your terminal run:
git clone https://github.com/Vancarii/gitgpt.git
Then run this to open the project in vs code:
code .
Before setting up the project, ensure you have Node installed to use npm, or alternatively you can use yarn
-
Go to OpenAI website and create your own api key
-
Navigate to the
serverfoldercd server -
Create a file named
.envin the server folder with the following contents:OPENAI_API_KEY=actual_openai_key_here
and replace actual_openai_key_here with the openai key you obtained in step 1
-
Now in the terminal of the server folder run:
npm install -
Navigate back to the root folder of the project and run:
npm install
-
First navigate to the server folder and run the server:
cd server // navigate to server folder node server.js // run the serverEnsure the server is running of port 8081
-
Then to run the whole project in the root directory:
cd .. // navigate back to root directory npm start // run the project
Once prompted to run the project on port 8082, select y for yes
You will now be prompted with the local host link for the web version, and also the QR code to open the expo app. If the expo app is installed, simply scan the QR code with your camera (for iOS) or use the expo app to scan (for Android).
Now that the app is up and running on either mobile or web, here are steps to navigate the app.
- Tap the
top-right login buttonto enter the login interface
- Since our app checks for null input values, enter some text in the input boxes, for example:
- username:
user - password:
1234
Then click Sign in
- Connecting to GitHub now can be done in 2 way:
- (Shorter method) Click the
GitHub Loginbutton in the main chat interface
- (Shorter method) Click the
- OR: Go to the
menusidebar and clickLinked Accounts, then click onConnectin the GitHub tab
- Enter a simple text into the input boxes (ex. username: user, password: 1234) and click on the
Connect to GitHubbutton to sign in
You will then be brought back to the home chat screen
- After linking GitHub, click on
Import Repositoryin the chat screen
- Select any repository from the displayed list, for example:
react-native-app
-
Now that the app has context, you can provide a prompt in the text box at the bottom. An example prompt would be:
Give me a short for loop in python
- Next, you can review the suggested code and its explanations, then click
View Code Editorto open the code editing page
- Click
Acceptto write in the new code suggestions into the file.
- Click the
top-right upload icon
- Select
Push to Mainfrom the dropdown menu
- Input your commit message, then tap the
Commit Changesbutton at the bottom of the page
- Click
Commitin the popup dialog
- Your changes will be committed to your repository. Tap
Back to Chatto return to the chat screen and complete the workflow
Thats it! You've completed the 2 main tasks of our application.
- Personalization: Users are able to see their own account details and also toggle light mode and dark mode
-
Error handling and prevention:
- If prompts are sent without network connect, users will be notified of the error and suggested to check their network
- If users try to login with null input boxes, it prompts them to input a value
- History shows any older changes made allowing users to revert back to an older version if errors were made
- Users are shown a guide to effectively navigate the new code editor screen and inform them of possible actions
-
System feedback:
- functionalities not yet implemented (not part of the main 2 tasks) are shown a popup for feedback
- After accepting the new changes or editing the text in the file, there will be a M shown beside the filename, indicating the file has new changes saved. You will also be able to undo and redo, and view the history of changes made.

























