Skip to content

feat: printable QR code endpoint for coffee bags#25

Open
EricGrill wants to merge 1 commit into
mainfrom
justobot/heartbeat-heartbeat-mnkrcjpq
Open

feat: printable QR code endpoint for coffee bags#25
EricGrill wants to merge 1 commit into
mainfrom
justobot/heartbeat-heartbeat-mnkrcjpq

Conversation

@EricGrill
Copy link
Copy Markdown
Contributor

Summary

  • Adds GET /lot/:id/qr — returns a printable SVG label with QR code linking to the provenance page
  • SVG includes farm name, grade, weight, and truncated lot ID — ready to print on a coffee bag sticker
  • Supports ?format=png for data URL output (mobile/embed use)
  • 3 new tests, 42/42 passing

Phase 2 Progress

Covers Task #6: Printable QR code for demo from ROADMAP.md

Test plan

  • GET /lot/:id/qr returns valid SVG with <svg> root element
  • SVG contains farm name and lot grade text
  • GET /lot/:id/qr?format=png returns JSON with qr_image data URL
  • GET /lot/nonexistent/qr returns 404
  • Open SVG in browser — renders scannable QR pointing to provenance page

🤖 Generated with Claude Code

GET /lot/:id/qr returns a printable SVG label with QR code linking to
the provenance page, farm name, grade, and weight. Supports ?format=png
for data URL output. 3 new tests (42 total passing).

Closes Phase 2 Task #6 from ROADMAP.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant