From 3cda4df528479e0f69dfeef3cf602a2124dca434 Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Fri, 7 Aug 2026 21:49:14 +1000 Subject: [PATCH] docs EOD: roadmap status (phases 1-4,7 done), AGENTS.md live-state, tuxedo board, deploy-frontend tasks --- AGENTS.md | 21 ++++++++++++------ openspec/changes/deploy-frontend/tasks.md | 18 +++++++-------- todo.txt | 27 ++++++++++++++--------- where_woof.md | 22 +++++++++++++----- 4 files changed, 55 insertions(+), 33 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 30fccec..0698952 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,12 +12,17 @@ Where Woof — a **return-tag platform** (not a tracker): pre-coded QR/NFC tags - Per change: **openspec** (propose → design/specs → tasks, `openspec validate`) → **plannotator** plan (`plans/.md`, submit → approve) → execute with `[DONE:n]` → run `/tmp` verify suites → `code-analysis` review → commit + push to Gitea. - This is a **learning exercise for the user** — explain decisions, don't just execute. -## Where we are (2026-08-05) +## Where we are (2026-08-07 EOD) -- **Phase 1 `frontend-foundation` — DONE** (22/22 scenarios verified) -- **Phase 2 `scan-flow` — CODE DONE + verified (19/19)**; **step 9 (real SMS) PENDING** — needs the user's SMSGlobal (MXT) API key/secret; verify `frontend/internal/sms/smsglobal.go` auth against their prior globalsms integration before the real send -- **Phase 2.5 queued (tuxedo, priority B):** ① re-alert when a *different* finder phone arrives within the 250 m / 10-min window; ② JS browser fingerprint + 24 h block (store fingerprint in DB) -- **Phases 3–9 pending** (see roadmap in `where_woof.md`): HTMX/Alpine polish → Laravel admin → billing (Stripe AU) → photo uploads → deploy frontend (.13 + Caddy .35 + InMotion redirect) → deploy admin → anti-abuse hardening +- **Phase 1 `frontend-foundation` — DONE** (22/22) +- **Phase 2 `scan-flow` — DONE** (19/19 + real SMS via SMSGlobal HTTP API) +- **Phase 2.5 `scan-alert-hardening` — DONE** (12/12: different-finder re-alert + fingerprint 24h block) +- **Phase 3 HTMX/Alpine polish — DONE** (+ tuxedo notes: photo upload, username/email display, favicon) +- **Phase 4 `laravel-admin` — DONE** (Docker Laravel + Filament on .27:3030, shared Postgres, verified) +- **Phase 7 `deploy-frontend` — LIVE on .13** (systemd user service :3020, Caddy blocks saved on .35) + - ⏳ **Outstanding (user, AM)**: where-woof.com DNS/redirect — A record still at InMotion (173.231.229.92); lab domains use a redirect mechanism (NOT a plain A record — user correction, investigate how both are configured); may involve router/NAT settings + - Admin (`admin.where-woof.com` → .13:3030) is Phase 8 — nothing runs on 3030 yet +- **Remaining**: Phase 5 billing, Phase 6 photos, Phase 8 admin deploy, Phase 9 hardening ## Key locations @@ -31,8 +36,10 @@ Where Woof — a **return-tag platform** (not a tracker): pre-coded QR/NFC tags | Build/run targets | `Makefile` — `db-up`, `seed`, `run`, `build`, `generate`, `psql` | | Dev DB | `wherewoof-db` Postgres 16 container on **.13:5434** (user/db `wherewoof`; compose + `.env` in `/home/sam/Docker/Containers/wherewoof-db/` on .13) | | Run locally | `make db-up && make seed && make run` → `http://localhost:3020` (SMS in **log mode** until creds set) | -| Verify suites | `/tmp/verify.sh` (Phase 1, 22 checks), `/tmp/verify2.sh` (Phase 2, 19 checks) — ephemeral, they reset the DB | -| Prod target | `.13:/var/www/where-woof` — **NOT deployed yet (Phase 7)**; Caddy on .35; InMotion redirect → `where-woof.com` | +| Live frontend | **.13:3020** systemd user service `where-woof` (`/var/www/where-woof`, env `~/.config/where-woof.env`); `where-woof.home.lab` works via .35 Caddy | +| Admin (dev) | **.27:3030** Docker Laravel (`admin/`, Filament) — `cd admin && docker compose up -d`; live deploy = Phase 8 | +| Verify suites | `/tmp/verify.sh` (Phase 1, 22), `/tmp/verify2.sh` (Phase 2, 19), `/tmp/verify3.sh` (hardening, 12) — ephemeral, they reset the DB (incl. admin user — re-seed via `php artisan wherewoof:admin`) | +| Prod target | `.13:/var/www/where-woof` — **frontend LIVE**; admin not yet deployed; Caddy on .35; `where-woof.com` DNS at InMotion (outstanding) | Gitea | `sam/where_woof` — `ssh://git@gitea.lab.audasmedia.com.au:2222/sam/where_woof.git` | ## Tools diff --git a/openspec/changes/deploy-frontend/tasks.md b/openspec/changes/deploy-frontend/tasks.md index 2a70204..6d54ddc 100644 --- a/openspec/changes/deploy-frontend/tasks.md +++ b/openspec/changes/deploy-frontend/tasks.md @@ -1,20 +1,20 @@ ## 1. Artifacts -- [ ] 1.1 `make build` on .27 → `frontend/where-woof` binary -- [ ] 1.2 rsync binary + `templates/` + `static/` → `sam@192.168.20.13:/var/www/where-woof` (NO --delete on static; uploads preserved); `mkdir -p static/uploads` + chown +- [x] 1.1 `make build` on .27 → `frontend/where-woof` binary +- [x] 1.2 rsync binary + `templates/` + `static/` → `sam@192.168.20.13:/var/www/where-woof` (NO --delete on static; uploads preserved); `mkdir -p static/uploads` + chown ## 2. Service -- [ ] 2.1 Write `/home/sam/.config/where-woof.env` on .13 (DATABASE_URL→localhost:5434, SESSION_SECRET, SMS_* ; chmod 600) -- [ ] 2.2 `~/.config/systemd/user/where-woof.service` (WorkingDirectory=/var/www/where-woof, Restart=on-failure, EnvironmentFile, port 3020); `daemon-reload`, `enable --now`, `loginctl enable-linger sam` -- [ ] 2.3 Verify: curl localhost:3020 on .13 (200); from .27 via 192.168.20.13:3020 +- [x] 2.1 Write `/home/sam/.config/where-woof.env` on .13 (DATABASE_URL→localhost:5434, SESSION_SECRET, SMS_* ; chmod 600) +- [x] 2.2 `~/.config/systemd/user/where-woof.service` (WorkingDirectory=/var/www/where-woof, Restart=on-failure, EnvironmentFile, port 3020); `daemon-reload`, `enable --now`, `loginctl enable-linger sam` +- [x] 2.3 Verify: curl localhost:3020 on .13 (200); from .27 via 192.168.20.13:3020 ## 3. Caddy / DNS -- [ ] 3.1 Confirm the .35 Caddy block is present (user saved it); test `where-woof.home.lab` → .35 → .13:3020 if local DNS resolves -- [ ] 3.2 Document the InMotion → where-woof.com DNS repoint as the user step +- [x] 3.1 Confirm the .35 Caddy block is present (user saved it); test `where-woof.home.lab` → .35 → .13:3020 if local DNS resolves +- [x] 3.2 Document the InMotion → where-woof.com DNS repoint as the user step (DNS outstanding — see tuxedo) ## 4. Verification -- [ ] 4.1 Full smoke on .13: register → claim TEST000001 → edit → public page; SMS in log mode unless creds set -- [ ] 4.2 `openspec validate deploy-frontend`; commit +- [x] 4.1 Full smoke on .13: register → claim TEST000001 → edit → public page; SMS in log mode unless creds set +- [x] 4.2 `openspec validate deploy-frontend`; commit diff --git a/todo.txt b/todo.txt index 954d713..de2df91 100644 --- a/todo.txt +++ b/todo.txt @@ -1,15 +1,20 @@ -(A) openspec: init + project.md + change frontend-foundation +project:where-woof +agent:where_woof -(B) plannotator: review frontend-foundation plan +project:where-woof +agent:where_woof -(C) Execute Phase 1 (GOAT: scaffold, schema, auth, tag setup, public page) +project:where-woof +agent:where_woof -(D) Execute Phase 2 (scan flow: geolocation -> SMS, tel/sms links, finder contact) +project:where-woof +agent:where_woof -(E) Laravel admin phase (users, tags, dashboard) +project:where-woof +agent:where_woof -(F) Billing phase (Stripe AU, plans, scan limits) +project:where-woof +agent:where_woof -(G) Deploy front-end to .13 + Caddy + DNS + InMotion redirect +project:where-woof +agent:where_woof -x 2026-08-05 Set up Gitea for where_woof +project:where-woof +agent:where_woof -x 2026-08-07 (B) Scan-flow: re-alert when different finder phone within 250 m window +project:where-woof +agent:right-monitor-pi-coding -x 2026-08-07 (B) Scan-flow: browser fingerprint + 24 h block, store in DB +project:where-woof +agent:right-monitor-pi-coding -x 2026-08-07 (B) Preset tag-ID registry: seed real manufactured IDs, enforce registry-only (anti-scam) +project:where-woof +agent:right-monitor-pi-coding +x 2026-08-07 (A) openspec: init + project.md + change frontend-foundation +project:where-woof +agent:where_woof +x 2026-08-07 (B) plannotator: review frontend-foundation plan +project:where-woof +agent:where_woof +x 2026-08-07 (C) Execute Phase 1 (GOAT: scaffold, schema, auth, tag setup, public page) +project:where-woof +agent:where_woof +x 2026-08-07 (D) Execute Phase 2 (scan flow: geolocation -> SMS, tel/sms links, finder contact) +project:where-woof +agent:where_woof +x 2026-08-07 (E) Laravel admin phase (users, tags, dashboard) +project:where-woof +agent:where_woof +x 2026-08-07 (G) Deploy front-end to .13 + Caddy + DNS + InMotion redirect (service live; DNS pending) +project:where-woof +agent:where_woof x 2026-08-07 (A) Photo +project:where-woof +issues:htmx x 2026-08-07 (A) Confirm Username and See username +project:where-woof +issues:htmx x 2026-08-07 (A) Favicon +project:where-woof +issues:htmx x 2026-08-07 (A) Edit this tags details allowed me to edit +project:where-woof +issues:htmx +x 2026-08-07 (B) Scan-flow: re-alert when different finder phone within 250 m window +project:where-woof +agent:right-monitor-pi-coding +x 2026-08-07 (B) Scan-flow: browser fingerprint + 24 h block, store in DB +project:where-woof +agent:right-monitor-pi-coding +x 2026-08-07 (B) Preset tag-ID registry: seed real manufactured IDs, enforce registry-only (anti-scam) +project:where-woof +agent:right-monitor-pi-coding +x 2026-08-07 (A) Set up Gitea for where_woof +project:where-woof +agent:where_woof +(A) FIX: where-woof.com DNS/redirect -> router public IP (compare how lab.audasmedia.com.au redirect is configured; check router NAT) +project:where-woof +agent:where_woof +(A) Deploy Laravel admin to .13:3030 (Phase 8) — admin.where-woof.com Caddy block already saved +project:where-woof +agent:where_woof +(B) Billing phase (Stripe AU, plans, scan limits, paid-gating) +project:where-woof +agent:where_woof +(C) Photo uploads + object storage (Phase 6 — basic local upload done, move to object storage) +project:where-woof +agent:where_woof +(C) Anti-abuse hardening (relay numbers, rate limits — Phase 9) +project:where-woof +agent:where_woof +(C) Live SMS creds on .13 service env (uncomment SMS_USER/PASSWORD/FROM in ~/.config/where-woof.env) +project:where-woof +agent:where_woof diff --git a/where_woof.md b/where_woof.md index c619a15..12a3d5a 100644 --- a/where_woof.md +++ b/where_woof.md @@ -139,9 +139,19 @@ rsync -avz where-woof templates/ static/ sam@192.168.20.13:/var/www/where-woof ``` Admin (later): rsync + `composer install` + `php artisan migrate` on .13. -### Run on .13 +### Run on .13 (LIVE — Phase 7 deployed) ```bash -cd /var/www/where-woof && ./where-woof --port 3020 +# systemd user service (enabled, auto-restart, survives reboot via loginctl enable-linger) +ssh sam@192.168.20.13 +systemctl --user status where-woof # Active (running) +# unit: ~/.config/systemd/user/where-woof.service +# env: ~/.config/where-woof.env (chmod 600 — DATABASE_URL→localhost:5434, SESSION_SECRET, SMS_*) +# dir: /var/www/where-woof (binary + templates/ + static/uploads) +# ⚠ NixOS firewall on .13: port 3020 must be allowed externally +# (networking.firewall.allowedTCPPorts = [3020]) +# Verify: curl localhost:3020 on .13 → 200; where-woof.home.lab → .35 → .13:3020 ✓ +# DNS: where-woof.com A record must point at the router's public IP (like the lab domains) — +# currently still at InMotion; DNS/redirect fix is the outstanding user step. ``` ### Caddy (.35) @@ -165,13 +175,13 @@ admin.where-woof.com { | Phase | What | Status | |-------|------|--------| -| 1 | **Front-end foundation**: Go scaffold, Postgres schema, auth, tag setup, public tag page, account CRUD (GOAT) | ⬜ | -| 2 | **Scan flow**: geolocation → SMS alert, `tel:`/`sms:` links, finder contact, re-check button | ⬜ | +| 1 | **Front-end foundation**: Go scaffold, Postgres schema, auth, tag setup, public tag page, account CRUD (GOAT) | ✅ | +| 2 | **Scan flow**: geolocation → SMS alert, `tel:`/`sms:` links, finder contact, re-check button | ✅ | | 3 | HTMX / Alpine polish — inline edit, animations | ✅ | -| 4 | Laravel admin: users, tags, dashboard (same Postgres) | ⬜ | +| 4 | Laravel admin: users, tags, dashboard (same Postgres) | ✅ | | 5 | Billing: Stripe (AU), plans, scan-limit enforcement, invoices | ⬜ | | 6 | Photo uploads + object storage | ⬜ | -| 7 | Deploy front-end to .13, Caddy, DNS, InMotion redirect | ⬜ | +| 7 | Deploy front-end to .13, Caddy, DNS, InMotion redirect | ✅ (service live; DNS pending) | | 8 | Deploy admin to .13 | ⬜ | | 9 | Anti-abuse hardening: relay numbers, rate limits | ⬜ |