Repository navigation
v0.2.3 — Events, QR codes, sqlx 0.8 security upgrade
New features
/events — global event log
GET /v1/events?product_id=&event_type=&anchor_status=&limit=&offset=— paginated event listing scoped to the authenticated brand. All filters compose with AND.db::events::list_by_brand_filteredusesQueryBuilder<Postgres>for conditional WHERE clauses. Limit clamped to[1, 200], default 50.- Frontend
/eventspage (client component) — Product / Type / Anchor-status dropdown filters with reset, paginated table, links to product detail.
/qr-codes — per-product QR codes
GET /v1/products/:id/qr— returns a PNG QR encoding the public verification URL (PUBLIC_BASE_URL/verify/:id). 512×512 minimum, quiet zone enabled,Cache-Control: private, max-age=3600.- Tenant-scoped via
db::products::get_by_id_for_brand— a brand can't fetch QR codes for products it doesn't own. - Frontend
/qr-codespage — grid of cards, browser fetches each QR via the same-origin Next.js proxy, Download PNG link uses the HTMLdownloadattribute with filenamegenuflow-<product_id>.png. - New env var
PUBLIC_BASE_URL(defaulthttp://localhost:3000) wired throughAppState,.env.example, anddocker-compose.yml.
Split-screen auth
/loginand/registerget a two-column layout atmd+: marketing copy on the left (DM Serif hero, accent-colored anchored, three-bullet value prop, BSL footer), form panel on the right.- Mobile (
<md) stays single-column with the wordmark above the form. Forms themselves are unchanged. - All visual changes live in
components/auth-shell.tsx— page-level code untouched.
Security
sqlx 0.7.4 → 0.8.6 upgrade
- Closes RUSTSEC-2024-0363 — binary protocol misinterpretation in sqlx 0.7.x. Priority fix.
- Side benefit: the chronic
sqlx-postgres v0.7.4 future-incompat-reportwarning that trailed every clippy run for the prior six commits is gone. - Breaking changes encountered: one, config-only. The
runtime-tokiofeature in sqlx 0.8 no longer implies a TLS backend; you must picktls-rustlsortls-native-tlsexplicitly. We chosetls-rustls(pure-Rust, no system OpenSSL needed in the Docker slim base). Zero source-code changes were required acrosscommon,db,anchor, orapi— the runtime query API (sqlx::query,sqlx::query_as::<_, T>,QueryBuilder,FromRow,Type,migrate!) is binary-compatible for our usage. cargo clippy --workspace -- -D warningsclean (zero warnings, zero notes).
Audit results
cargo audit against the post-upgrade Cargo.lock:
rsa 0.9.10(RUSTSEC-2023-0071, medium 5.9) — present pre-upgrade and post-upgrade. Path:rsa → sqlx-mysql → sqlx-macros-core → sqlx-macros → sqlx. Compile-time-only: the macros crate usessqlx-mysqlfor cross-backend prepared-statement validation; that code is not linked into the runtime binary. No exploitable path through Genuflow — the Marvin Attack requires a TLS-server role that this code never plays. Upstream has no fixed release yet. Documented as a known carryover.- 3 unmaintained/unsound warnings on
derivative,paste,lru— all reached throughalloy 0.3. Will clear when alloy bumps to 0.4+. Tracked separately, not blocking.
No new vulnerabilities introduced by the sqlx bump.
Operational
docker compose up -dnow requires no manual env tweaks for the QR codes feature;PUBLIC_BASE_URLdefaults via${VAR:-http://localhost:3000}.- Sidebar nav adds "Events" and "QR codes" entries.
- No new migrations.
Verification
cargo clippy --workspace --all-targets -- -D warnings✓cargo audit— 1 finding, documented above, accepted carryover.tsc --noEmit✓next build— 14 routes generated cleanly (/eventsand/qr-codesjoined the bundle).