Skip to content

Commit e183bdc

Browse files
authored
Merge pull request #229 from codeforpdx/issue-217/update-disclaimers
[Enhancement] - Update Disclaimers
2 parents be4877c + 33c2d37 commit e183bdc

File tree

15 files changed

+291
-119
lines changed

15 files changed

+291
-119
lines changed

.github/workflows/pr-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ jobs:
6666

6767
- name: Run linting checks
6868
run: npm run lint
69-
- name: Run format checks
70-
run: npx prettier --check .
69+
- name: Run format fixes
70+
run: npx prettier --write .
7171

7272
- name: Run frontend tests
7373
run: npm run test

Architecture.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

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.
66

77
The application follows a modern web architecture with a Flask-based Python backend serving a React frontend, deployed on Digital Ocean infrastructure.
88

@@ -462,6 +462,8 @@ frontend/
462462
│ │ │ ├── MessageContainer.tsx # Layout for main UI component
463463
│ │ │ ├── Navbar.tsx # Navigation
464464
│ │ │ └── TenatFirstAidLogo.tsx # Application logo
465+
│ │ ├── constants/
466+
│ │ │ └── constants.ts # File of constants
465467
│ │ └── utils/
466468
│ │ └── dompurify.ts # Helper function for sanitizing text
467469
│ └── tests/

README.md

Lines changed: 71 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tenant First Aid
22

3-
A chatbot that provides legal advice related to housing and eviction
3+
A chatbot that provides legal information related to housing and eviction in Oregon.
44

55
Live at https://tenantfirstaid.com/
66

@@ -10,12 +10,13 @@ Live at https://tenantfirstaid.com/
1010
[![CI-CD](https://github.com/codeforpdx/tenantfirstaid/actions/workflows/deploy.yml/badge.svg)](https://github.com/codeforpdx/tenantfirstaid/actions/workflows/deploy.yml)
1111

1212
### Prerequisites
13-
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
13+
14+
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
1415

1516
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:
1617
1. [install gcloud](https://cloud.google.com/sdk/docs/install)
1718
1. [generate application default credentials file](https://cloud.google.com/docs/authentication/application-default-credentials)
18-
1. `gcloud auth application-default login`
19+
1. `gcloud auth application-default login`
1920
1. `gcloud auth application-default set-quota-project tenantfirstaid`
2021
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).
2122
1. `cd backend`
@@ -34,69 +35,79 @@ Live at https://tenantfirstaid.com/
3435
```sh
3536
% cd backend
3637
```
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.
93102

94103
## Contributing
95104

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

98107
## Remote server setup
108+
99109
On DO, we:
110+
100111
1. added our ssh public keys
101112
2. install nginx
102-
3. Kent got the tls cert (just ask chatgpt?)
113+
3. Kent got the tls cert (just ask chatgpt?)

frontend/src/About.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import BackLink from "./shared/components/BackLink";
2+
import { CONTACT_EMAIL } from "./shared/constants/constants";
23

34
export default function About() {
45
return (
@@ -38,7 +39,7 @@ export default function About() {
3839
<h2 className="text-2xl font-semibold mt-6 mb-2">Contact:</h2>
3940
<p>Michael Zhang</p>
4041
<p>Attorney, licensed in Oregon and Washington</p>
41-
42+
<p>{CONTACT_EMAIL}</p>
4243
<h2 className="text-2xl font-semibold mt-6 mb-2">Features</h2>
4344
<ul className="list-disc list-inside">
4445
<li>Instant answers to common rental questions</li>

frontend/src/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function Chat() {
1212
const { letterContent } = useLetterContent(messages);
1313

1414
return (
15-
// Chat layout are adjusted before and after session starts to account for CitySelectField
15+
// Chat layout is adjusted before and after session starts to account for CitySelectField
1616
<div
1717
className={`absolute ${isOngoing ? "top-16 md:top-32" : "top-1/2 -translate-y-1/2"} w-full flex items-center`}
1818
>

frontend/src/Disclaimer.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Link } from "react-router-dom";
22
import BackLink from "./shared/components/BackLink";
33
import { useEffect } from "react";
4+
import { CONTACT_EMAIL } from "./shared/constants/constants";
45

56
export default function Disclaimer() {
67
useEffect(() => {
@@ -27,12 +28,13 @@ export default function Disclaimer() {
2728
<p className="my-4">
2829
If you have any questions about these Terms or our Services, please
2930
contact us at{" "}
30-
<Link
31-
to="mailto:[email protected]"
31+
<a
32+
href={`mailto:${CONTACT_EMAIL}`}
3233
className="underline text-blue-600"
34+
aria-label="contact-email"
3335
>
34-
35-
</Link>
36+
{CONTACT_EMAIL}
37+
</a>
3638
.
3739
</p>
3840
<h3 className="text-xl font-semibold my-4">1. Eligibility</h3>
@@ -404,12 +406,13 @@ export default function Disclaimer() {
404406
You have the right to opt out of binding arbitration within thirty
405407
(30) days of the date you first accepted the terms of this Section 14
406408
by sending an email to{" "}
407-
<Link
408-
to="mailto:[email protected]"
409+
<a
410+
href={`mailto:${CONTACT_EMAIL}`}
409411
className="underline text-blue-600"
412+
aria-label="contact-email"
410413
>
411-
412-
</Link>{" "}
414+
{CONTACT_EMAIL}
415+
</a>{" "}
413416
in order to be effective, the opt out notice must include your full
414417
name and clearly indicate your intent to opt out of binding
415418
arbitration. By opting out of binding arbitration, you are agreeing to

frontend/src/PrivacyPolicy.tsx

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Link } from "react-router-dom";
22
import BackLink from "./shared/components/BackLink";
33
import { useEffect } from "react";
4+
import { CONTACT_EMAIL } from "./shared/constants/constants";
45

56
export default function PrivacyPolicy() {
67
useEffect(() => {
@@ -12,7 +13,7 @@ export default function PrivacyPolicy() {
1213
<div className="relative max-w-2xl m-auto p-8 bg-[#F4F4F2] rounded-lg shadow-md">
1314
<BackLink />
1415
<h2 className="text-2xl font-semibold mt-6">Privacy Policy</h2>
15-
<em>Last Updated: June 19, 2025</em>
16+
<em>Last Updated: December 7, 2025</em>
1617
<p className="my-4">
1718
Tenant First Aid, a program of Code PDX and Qiu Qiu Law ("
1819
<span className="underline">Tenant First Aid</span>
@@ -37,15 +38,25 @@ export default function PrivacyPolicy() {
3738
<span>Collection of Information</span>
3839
<span>Information You Provide to Us</span>
3940
</h3>
40-
<p>
41-
We collect transcripts of all conversations for quality improvement
42-
purposes. We do not encourage you to provide your name, address, or
43-
other sensitive information, and generally do not need it to answer
44-
the type of general questions that Tenant First Aid is meant for.
41+
<p className="my-4">
42+
Tenant First Aid does not store or retain any personal data or
43+
conversation transcripts during normal usage. All interactions are
44+
processed in real time and are not saved to our servers. We do not
45+
encourage you to provide your name, address, or other sensitive
46+
information, and generally do not need it to answer the type of
47+
general questions that Tenant First Aid is meant for.
48+
</p>
49+
<p className="my-4">
50+
However, if you choose to submit feedback through the feedback
51+
feature, you may be asked to include the conversation transcript. This
52+
information is used solely for debugging, product improvement, and
53+
developer support. We only collect this data when you voluntarily
54+
provide it as part of your feedback submission. Any words or details
55+
you wish to protect can be redacted before submitting your feedback.
4556
</p>
4657
<p className="my-4">
47-
When you access or use our Services, we automatically collect
48-
information about you, including:
58+
When you access or use our Services, we automatically collect other
59+
relevant information about you, including:
4960
</p>
5061
<ul className="list-disc list-outside my-4 pl-4">
5162
<li>
@@ -201,12 +212,13 @@ export default function PrivacyPolicy() {
201212
<p>
202213
You may update, correct or delete information about you at any time by
203214
interacting with the Services, or emailing us at{" "}
204-
<Link
205-
to="mailto:[email protected]"
215+
<a
216+
href={`mailto:${CONTACT_EMAIL}`}
206217
className="underline text-blue-600"
218+
aria-label="contact-email"
207219
>
208-
209-
</Link>
220+
{CONTACT_EMAIL}
221+
</a>
210222
. We may also retain cached or archived copies of information about
211223
you for a certain period of time.
212224
</p>
@@ -225,12 +237,13 @@ export default function PrivacyPolicy() {
225237
<p>
226238
If you have any questions about this Privacy Policy, please contact us
227239
at:{" "}
228-
<Link
229-
to="mailto:[email protected]"
240+
<a
241+
href={`mailto:${CONTACT_EMAIL}`}
230242
className="underline text-blue-600"
243+
aria-label="contact-email"
231244
>
232-
233-
</Link>
245+
{CONTACT_EMAIL}
246+
</a>
234247
</p>
235248
</div>
236249
</div>

0 commit comments

Comments
 (0)