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
% uv run ruff format
or
% make fmt
-
lint Python code with
ruff
% uv run ruff check
or
% make lint
-
typecheck Python code with
ty
% uv run ty check
or
% make typecheck
typecheck with other Python typecheckers which are not protected in PR Checks - useful for completeness & a 2nd opinion
- typecheck Python code with
mypy
or% uv run mypy -p tenantfirstaid --python-executable .venv/bin/python3 --check-untyped-defs
% make typecheck-mypy
- typecheck Python code with
pyrefly
or% uv run pyrefly check --python-interpreter .venv/bin/python3
% make typecheck-pyrefly
- typecheck Python code with
-
test Python code with
pytest
% uv run pytest
or
% make test
-
- 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?)