A chatbot that provides legal advice related to housing and eviction
Live at https://tenantfirstaid.com/
- copy
backend/.env.example
to a new file named.env
in the same directory and populate it with yourOPENAI_API_KEY
. You can set an invalid key, in which case the bot will return error messages. This may still be useful for developing other features. cd backend
docker-compose up
(use-d
if you want to run this in the background, otherwise open a new terminal)uv sync
- If you have not uploaded the Oregon Housing Law documents to a vector store in OpenAI, run
uv run scripts/create_vector_store.py
and follow the instructions to add the vector store ID to your.env
. uv run python -m tenantfirstaid.app
- Open a new terminal / tab
cd ../frontend
npm install
npm run dev
- Go to http://localhost:5173
- Start chatting
- change to the
backend/
directory% cd backend
- run individual checks
- format Python code with
ruff
or% uv run ruff format
% make fmt
- lint Python code with
ruff
or% uv run ruff check
% make lint
- typecheck Python code with
ty
or% uv run ty check
% make typecheck
- test Python code with
pytest
or% uv run pytest
% make test
- format Python code with
- or run the above checks in one-shot
% make --keep-going check
--keep-going
will continue to run checks, even if previousmake
rule fail. Omit if you want to stop after the firstmake
rule fails.
We currently have regular project meetups: https://www.meetup.com/codepdx/ . Also check out https://www.codepdx.org/ to find our Discord server.
On DO, we:
- added our ssh public keys
- install nginx
- Kent got the tls cert (just ask chatgpt?)
go to the route /feedback
for extra features. You will need to provide the password defined in your .env
file.