2.2 KiB
2.2 KiB
Why
WhereWoof is a return-item tag platform: buyers get pre-coded QR/NFC tags, a finder scans the tag on a lost item and sees how to return it. The product plan (where_woof.md) is settled; nothing of it is buildable yet. This change creates the front-end foundation — the GOAT (Go + HTMX + Alpine + Tailwind + Postgres) app that carries the owner-facing experience: tag setup, account, and the public tag page.
What Changes
- New Go application in
frontend/(Gonet/http, HTMX, Alpine.js, Tailwind via CDN) talking to Postgres viapgx/sqlc. - Shared database schema (
db/schema.sql):users,tags,scanstables. Laravel will own migrations later; until thenschema.sqlis the source of truth. - User auth: register / login / logout with email + password, session cookie.
- Tag management (account CRUD): add a tag to the account by entering its
tag_code, list my tags, edit details (item type, description, photo URL, phone, address, notes), remove a tag. Limit of 20 tags per account enforced. - Public tag page
GET /t/:tag_code: shows a "not set up yet" prompt when the tag is unset; shows the item's return details (with an edit affordance for a logged-in owner) when set. - Scan flow is NOT in this change (Phase 2): no geolocation, no SMS alerts, no
tel:/sms:links yet — the page renders details only.
Capabilities
New Capabilities
user-auth: register, login, logout, session handling for owners.tag-management: bind a tag_code to an account, list/edit/remove tags, 20-tag limit, item details fields.public-tag-page: unauthenticated view of a tag by code — setup prompt or return details.database: shared Postgres schema (users, tags, scans), unique tag codes, tag status lifecycle.
Modified Capabilities
Impact
- New code:
frontend/Go module (main.go, db, handlers, templates, static). No framework beyond stdlib. - New schema:
db/schema.sql+ Postgres database (dev: Supabase Postgres on.27:5434). - Config:
DATABASE_URLenv var; port 3020 default. - No changes to admin (Laravel — later phase), deployment (rsync/Caddy — Phase 7), or billing (Phase 5).