Learn it. Explain it. Master it!
This project aims to help students deeply understand material by encouraging them to explain it in their own words. It includes both a backend built with Python and a frontend built with React.
Survey:
- Find out more here: https://docs.google.com/presentation/d/1I_zl_7M6E_cbLyrWe55y9e2yRw9Wq3tM9C_itqg0ZAE/edit#slide=id.g30cc4a8b9eb_0_0
- Prerequisites
- Back-End Setup
- Front-End Setup
- Installation
- Running the App
- Front-End Available Scripts
- Learn More
For this solution, you need the following prerequisites:
- Python 3.9 or later Note: It is recommended that you use a virtual environment or virtualenvwrapper to isolate the solution from the rest of your Python environment.
- An IAM user with enough permissions to use Amazon Bedrock, Amazon Transcribe, and Amazon Polly. Note: Please ensure that the underlying Foundational Model in Amazon Bedrock, that you plan to use, is enabled in your AWS Account. To enable access, please see Model access.
- MongoDB Atlas account for vector database
- Jina API setup (if required by your project)
-
Clone the Repository: Ensure you have the project's repository cloned locally.
-
Set Up Environment Variables: Create a
.env
file in the root directory of the project. Use theenv.example
file as a template and fill in the necessary information. The.env
file should contain:MONGODB_CONNECTION_STRING=your_mongo_connection_string AWS_ACCESS_KEY_ID=your_access_key_id AWS_SECRET_ACCESS_KEY=your_secret_access_key S3_BUCKET_NAME=your_bucket_name MODEL_ID=your_model_id # Optional
-
Install Dependencies: Navigate to the backend directory and run the following command:
pip install -r requirements.txt
-
Run the Backend App: To start the backend, use the following command:
python backend/app/services/main.py
-
Navigate to the Frontend Directory:
cd frontend
-
Install Frontend Dependencies:
npm install
-
Run the Frontend App:
npm start
This will start your React app in development mode. You can open http://localhost:3000 to view it in your browser.
To install Python libraries required for the project, run the following command:
python install -r ./requirements.txt
Before running the app, set your AWS credentials:
export AWS_ACCESS_KEY_ID=<...>
export AWS_SECRET_ACCESS_KEY=<...>
export AWS_DEFAULT_REGION=<...> # Optional, defaults to us-east-1
You can optionally set the Foundational Model (FM) to be used:
export MODEL_ID=<...>
- AWS Account: Sign up for an AWS account to access services like Amazon Bedrock, Transcribe, and S3.
- MongoDB Atlas: Sign up for MongoDB Atlas as your vector database.
- Jina API: Ensure that Jina API is set up if your project requires it.
The following commands can be run within the frontend directory:
npm start
: Runs the app in development mode. Open http://localhost:3000 to view it in your browser.npm test
: Launches the test runner in the interactive watch mode.npm run build
: Builds the app for production in the build folder.npm run eject
: Ejects the configuration files to give full control.