Skip to content

Feature/qr ticket validation infrastructure#386

Open
saidai-bhuvanesh wants to merge 3 commits into
anubhavxdev:mainfrom
saidai-bhuvanesh:feature/qr-ticket-validation-infrastructure
Open

Feature/qr ticket validation infrastructure#386
saidai-bhuvanesh wants to merge 3 commits into
anubhavxdev:mainfrom
saidai-bhuvanesh:feature/qr-ticket-validation-infrastructure

Conversation

@saidai-bhuvanesh
Copy link
Copy Markdown

@saidai-bhuvanesh saidai-bhuvanesh commented Jun 3, 2026

Overview

This PR improves QR ticket validation reliability, duplicate-entry prevention, realtime attendee synchronization, and organizer verification workflows across the EventOne platform.

🔗 Related Issue

Closes #385

🛠️ Changes

1. Frontend Improvements

  • Organizer Verification UX: Redesigned the QRScanner.jsx view with a glassmorphic layout.
  • Scan Feedback States: Implemented instant success/warning/error colored border flashes.
  • Scan History Log Feed: Created a live logs panel displaying the last 5 check-ins (Attendee, Time, Scan Status).
  • Mobile Responsiveness: Realigned scanning viewport dimensions for smooth mobile camera scanning.

2. Backend Improvements

  • QR Validation Logic: Updated checkInParticipant inside registrationController.js to query attendee validation fields.
  • Duplicate-Entry Prevention: Blocked re-scanning already-attended tickets, returning 400 Bad Request with the attendee's name for easy organizer identification.
  • Time Tracking: Logged successful entries using a new checkedInAt field in the Mongoose Registration.js schema.
  • Centralized API Validation: Mounted checkInValidation in registrationRoutes.js.
  • Test Isolation: Configured rateLimiters.js and app.js to bypass limits during testing (NODE_ENV === 'test').

3. Realtime Improvements

  • Attendee Synchronization: Emitted Socket.IO updates to update organizer metrics and checkboxes in real time.

4. Security Improvements

  • Duplicate Scanner Rejection: Restricts each ticket strictly to a single check-in.
  • Scan Verification Boundaries: Hardened middleware filters and schema constraints on checking in users.

🧪 How to Test

  1. Run both the frontend and backend locally.
  2. Register an attendee and open the Organizer camera scan dashboard.
  3. Verify that scanning the QR ticket registers them and adds them to the live check-in logs.
  4. Scan the ticket a second time: verify it is rejected with the warning banner and duplicate scan indicator.
  5. Scan an invalid QR string: verify the red error boundary triggers.
  6. Verify rate limiting is bypassed during unit tests.
  7. Run the backend tests using npm run test (verifies all new tests inside checkin.test.js).
  8. Run the production build in the client directory using npm run build.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

Someone is attempting to deploy a commit to the anubhav12302387's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

👋 Thanks for opening a PR, @saidai-bhuvanesh!

Your PR has entered the 🎯 EventOne GSSoC PR Review Pipeline.

🟢 GSSoC PR detected — your PR will be routed to an approved GSSoC mentor for Stage 2 review.

What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot Title format · Issue link · AI Slop · Branch check
Stage 2 — Mentor Review 🧑‍🏫 GSSoC Mentor Code + Quality Review
Stage 3 — Admin Final Gate 🔑 @anubhavxdev Label check + Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits using git commit -s
  • Link your issue with Closes #123
  • Use a feature branch — not main
  • Avoid unrelated changes in the same PR
  • Write your own description — no AI-generated content

This comment is posted only once.

EventOne × GSSoC Automated Pipeline

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

❌ PR Format Check — Failed — Please Fix Below

Hi @saidai-bhuvanesh! Please fix the issues below before your PR can proceed to mentor review.

❌ Must Fix Before Proceeding

Title format invalid — Use Conventional Commits format

Examples: feat: add login page, fix: button alignment, docs: update readme

Issue #385 is not assigned to you (@saidai-bhuvanesh) — You must be assigned to the issue before submitting a PR.

Comment /assign on Issue #385 or ask a maintainer to assign it to you.


📋 EventOne PR Guidelines (click to expand)

Title format — Conventional Commits:
feat: · fix: · docs: · style: · refactor: · test: · chore: · perf:

Always link an issue: Closes #number

Use a feature branch — never PR directly from main

Write your own description — AI-generated content = gssoc:ai-slop label

EventOne × GSSoC Pipeline — Stage 1 Automated Check

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.

Improve authentication security and route protection workflows

1 participant