Week 027 — QR Codes Get Their Own Flow
QR code assignment is the feature that makes srchParty physical. This week it started becoming real.
Week of May 19, 2025
Progress
The items page got QR code assignment logic: when a user scans a new QR code, they can assign it to an item by clicking through from the items list rather than navigating to the individual item page. A QR code badge was added to each item card to indicate whether a code is assigned. An API endpoint was designed for saving the QR code assignment.
The invite code flow was also started — routing logic and a welcome page stub for when a user arrives via an invite link.
The Hard Part
The QR code assignment API wasn't working when called from the items page, even though it responded correctly to test calls from a separate API testing tool. The cause: the items page was sending the request as a JSON body, but the API was expecting a form POST. PHP reads those differently — $_POST is populated from form submissions, not JSON bodies. The JSON payload wasn't getting parsed.
The fix required the API to detect and read the incoming content type correctly, or the client to send as form data. Once aligned, it worked.
Decision Made
The QR code assignment would happen from the items page directly — a user receives a sticker pack, scans one, and gets routed to assign it to their item without needing to navigate to the item page first. This keeps the flow fast and reduces friction for the case where someone is unboxing their first sticker.
Next Week
Pushing toward launch. QR code assignment needs to fully work end to end, and there's a list of other pre-launch items to clear.
