Skip to content

codeforpdx/tenantfirstaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tenant First Aid

A chatbot that provides legal advice related to housing and eviction

Live at https://tenantfirstaid.com/

Local Development

PR Checks CI-CD

Prerequisites

  1. copy backend/.env.example to a new file named .env in the same directory. The chatbot now uses Google Gemini instead of OpenAI.
  2. cd backend
  3. docker-compose up (use -d if you want to run this in the background, otherwise open a new terminal)
  4. uv sync
  5. uv run python -m tenantfirstaid.app
  6. Open a new terminal / tab
  7. cd ../frontend
  8. npm install
  9. npm run dev
  10. Go to http://localhost:5173
  11. Start chatting

Backend Development & Checks

  1. change to the backend/ directory
    % cd backend
  • run individual checks
    1. format Python code with ruff

      % uv run ruff format

      or

      % make fmt
    2. lint Python code with ruff

      % uv run ruff check

      or

      % make lint
    3. 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

      1. typecheck Python code with mypy
        % uv run mypy -p tenantfirstaid --python-executable .venv/bin/python3 --check-untyped-defs
        or
        % make typecheck-mypy
      2. typecheck Python code with pyrefly
        % uv run pyrefly check --python-interpreter .venv/bin/python3
        or
        % make typecheck-pyrefly
    4. 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 previous make rule fail. Omit if you want to stop after the first make rule fails.

Contributing

We currently have regular project meetups: https://www.meetup.com/codepdx/ . Also check out https://www.codepdx.org/ to find our Discord server.

Remote server setup

On DO, we:

  1. added our ssh public keys
  2. install nginx
  3. Kent got the tls cert (just ask chatgpt?)

About

A chatbot that provides legal advice related to housing and eviction

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 12