Skip to content

feat: walk-in queue for hackathon day check-in#88

Open
5sansiva wants to merge 6 commits into
mainfrom
77-walkin
Open

feat: walk-in queue for hackathon day check-in#88
5sansiva wants to merge 6 commits into
mainfrom
77-walkin

Conversation

@5sansiva

Copy link
Copy Markdown
Collaborator

Walk-In Queue

Adds a FIFO walk-in queue for at-event registration. Applicants who arrive at the door can be scanned in, placed in a queue, and promoted to accepted by a super admin.

State Machine

[any status] → walk-in scan → waitlisted (+ queue position) → promote → accepted → check-in scan

Database

  • 000020_add_walk_ins — New walk_ins table with a FIFO index (queued_at ASC, id ASC) to enforce arrival order.
  • 000021_add_walkin_scan_type — Seeds the walk_in scan type into the settings table.

Backend

Store (internal/store/)

  • walkins.go — Core queue operations: Enqueue, PromoteNext, GetQueue, GetStatusByUserID.
  • storage.goWalkIns interface added to the Storage interface.
  • applications.goGetStatusByUserID added to short-circuit users who are already accepted.
  • mock_store.go — Mocks for all new WalkIns methods.

Handlers (cmd/api/)

  • walkins.go — Two new super admin endpoints:
    • GET /superadmin/walk-ins — Returns the current queue.
    • POST /superadmin/walk-ins/promote — Promotes the next N applicants, triggering acceptance emails.
  • scans.go — Updated createScanHandler to detect the walk_in scan category, enqueue the user, flip their application status to waitlisted, send a queued email, and short-circuit if the user is already accepted.
  • api.go — Routes wired for /superadmin/walk-ins.
  • scans_test.go, walkins_test.go — Test coverage for scan and promote flows.

Mailer

  • SendWalkInQueuedEmail — Sends the hacker their queue position on scan (SendGrid + SMTP).
  • SendWalkInAcceptedEmail — Sends the hacker their acceptance confirmation and QR code on promotion (SendGrid + SMTP).
  • walk_in_queued.html, walk_in_accepted.html — Email templates (copy TBD from ops).

Frontend

  • pages/superadmin/walk-in-queue/ — Walk-In Queue page with a live FIFO table, 30-second auto-refresh, and pending/total counts.
  • PromoteDialog — Super admin enters N to promote the next N walk-ins; triggers acceptance emails.
  • WalkInQueueTable — Displays queue position, email, and arrival time for each applicant.
  • routes.tsx — Route added at /admin/sa/walk-in-queue (super admin only).
  • AppSidebar.tsx — Walk-In Queue added to the super admin nav.
  • Scan types updated to support the walk_in category with a distinct icon, color, and validation.

Testing

  • scans_test.go — Covers walk-in scan detection, enqueue logic, status flip, and already-accepted short-circuit.
  • walkins_test.go — Covers queue retrieval and promote flows.

@5sansiva 5sansiva requested a review from balebbae June 23, 2026 01:36
@5sansiva 5sansiva changed the title 77 walkin feat: walk-in queue for hackathon day check-in Jun 28, 2026
@balebbae balebbae requested a review from axv2655 July 7, 2026 02:30

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It the plan file really necessary? Should we also make a dedicated folder for it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept the plan file just so if any further changes or checks are needed we can update, also just so we can update the docs with this plan as well

Comment thread dev.Dockerfile
RUN go install github.com/air-verse/air@v1.61.5 && \
go install github.com/swaggo/swag/cmd/swag@latest && \
go install github.com/go-task/task/v3/cmd/task@latest
go install github.com/go-task/task/v3/cmd/task@v3.40.1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why the change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ai slipup there, I can fix that part

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