CourseBuddyAI is a Chrome extension designed to enhance the Coursera Online Learning Platform, allowing students to upload lecture transcripts and slides for automated summarization. These documents will be indexed in a vector database. Subsequently, we will employ the Retrieval Augmentation Generation (RAG) technique, in combination with a large language model like ChatGPT to build a Q&A chatbot interface based on the uploaded course content. The full project proposal and progress reports are stored in this repository under the reports folder.
Please see the links below for the project submission grading
- Project Proposal
- Project Progess Report
- Project Final Report
- Project Documentation
- Project Presentation Slides
- Project Presentation & Demo
- Additional Source Code Documentation Links
Team Name: CourseBuddyAI
Team Members:
- Avinash Baldeo (@abaldeo2)
- Zach Pohl (@zcpohl2)
- Colton Bailey (@coltonb4)
Ehsan Sarfaraz (@ehsans3)- Kacper Dural (@kdural2)
- FastAPI with Python 3.11
- React 16 with Typescript, Redux, and react-router
- Postgres (asyncpg)
- SqlAlchemy with Alembic for migrations
- Pytest for backend tests
- Jest for frontend tests
- Prettier/Eslint (with Airbnb style guide)
- Docker compose for easier development
- Nginx as a reverse proxy to allow backend and frontend on the same port
The only dependencies for this project should be docker and docker-compose.
The following commands with initalize the app, build and start all the containers, then tail the docker-compose logs
cd CourseBuddyAI
make open
make initOnce you see the following logs, reload your browser
CourseBuddyAI-frontend-1 | Starting the development server...
CourseBuddyAI-frontend-1 | Compiled successfully!
Starting the project with hot-reloading enabled (the first time it will take a while):
docker-compose up -dTo run the alembic migrations (for the users table):
docker-compose run --rm backend alembic upgrade headAnd navigate to http://localhost:8000
Note: If you see an Nginx error at first with a 502: Bad Gateway page, you may have to wait for webpack to build the development server (the nginx container builds much more quickly).
Auto-generated docs will be at http://localhost:8000/api/docs
docker-compose build
docker-compose restart
docker-compose down
Alternatively to running inside docker, it can sometimes be easier to use npm directly for quicker reloading. To run using npm:
cd frontend
npm install
npm start
This should redirect you to http://localhost:3000
cd frontend
npm install
npm test
Migrations are run using alembic. To run all migrations:
docker-compose run --rm backend alembic upgrade head
To create a new migration:
alembic revision -m "create users table"
And fill in upgrade and downgrade methods. For more information see
Alembic's official documentation.
There is a helper script for both frontend and backend tests:
./scripts/test.sh
docker-compose run backend pytest
any arguments to pytest can also be passed after this command
docker-compose run frontend test
This is the same as running npm test from within the frontend directory
docker-compose logs
Or for a specific service:
docker-compose logs -f name_of_service # frontend|backend|db
$tree . -d
.
βββ backend
βΒ Β βββ app
βΒ Β βββ __pycache__
βΒ Β βββ alembic # where migrations are located
βΒ Β βββ api
βΒ Β βΒ Β βββ api_v1
βΒ Β βΒ Β βΒ Β βββ routers
βΒ Β βΒ Β βΒ Β βββ tests
βΒ Β βΒ Β βΒ Β βββ services
βΒ Β βΒ Β βββ dependencies
βΒ Β βββ core # config
βΒ Β βββ db # db models
βΒ Β βββ tests # pytest
βΒ Β βββ main.py # entrypoint to backend
βββ docs
βββ frontend
βΒ Β βββ extension #chrome extension
βΒ Β βββ public
βΒ Β βββ src
βΒ Β βββ __tests__
βΒ Β βββ admin
βΒ Β βΒ Β βββ Users
βΒ Β βββ config # constants
βΒ Β βββ utils
βΒ Β βββ views
βΒ Β βββ index.tsx # entrypoint
βΒ Β βββ App.tsx # handles routing
βββ nginx
βββ scripts