UIUC.chat Documentation
UIUC.chat Main Page
  • Quick start
  • FAQs
  • Features
    • Tool use in conversation
    • Retrieval Methods
    • Web Crawling Details
    • Bulk Export Documents or Conversation History
    • Duplication in Ingested Documents
  • CropWizard
    • CropWizard Documents
    • Pest Detection Tool
    • CropWizard Document License Information
  • API
    • API Keys
    • Endpoints
  • Technical
    • System Architecture
  • Developers
    • Developer Quickstart
Powered by GitBook
On this page
  • Start here
  • Set up Infiscal for Environment Variables
  • Where are my .env variables?
  • Frontend Setup
  • (1/2) Install dev dependencies
  • (2/2) Set up secrets
  • Last step: start dev server!
  • Backend Setup
  • (1/2) Install dev dependencies
  • (2/2) Set up secrets
  • Last step: start dev server!

Was this helpful?

  1. Developers

Developer Quickstart

Thanks for contributing to UIUC.chat ❤️

PreviousSystem Architecture

Last updated 9 days ago

Was this helpful?

Start here

Background info on Key accounts
  • Google: caiincsa@gmail.com

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

  • Self-hosted: Qdrant, Ollama.

  • Task management via .

Set up Infiscal for Environment Variables

You must setup an account before continuing, for our secrets service . Confirm you can login here:

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 for Linux/Windows instructions. Or the .

# install
brew install infisical/get-cli/infisical
# add the repository
curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' \
| sudo -E bash

# install
sudo apt-get update && sudo apt-get install -y infisical

Where are my .env variables?

If it's in production, or any cloud service, the env vars are stored directly in that cloud service. Those include Vercel, Railway, Beam.cloud and more. You can edit env vars in those services, just be careful.

Frontend Setup

# clone the repo somewhere good
git clone git@github.com:CAII-NCSA/uiuc-chat-frontend.git
❌ Seeing an error? git@github.com: Permission denied (publickey).

If you see an error like this:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Finally, attempt cloning the repo again.

(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 uiuc-chat-frontend

# install all necessary dependencies 
npm i 

(2/2) Set up secrets

# navigate to the root of the github
cd uiuc-chat-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
❌ Seeing an error? git@github.com: Permission denied (publickey).

If you see an error like this:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Finally, attempt cloning the repo again.

(1/2) Install dev dependencies

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

Use python 3.10.

  1. Create and activate Conda env

conda create --name ai-ta-backend python=3.10 -y && conda activate ai-ta-backend
  1. Install dependencies

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

# install dependencies
pip install -r requirements.txt

(2/2) Set up secrets

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

Thanks! For any questions at all just email me (rohan13@illinois.edu).

If it's running on localhost, the env vars come from Infisical, our shared secrets manager. You can add new env vars at .

Frontend repo:

Then you have to add your local sshkey to your Github account here:

Backend repo:

Then you have to add your local sshkey to your Github account here:

(via CLI is easiest), if you don't have it yet.

You must setup an account before continuing, for our secrets service . Confirm you can login here:

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

GitHub Organization
Frontend repo
Secrets manager
our Github Projects board
Infisical
https://env.ncsa.ai/
CLI install docs
CLI usage docs
env.ncsa.ai
https://github.com/CAII-NCSA/uiuc-chat-frontend
https://github.com/settings/keys
https://github.com/UIUC-Chatbot/ai-ta-backend
https://github.com/settings/keys
Fast and easy conda install
Infisical
https://env.ncsa.ai/
Postman