Collection of tools useful for Virginia Tech ECE MDE course administration.
The following is required to fully run this toolkit.
By far the easiest way to get up and running with this tool is through Docker. Doing so means you do not need to install any additional packages or software; just build the associated Docker images and you're done. This also allows the toolkit to be deployed on the cloud if necessary.
docker compose
command is installeddocker compose build
docker compose up -d
frontend
containerbackend
containerThe following is a description of what each Docker container does. Refer to docker-compose.yml for specific configuration details.
Container | Description |
---|---|
frontend |
The primary web application codebase written using NextJS . This contains both the front-end UI and back-end REST API routes. |
backend |
Legacy REST API endpoints written in Python FastAPI and served using gunicorn . This is carryover from previous toolkit development that implemented a standalone CLI. We keep it around to support those legacy calls, and adds flexibility for Python-specific implementations in the future. |
db |
The toolkit database. Note that future deployments could opt for a cloud-hosted database solution if desired. |
The toolkit uses Google APIs to access services such as Google Drive, user email, and other things. Before using this tool, you MUST create a Google developer account, create a project for this toolkit, and copy the associated API keys.
A really good guide on how to do this can be found here: https://refine.dev/blog/nextauth-google-github-authentication-nextjs/
Note that you can skip the NextJS project creation part and jump straight to the "For GoogleProvider" section
To summarize, you need to do the following:
./frontend/env.local
GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
variables into ./frontend/env.local
:GOOGLE_CLIENT_ID=xxxxxxxxxx
GOOGLE_CLIENT_SECRET=yyyyyyyyyy
$ openssl rand -base64 32
./frontend/env.local
along with your front-end deployed URL# ...
NEXTAUTH_URL=http://localhost:3000 # for development
# NEXTAUTH_URL=https://{YOURDOMAIN} # for deployment
NEXTAUTH_SECRET=zzzzzzzzzz
@vt.edu
addresses, so be sure to only add addresses which match this domain (see NextAuth config file).CANVAS_API_TOKEN
jq
to filter JSON responses?per_page=100
query modifier.Basic query to get list of courses:
curl -H "Authorization: Bearer ${CANVAS_API_TOKEN}" "https://canvas.vt.edu/api/v1/courses?per_page=100"