Developer Quickstart

Thanks for contributing to UIUC.chat ❤️

Start here

👉 Skip to Frontend or Backend setup instructions.

Key accounts

  • Google: caiincsa@gmail.com

  • Managed services: Vercel, Railway, Beam, Supabase, S3, Posthog, Sentry.

  • Self-hosted: Qdrant, Ollama.

  • Task management via our Github Projects board.

Set up Infiscal

You must setup an account before continuing, for our secrets service Infisical. Confirm you can login here: https://env.ncsa.ai/

Instead of sharing .env files manually, we use Infiscal as a central password manager for devs. We use its CLI and web interface.

See the CLI install docs for Linux/Windows instructions. Or the CLI usage docs.

# install
brew install infisical/get-cli/infisical

Frontend Setup

# clone the repo somewhere good
git clone git@github.com:KastanDay/ai-ta-frontend.git

(1/2) Install dev dependencies

follow these instructions in order; it's tested to work brilliantly.

Use Node version 18.xx LTS

# check that nvm is installed (any version). 
# easily install here: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
nvm --version 

# use node version 18
nvm install 18
nvm use 18
node --version  # v18.20.4

Install dev dependencies

# navigate to the root of the github
cd path/to/ai-ta-frontend

# install all necessary dependencies 
npm i 

(2/2) Set up secrets

# navigate to the root of the github
cd path/to/ai-ta-frontend

infisical login
# ⭐️ --> select "Self Hosting"
# ⭐️ --> enter "https://env.ncsa.ai"
# ⭐️ click the login link
# ⭐️ likely enter your main computer password

Last step: start dev server!

You will need to run the below command once for the initial setup

# Use our linter, Trunk SuperLinter. 
# Just run the commande below once to install it.
# Now every `git commit` and `git push` will trigger linting.
# We suggest accepting the auto-formatting suggestions.

npm exec trunk check

Run the app on your local machine

# run server with secrets & live reload
# as defined in package.json, this actually runs: infisical run --env=dev -- next dev
npm run dev

# you should see a log of the secrets being injected
INF Injecting 32 Infisical secrets into your application process
...
   Next.js 13.5.6
  - Local:        http://localhost:3000
  
# cmd + click on the URL to open your browser :) 

npm run dev is the most important command you'll use every dev session.


Backend Setup

# clone the repo somewhere good
git clone git@github.com:UIUC-Chatbot/ai-ta-backend.git

(1/2) Install dev dependencies

Use a python virtual environment, here I'll use conda.

Use python 3.10.

conda create --name ai-ta-backend python=3.10 -y

conda activate ai-ta-backend

pip install -r requirements.txt

(2/2) Set up secrets

You must setup an account before continuing, for our secrets service Infisical. Confirm you can login here: https://env.ncsa.ai/

Also make sure to install Infiscal in your local machine as mentioned above

# navigate to the root of the github
cd path/to/ai-ta-backend

infisical login
# ⭐️ --> select "Self Hosting"
# ⭐️ --> enter "https://env.ncsa.ai"
# ⭐️ click the login link
# ⭐️ likely enter your main computer password

Last step: start dev server!

# start dev server on localhost:8000
infisical run --env=dev -- flask --app ai_ta_backend.main:app --debug run --port 8000

Now you can write new endpoints in ai-ta-backend/main.py and call them using Postman.

Thanks! For any questions at all just email me (kvday2@illinois.edu). I'm friendly, promise.

Last updated