Convert README.nfo to README.org !1
merged
merged by cmc on 2026-08-31 22:39 UTC
· krz/hutch-notify:nfo-to-org into main
3 files changed, +91 −45
Layout: unified · split
.github/workflows/test.yml
added
+48
| @@ -0,0 +1,48 @@ |
| |
1 | name: Test |
| |
2 | |
| |
3 | # There is no test suite here yet, so this is the next most useful thing: prove |
| |
4 | # the service still installs from its lockfile and that every module imports. |
| |
5 | # That catches a broken import, a dependency dropped from pyproject, and a |
| |
6 | # settings field added without a default — the failures that would otherwise |
| |
7 | # surface as a container that will not start. |
| |
8 | on: |
| |
9 | pull_request: |
| |
10 | push: |
| |
11 | branches: [main] |
| |
12 | |
| |
13 | permissions: |
| |
14 | contents: read |
| |
15 | |
| |
16 | jobs: |
| |
17 | import: |
| |
18 | runs-on: ubuntu-latest |
| |
19 | steps: |
| |
20 | - uses: actions/checkout@v7 |
| |
21 | |
| |
22 | - uses: astral-sh/setup-uv@v10.0.1 |
| |
23 | with: |
| |
24 | enable-cache: true |
| |
25 | |
| |
26 | # --locked, not --frozen: --frozen installs from the lockfile without |
| |
27 | # consulting pyproject.toml, so a manifest that has drifted past its lock |
| |
28 | # installs happily and CI stays green. |
| |
29 | - name: Install |
| |
30 | run: uv sync --locked |
| |
31 | |
| |
32 | # Settings are validated at import, and several fields have no default, so |
| |
33 | # the values below stand in for real ones. They are deliberately obvious |
| |
34 | # rubbish: this proves the modules load, not that the service is |
| |
35 | # configured. |
| |
36 | - name: Modules import |
| |
37 | env: |
| |
38 | APNS_KEY_ID: ci |
| |
39 | APNS_TEAM_ID: ci |
| |
40 | APNS_BUNDLE_ID: ci |
| |
41 | APNS_PRIVATE_KEY_PATH: /dev/null |
| |
42 | SRHT_TOKEN: ci |
| |
43 | run: | |
| |
44 | uv run python -c " |
| |
45 | import app.main, app.config, app.db, app.models |
| |
46 | import app.crud, app.poller, app.jobs, app.apns |
| |
47 | print('all modules imported') |
| |
48 | " |
README.nfo
deleted
−45
| @@ -1,45 +0,0 @@ |
| 1 | ┌──────────────────────────────────────────────────────────────┐ |
| |
| 2 | │ H U T C H - N O T I F Y [ KRZ ] krz.sh │ |
| |
| 3 | └──────────────────────────────────────────────────────────────┘ |
| |
| 4 | |
| |
| 5 | WHAT |
| |
| 6 | backend for push notifications in hutch. |
| |
| 7 | |
| |
| 8 | DOES |
| |
| 9 | - register apns device tokens |
| |
| 10 | - store notification subscriptions |
| |
| 11 | - poll sr.ht for changes |
| |
| 12 | - send pushes via apns |
| |
| 13 | |
| |
| 14 | STACK |
| |
| 15 | python (fastapi), sqlite, apns (http/2, token auth). |
| |
| 16 | |
| |
| 17 | STATUS |
| |
| 18 | early development. current scope: device registration and a test |
| |
| 19 | push endpoint. planned: build, ticket, and inbox notifications. |
| |
| 20 | |
| |
| 21 | RUN |
| |
| 22 | python3.12 -m venv .venv |
| |
| 23 | source .venv/bin/activate |
| |
| 24 | pip install -r requirements.txt |
| |
| 25 | uvicorn app.main:app --reload |
| |
| 26 | |
| |
| 27 | ENV |
| |
| 28 | create .env: |
| |
| 29 | |
| |
| 30 | API_KEY=change-me |
| |
| 31 | DATABASE_URL=sqlite+aiosqlite:///./hutch_notify.db |
| |
| 32 | APNS_KEY_ID= |
| |
| 33 | APNS_TEAM_ID= |
| |
| 34 | APNS_BUNDLE_ID= |
| |
| 35 | APNS_PRIVATE_KEY_PATH= |
| |
| 36 | SRHT_TOKEN= |
| |
| 37 | |
| |
| 38 | NOTES |
| |
| 39 | - the ios app registers with apns and sends its token here. |
| |
| 40 | - keep the apns .p8 key secure. |
| |
| 41 | - event-driven eventually; the first version polls. |
| |
| 42 | |
| |
| 43 | ┌──────────────────────────────────────────────────────────────┐ |
| |
| 44 | │ krz.sh │ |
| |
| 45 | └──────────────────────────────────────────────────────────────┘ |
| |
README.org
added
+43
| @@ -0,0 +1,43 @@ |
| |
1 | #+title: hutch-notify |
| |
2 | |
| |
3 | * what |
| |
4 | backend for push notifications in hutch. |
| |
5 | |
| |
6 | * does |
| |
7 | - register apns device tokens |
| |
8 | - store notification subscriptions |
| |
9 | - poll sr.ht for changes |
| |
10 | - send pushes via apns |
| |
11 | |
| |
12 | * stack |
| |
13 | python (fastapi), sqlite, apns (http/2, token auth). |
| |
14 | |
| |
15 | * status |
| |
16 | early development. current scope: device registration and a test |
| |
17 | push endpoint. planned: build, ticket, and inbox notifications. |
| |
18 | |
| |
19 | * run |
| |
20 | #+begin_src sh |
| |
21 | python3.12 -m venv .venv |
| |
22 | source .venv/bin/activate |
| |
23 | pip install -r requirements.txt |
| |
24 | uvicorn app.main:app --reload |
| |
25 | #+end_src |
| |
26 | |
| |
27 | * env |
| |
28 | create .env: |
| |
29 | |
| |
30 | #+begin_src conf |
| |
31 | API_KEY=change-me |
| |
32 | DATABASE_URL=sqlite+aiosqlite:///./hutch_notify.db |
| |
33 | APNS_KEY_ID= |
| |
34 | APNS_TEAM_ID= |
| |
35 | APNS_BUNDLE_ID= |
| |
36 | APNS_PRIVATE_KEY_PATH= |
| |
37 | SRHT_TOKEN= |
| |
38 | #+end_src |
| |
39 | |
| |
40 | * notes |
| |
41 | - the ios app registers with apns and sends its token here. |
| |
42 | - keep the apns .p8 key secure. |
| |
43 | - event-driven eventually; the first version polls. |