Skip to content

ngh227/echolearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echolearn Project:

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:

Screenshot 2024-10-20 at 1 21 23 PM

Click to see demo

Watch the Demo on YouTube

Table of Contents

Prerequisites

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)

Back-End Setup

  1. Clone the Repository: Ensure you have the project's repository cloned locally.

  2. Set Up Environment Variables: Create a .env file in the root directory of the project. Use the env.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
    
  3. Install Dependencies: Navigate to the backend directory and run the following command:

    pip install -r requirements.txt
  4. Run the Backend App: To start the backend, use the following command:

    python backend/app/services/main.py

Front-End Setup

  1. Navigate to the Frontend Directory:

    cd frontend
  2. Install Frontend Dependencies:

    npm install
  3. 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.

Installation

To install Python libraries required for the project, run the following command:

python install -r ./requirements.txt

Running the App

Setting AWS Credentials

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=<...>

Sign Up for Required Accounts

  1. AWS Account: Sign up for an AWS account to access services like Amazon Bedrock, Transcribe, and S3.
  2. MongoDB Atlas: Sign up for MongoDB Atlas as your vector database.
  3. Jina API: Ensure that Jina API is set up if your project requires it.

Front-End Available Scripts

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.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published