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
{{ message }}
Repository navigation
Migrate the Adopt-a-Pet weekly analytics into Evermore #339
The weekly adoption-profile analytics run today as a standalone local project outside this repo:
aap_pet_stats.py logs into the shelter's Adopt-a-Pet account with Playwright and reads the Individual Pet Stats report, read-only (the login POST is the only write). It writes an append-only weekly snapshot and a rolling history.json with 7-day, 30-day, and all-time hits, views, and CTR per pet.
build_dashboard.py renders a self-contained HTML dashboard from that history: CTR as the hero chart, views and search appearances, weekly Monday-anchored trend with estimated gap weeks marked, and a printable per-pet appendix.
backfill_from_dashboard.py is a one-time import of two weeks parsed from emailed PDFs.
run_weekly.sh runs extract then build by hand each week, and deploy_dashboard.sh direct-uploads the single HTML file to Cloudflare Pages behind Cloudflare Access.
Moving it into Evermore puts the weekly run on a schedule, stores the history org-scoped instead of in a local JSON file, and serves the dashboard from the stack.
Related: #306 (Adopt-a-Pet feed/API read adapter) reads the same source for listing compliance; #47 (time-online outcome metric).
Acceptance Criteria
Weekly per-pet Adopt-a-Pet stats are pulled on a schedule with no manual run, read-only against Adopt-a-Pet
Shelter credentials are held as secrets, never logged or stored in the database
Snapshot history lives in Supabase, org-scoped under RLS, observed values only (estimates computed at render, never stored)
The existing history.json weeks, including the two backfilled PDF weeks, are imported
The dashboard renders in Evermore with the current charts and the printable per-pet appendix, restricted to the owning org
The standalone scripts and the Cloudflare Pages deploy are retired once the Evermore version has run one week
Activity