diigo-cache: README sells and gets to TADA; CONTRIBUTING updated
New README: two sentences, the dev run through connect, fill, and a filtered public page, then features. CONTRIBUTING gains the 1d filters and its own run and deploy sections instead of pointing at the checklist; links to the old README now point at CONTRIBUTING. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
9719fd0aa8
commit
0af7a3ea6c
4 files changed
+70
-11
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# diigo-cache
|
||||
# Contributing to diigo-cache
|
||||
|
||||
Cloudflare Worker cache over [the webapp factory](../webapp/README.md):
|
||||
diigo-cache is a Cloudflare Worker cache over [the webapp factory](../webapp/README.md):
|
||||
session-cookie reads of diigo bookmarks, cached in Durable-Object SQLite
|
||||
storage. Evolved from the diigo-dump worker (provenance:
|
||||
[mm-diigo `projects/diigo-bak/`](https://github.com/dckc/mm-diigo)); the
|
||||
@@ -36,6 +36,14 @@ goal 2 preamble).
|
||||
form (JSON for `Accept: application/json`). Both say `cache: HIT` or
|
||||
`MISS`; every page read also logs `{event: "cache", kind, page,
|
||||
outcome}`.
|
||||
- **Filters on the public page** (`src/query.ts`): `days`, `after`,
|
||||
`before`, `in` (`2026`, `2026-03`, `2026-Q1`, `2026-W41`),
|
||||
`by=updated|created`, and `q` (words, `"phrases"`, `#tag`, `-`
|
||||
negation, gmail/Slack/GitHub date operators). UTC, half-open windows.
|
||||
The same fields work as a dev-side spec (`toQuery({ days: 7 })`). A
|
||||
filter queries the stored `items` table through `viewer()`, never
|
||||
diigo: results are as fresh as the cache, and JSON says `complete`
|
||||
when every diigo page is stored.
|
||||
- **Publish later**: `POST /_publish` (cache id in the body) wires a
|
||||
public companion to a private-only cache.
|
||||
- **The webkey page and Cap'n Web**: `/cache/#<cache id>` is a skeleton
|
||||
@@ -111,10 +119,24 @@ Tests run the real worker and both DOs in the vitest pool, with
|
||||
`WEBAPP` bound to [a fake webapp](tests/fake-webapp.js) serving
|
||||
diigo-shaped items (`wrangler.tests.jsonc`).
|
||||
|
||||
## Run, deploy
|
||||
## Run
|
||||
|
||||
[How to run / connect / deploy is maintained in the capsite checklist](../capsite-checklist.md)
|
||||
(single source; this README keeps only worker-level facts).
|
||||
[The README](README.md) gets a cache going in dev. The same create flow
|
||||
from a terminal:
|
||||
|
||||
Status: create, dump, publish, and public pages exercised against live
|
||||
diigo in dev (2026-10-07); not yet deployed.
|
||||
wid=$(curl -s -X POST http://localhost:8787/_mint --data-urlencode \
|
||||
'url=https://www.diigo.com/interact_api/' --data-urlencode \
|
||||
'headers={"user-agent":"Mozilla/5.0","x-requested-with":"XMLHttpRequest","cookie":"<paste>"}' \
|
||||
--data-urlencode 'msPerCall=500' -D - -o /dev/null | grep -i x-webapp-id)
|
||||
curl -s -X POST http://localhost:8787/_wire -H 'content-type: application/json' \
|
||||
-d "{\"webappId\":\"<from $wid>\",\"mode\":\"private\"}"
|
||||
|
||||
Check a filled cache against a diigo RSS export:
|
||||
`node scripts/compare-export.ts <cache.sqlite> <export.xml> <out-dir>`.
|
||||
|
||||
## Deploy
|
||||
|
||||
Not deployed yet; the order matters (goal 5 in
|
||||
[the capsite checklist](../capsite-checklist.md)): webapp first
|
||||
(`cd ../webapp && npx wrangler deploy`), then diigo-cache, after
|
||||
rate-limiting `/api` (above).
|
||||
Reference in new issue
Block a user