Skip to content

feat(vote): let Sympla buyers log in with ticket number and email - #63

Merged
khaosdoctor merged 8 commits into
mainfrom
feat/sympla-ticket-link
Sep 25, 2026
Merged

khaosdoctor merged 8 commits into
mainfrom
feat/sympla-ticket-link

Conversation

@khaosdoctor

@khaosdoctor khaosdoctor commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

We had problems with Stripe and moved ticket sales to Sympla, which left voting with a problem: people who buy on Sympla most likely don't have a guild.host account, and we can't create one for them.

So /vote now asks how you bought your ticket and shows both ways in side by side. Guild buyers log in like before, Sympla buyers put their ticket number and the email on the ticket, we check it against Sympla and they get one vote. The ticket number works with or without dashes, since the PDF prints it without them. The navbar "Entrar" button now goes to this page instead of straight to guild.

I tested it with a real Sympla ticket and it turns out the API doesn't match the docs in a few places: it wants the event hash instead of the number in the public URL, approved orders come back as APPROVED, and unknown tickets answer 404. That's all handled now. I also cancelled my ticket to see what happens, the login gets blocked, and the admin dashboard now leaves cancelled tickets out of the count, so a vote cast before a cancellation or refund doesn't count either.

Every Sympla login is saved with its email so later we can backfill and tie those votes to guild accounts. At the end of the ballot Sympla voters get an invite to follow NodeBR on guild.host, and the dashboard shows them as the "Sympla" tier.

Also, voting is open until the end of November 1st, the vote tests no longer depend on the real clock, and the prod D1 command in TODO.md now uses the database UUID, the name doesn't work. The table is already created in prod.

@khaosdoctor
khaosdoctor marked this pull request as ready for review September 25, 2026 17:52
Copilot AI lite review requested due to automatic review settings September 25, 2026 17:52
@khaosdoctor
khaosdoctor merged commit 8b84e4f into main Sep 25, 2026
1 of 2 checks passed
@khaosdoctor
khaosdoctor deleted the feat/sympla-ticket-link branch September 25, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Address the four moderate findings involving cancellation verification, admin warnings and drill-down filtering, and the canonical Sympla purchase link.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds Sympla ticket-number/email authentication for voting while preserving Guild.host login and excluding cancelled tickets from admin tallies.

Changes:

  • Added Sympla validation, sessions, persistence, and cancellation handling.
  • Updated voting UI, navigation, translations, and invite flow.
  • Extended tests, schema, configuration, and documentation.
File Summary
TODO.md Sympla deployment and testing notes
test/​server/​routes/​vote.test.ts Voting-window tests
test/​server/​routes/​sympla.test.ts Sympla authentication tests
test/​server/​routes/​admin.test.ts Admin response tests
test/​server/​routes/​admin-sympla.test.ts Cancellation filtering tests
test/​server/​routes/​admin-roster.test.ts Sympla roster tests
src/​website/​scss/​pages/​voting.scss Voting login styling
src/​website/​pages/​vote/​index.tsx Dual login UI and invite
src/​website/​configs/​definitions.ts Guild invite configuration
src/​website/​components/​_partial/​AuthButton.tsx Navbar routing
src/​server/​types.ts Sympla environment typing
src/​server/​routes/​vote.ts Vote deadline and session data
src/​server/​routes/​auth.ts Sympla authentication endpoint
src/​server/​routes/​admin.ts Cancellation-aware admin data
src/​server/​routes.ts Route registration
src/​server/​repositories/​vote.ts Cancelled-voter filtering
src/​server/​repositories/​sympla.ts Sympla login persistence
src/​server/​index.ts Worker route dispatch
src/​server/​helpers/​sympla.ts Sympla API integration
src/​server/​helpers/​session.ts Session-cookie helper
src/​server/​configs/​vote.ts Voting deadline
src/​server/​configs/​sympla.ts Sympla constants
resources/​schema.sql Sympla voter table
i18n/​pt-BR/​code.json Portuguese translations
i18n/​es-419/​code.json Spanish translations
i18n/​en-US/​code.json English translations
DEVELOPMENT.md Architecture and operations documentation
.dev.vars.example Sympla token configuration

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

votes: row.votes,
})),
total: talks.reduce((sum, row) => sum + row.votes, 0),
symplaChecked: cancelled !== null,
name: attendee?.name ?? null,
tier,
budget: tier ? (budgets.get(tier) ?? 1) : 1,
...voterIdentity(userId, roster, budgets),
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.

2 participants