Study Buddy is a study aid application similar to Quizlet, designed to help users prepare for interview questions by leveraging OpenAI's API. Users can type in their answers, and the app provides corrections and suggestions for improvement.
- OpenAI Integration: Uses OpenAI API to evaluate user responses.
- Customizable Questions and Answers: Easily modify the set of questions and demo answers.
- Interactive UI: Responsive design with dynamic feedback on user answers.
- Keyboard Shortcuts: Submit answers quickly using "Ctrl + Enter".
The source code for Study Buddy is available on GitHub: Study Buddy Repository
- OpenAI API Key: Obtain an API key from OpenAI. Get API Key
-
Clone the Repository:
git clone https://github.com/THEjacob1000/study-buddy.git cd study-buddy -
Create Environment Variable:
-
Create a .env file in the root directory.
-
Add the following line with your OpenAI API key:
OPENAI_API_KEY=<your api key here>
-
-
Install Dependencies
pnpm install
-
Run the Application:
pnpm dev
-
Local Development:
- The application is designed to be run locally for individual use.
- To start, simply run the development server with
pnpm dev.
-
Remote Hosting:
- You can host the application remotely, but be mindful of API costs as OpenAI charges per API request.
- Ensure your environment variables are securely managed in a production environment.
-
Adjusting Bot Response:
- Modify the system content in the
requestDatavariable located at/api/OpenAI/route.ts.
- Modify the system content in the
-
Editing Demo Answers:
- The array of questions and answers can be edited in
@/lib/studyQuestions.ts. - Ensure the array follows the structure
{question: string, answer: string}.
- The array of questions and answers can be edited in
- Submit Answer: Press "Ctrl + Enter" to submit your answer quickly.
Yes, you can run the app in your local environment after setting the API key.
Yes, you can host it remotely. However, be cautious with API key usage as it could incur costs if accessed by multiple users.
Adjust the system content in requestData in /api/OpenAI/route.ts.
Edit the array in @/lib/studyQuestions.ts to include your desired questions and answers.
Feel free to contribute to the project by forking the repository and submitting pull requests.