You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Architecture.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
5
-
Tenant First Aid is a chatbot application that provides legal advice related to housing and eviction in Oregon. The system uses a Retrieval-Augmented Generation (RAG) architecture to provide accurate, contextual responses based on Oregon housing law documents.
5
+
Tenant First Aid is a chatbot application that provides legal information related to housing and eviction in Oregon. The system uses a Retrieval-Augmented Generation (RAG) architecture to provide accurate, contextual responses based on Oregon housing law documents.
6
6
7
7
The application follows a modern web architecture with a Flask-based Python backend serving a React frontend, deployed on Digital Ocean infrastructure.
8
8
@@ -462,6 +462,8 @@ frontend/
462
462
│ │ │ ├── MessageContainer.tsx # Layout for main UI component
463
463
│ │ │ ├── Navbar.tsx # Navigation
464
464
│ │ │ └── TenatFirstAidLogo.tsx # Application logo
465
+
│ │ ├── constants/
466
+
│ │ │ └── constants.ts # File of constants
465
467
│ │ └── utils/
466
468
│ │ └── dompurify.ts # Helper function for sanitizing text
1. copy `backend/.env.example` to a new file named `.env` in the same directory. The chatbot now uses Google Gemini instead of OpenAI. You need to authenticate with the gcloud cli to develop, following these instructions:
1. add `GOOGLE_APPLICATION_CREDENTIALS=<PATH_TO_CREDS>` to your `backend/.env` file. The default path will be something like `/home/<USERNAME>/.config/gcloud/application_default_credentials.json` on Unix systems. (HINT: don't use path shortcuts like `~` for home, python won't be able to find it).
21
22
1.`cd backend`
@@ -34,69 +35,79 @@ Live at https://tenantfirstaid.com/
34
35
```sh
35
36
% cd backend
36
37
```
37
-
- run individual checks
38
-
1.*format* Python code with `ruff`
39
-
```sh
40
-
% uv run ruff format
41
-
```
42
-
or
43
-
```sh
44
-
% make fmt
45
-
```
46
-
1. *lint* Python code with `ruff`
47
-
```sh
48
-
% uv run ruff check
49
-
```
50
-
or
51
-
```sh
52
-
% make lint
53
-
```
54
-
1. *typecheck* Python code with `ty`
55
-
```sh
56
-
% uv run ty check
57
-
```
58
-
or
59
-
```sh
60
-
% make typecheck
61
-
```
62
-
63
-
*typecheck* with other Python typecheckers which are not protected in [PR Checks](.github/workflows/pr-check.yml) - useful for completeness & a 2nd opinion
64
-
1. *typecheck* Python code with `mypy`
65
-
```sh
66
-
% uv run mypy -p tenantfirstaid --python-executable .venv/bin/python3 --check-untyped-defs
67
-
```
68
-
or
69
-
```sh
70
-
% make typecheck-mypy
71
-
```
72
-
1. *typecheck* Python code with `pyrefly`
73
-
```sh
74
-
% uv run pyrefly check --python-interpreter .venv/bin/python3
75
-
```
76
-
or
77
-
```sh
78
-
% make typecheck-pyrefly
79
-
```
80
-
1. *test* Python code with `pytest`
81
-
```sh
82
-
% uv run pytest
83
-
```
84
-
or
85
-
```sh
86
-
% make test
87
-
```
88
-
- or run the above checks in one-shot
89
-
```sh
90
-
% make --keep-going check
91
-
```
92
-
`--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.
38
+
39
+
- run individual checks
40
+
41
+
1._format_ Python code with `ruff`
42
+
```sh
43
+
% uv run ruff format
44
+
```
45
+
or
46
+
```sh
47
+
% make fmt
48
+
```
49
+
1. _lint_ Python code with `ruff`
50
+
```sh
51
+
% uv run ruff check
52
+
```
53
+
or
54
+
```sh
55
+
% make lint
56
+
```
57
+
1. _typecheck_ Python code with `ty`
58
+
59
+
```sh
60
+
% uv run ty check
61
+
```
62
+
63
+
or
64
+
65
+
```sh
66
+
% make typecheck
67
+
```
68
+
69
+
_typecheck_ with other Python typecheckers which are not protected in [PR Checks](.github/workflows/pr-check.yml) - useful for completeness & a 2nd opinion
70
+
71
+
1. _typecheck_ Python code with `mypy`
72
+
```sh
73
+
% uv run mypy -p tenantfirstaid --python-executable .venv/bin/python3 --check-untyped-defs
74
+
```
75
+
or
76
+
```sh
77
+
% make typecheck-mypy
78
+
```
79
+
1. _typecheck_ Python code with `pyrefly`
80
+
```sh
81
+
% uv run pyrefly check --python-interpreter .venv/bin/python3
82
+
```
83
+
or
84
+
```sh
85
+
% make typecheck-pyrefly
86
+
```
87
+
88
+
1. _test_ Python code with `pytest`
89
+
```sh
90
+
% uv run pytest
91
+
```
92
+
or
93
+
```sh
94
+
% make test
95
+
```
96
+
97
+
- or run the above checks in one-shot
98
+
```sh
99
+
% make --keep-going check
100
+
```
101
+
`--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.
93
102
94
103
## Contributing
95
104
96
105
We currently have regular project meetups: https://www.meetup.com/codepdx/ . Also check out https://www.codepdx.org/ to find our Discord server.
0 commit comments