Files
co-lite/openspec/changes/add-event-tickets/proposal.md
T

5.4 KiB

Proposal

Why

Change 1 (add-event-ticket-orders, merged 2026-12-04) lets visitors request tickets and staff mark orders paid. A paid order still gives the buyer nothing to show at the door, and the venue's self check-in still offers the walk-in form, so anyone can walk into a paid event. This change adds the ticket itself: a QR code per seat, attendees, and check-in at the door.

The product design was approved on 2026-12-04: docs/superpowers/specs/2026-12-04-event-ticketing-design.md. This is the second and last change from that design.

What Changes

  • Ticket codes:
    • When an order becomes Paid, each of its active tickets gets an unguessable code. This includes free orders, which are Paid at once, and expired orders that staff mark paid.
    • The ticket's link is /t/<code>.
    • Unpaid, cancelled and expired tickets have no valid QR.
  • Ticket page /t/<code>:
    • Public view:
      • the event and ticket type;
      • the attendee's first name;
      • the ticket's state;
      • the QR image while the ticket is valid;
      • "This ticket is not valid" otherwise.
    • Staff view: for signed-in staff with BO_EVENTS in the event's company, on an event day, a large state banner and Check in. An unnamed ticket first asks for the attendee's name and mobile or email.
    • Refusals: a second check-in shows "Already checked in at
  • Naming attendees on the order page:
    • Once an order is Paid, the order page lists its tickets, each with its link.
    • Per ticket, the buyer can name or rename the attendee (a name plus mobile or email). The save needs the tick "I have permission to share these details so their ticket can be sent".
    • Naming issues a new code, so the old QR stops working, and emails the attendee their ticket.
    • Naming is refused once the ticket is checked in.
  • Attendee consent:
    • A named attendee is not a lead.
    • The ticket page, and the staff view at check-in, offer an optional "Keep me updated about events" with the company's privacy notice. Ticking it records the consent and makes the attendee an event lead with source TICKET, matched as in QR registration. The ticket email links to that page.
    • An attendee who never ticks it can still attend.
  • Emails:
    • "Order paid" now carries each ticket's QR image and link, plus a "Name your attendees" link to the order page.
    • A new Ticket email goes to a named attendee who has an email.
    • Staff can Resend ticket from the order detail.
  • Door check-in: checking a ticket in records who did it and when. An attendee who consented, now or earlier, has their event lead marked attended.
  • Venue self check-in on a ticketed event:
    • It checks in the attendee of a Paid ticket that is not yet checked in. If several match, it takes the oldest. An unnamed ticket counts as its buyer's.
    • It also checks in a registered invited guest, as today.
    • Anything else shows "Please show your ticket at the entrance" instead of the walk-in form.
    • Events without tickets keep today's flow unchanged.
  • Event attendance numbers: on a ticketed event they add tickets awaiting payment, tickets paid and tickets checked in.
  • QR image for emails: a public PNG at /api/public/tickets/<code>/qr.png. It encodes the ticket's /t/<code> link.
  • Already done in change 1, so not repeated here: a registered invite counts toward capacity alongside held tickets ("Capacity before the event").

Capabilities

New Capabilities

None. Tickets belong to the existing event-ticketing capability.

Modified Capabilities

  • event-ticketing:
    • Order Emails: the paid email carries the tickets.
    • New requirements: ticket codes, the ticket page and invalid links, tickets on the order page, naming attendees, attendee consent, the ticket email, the staff ticket view, door check-in, resend ticket, and the ticket abuse limits.
  • event-attendance:
    • Self check-in of a known person and Self check-in of a walk-in now apply to events without tickets.
    • New requirements: self check-in on a ticketed event, no walk-ins on a ticketed event, and the ticket attendance numbers.

Impact

  • services-counter:
    • ticket code issuing on Paid;
    • ticket lookup, naming, consent and check-in services;
    • EventCheckInService.lookup on ticketed events;
    • headcount;
    • TicketOrderMailer (the paid email with tickets, and the ticket email).
  • mobile-api:
    • public endpoints for the ticket page, the QR PNG, naming attendees and attendee consent;
    • admin endpoints for the staff ticket view, check-in and resend ticket.
  • api-gateway: public path patterns for the new endpoints.
  • admin-portal:
    • /t/[code] page (public view and staff view);
    • the order page gains its tickets section;
    • a Resend ticket button on the order detail;
    • the guests card shows the ticket counts;
    • proxies and the route guard;
    • labels in English and zh-CN.
  • Database: ticket gains the attendee consent time, privacy notice id, and naming time.
  • New dependency:
    • What: com.google.zxing:core in mobile-api, to draw the email QR as a PNG. It has no transitive dependencies; the PNG is written with the JDK's ImageIO.
    • Why it is needed: nothing in the repo draws a QR server-side. The portal's qrcode.react renders in the browser only. Email clients block SVG and data-URI images, so the email needs a hosted PNG.
  • No change for events without tickets.