Skip to content

mandarini/nxsummit-game

Repository files navigation

๐ŸŽฎ Nx Summit Game & Check-In App

This is the official event web app for the Nx Summit โ€“ built to make check-ins smoother and add a layer of fun and gamification to the day.

๐ŸŽฏ Want to Use This for Your Own Event?

This app was built for the Nx Summit but can be easily adapted for any event! Whether you're organizing a conference, meetup, workshop, or corporate gathering, you can fork this repository and customize it for your needs.

The guide covers everything you need to know:

  • ๐Ÿท๏ธ Branding: Update event name, colors, and logos
  • ๐Ÿ“… Schedule: Replace the Nx Summit agenda with your event timeline
  • ๐ŸŽซ Event Details: Customize dates, venue, and attendee information
  • โš™๏ธ Configuration: Set up your own Supabase database and environment
  • ๐Ÿš€ Deployment: Get your customized app live for your event

Quick Overview of What You'll Need to Change:

  • Event name and branding throughout the app
  • Complete event schedule in src/pages/InfoPage.tsx
  • Date, time, and venue information in src/pages/TicketPage.tsx
  • Your attendee list in the database
  • Environment variables for your Supabase setup

๐ŸŒŸ Perfect for:

  • Tech conferences and meetups
  • Corporate events and team gatherings
  • Workshops and training sessions
  • Networking events
  • Any gathering where you want to gamify interactions!

๐Ÿ‘‰ Get Started with the Full Customization Guide

๐ŸŒŸ Features

๐Ÿ“ฑ Check-in System

  • Staff can quickly check in attendees by scanning QR codes
  • Real-time status updates
  • Efficient queue management

๐ŸŽซ Attendee Ticket Page

  • Personalized ticket link for each attendee (e.g., https://your-event.com/ticket?email=...)
  • Features:
    • Unique QR code
    • Name and check-in status
    • Game interface (when active)
    • Points display

๐ŸŽฒ Gamification System

Once checked in, attendees can:

  • Scan other attendees' QR codes
  • Earn points for each unique interaction
  • Collect bonus points from Nx team members
  • Discover hidden QR codes around the venue

๐ŸŽ Bonus Points System

  • Hidden QR codes throughout the venue
  • Staff can award manual bonus points for:
    • Asking questions
    • Participating in discussions
    • Other meaningful interactions

๐ŸŽฏ Admin Features

  • Check-In Scanner: Fast attendee processing
  • Admin Dashboard:
    • Real-time attendee management
    • Points tracking
    • Game state control
    • Manual point awards
  • Raffle System:
    • Two drawing modes:
      • Weighted (probability based on points)
      • Shares-based (one entry per point)
    • Live drawing animation
    • Winner tracking

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 18 with TypeScript
  • Styling: Tailwind CSS
  • Icons: Lucide React
  • Database: Supabase
  • QR Code:
    • Scanning: html5-qrcode
    • Generation: qrcode.react
  • Serverless: Supabase Edge Functions

๐Ÿ“‹ Prerequisites

  • Node.js 18.x or higher
  • npm 9.x or higher
  • Supabase project

๐Ÿ”ง Environment Setup

  1. Create a .env file:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
  1. Set up Supabase environment variables:
  • STAFF_ACCESS_PASSWORD: For staff authentication
  • SUPABASE_URL: Your project URL
  • SUPABASE_ANON_KEY: Public API key
  • SUPABASE_SERVICE_ROLE_KEY: Admin API key

๐Ÿš€ Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Start development server:
npm run dev

๐Ÿ“Š Database Schema

Attendees

CREATE TABLE attendees (
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  email text UNIQUE NOT NULL,
  name text NOT NULL,
  checked_in boolean DEFAULT false,
  points integer DEFAULT 0,
  value integer DEFAULT 1,
  role text DEFAULT 'attendee' NOT NULL,
  created_at timestamptz DEFAULT now()
);

Scans

CREATE TABLE scans (
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  scanner_id uuid REFERENCES attendees(id),
  scanned_id uuid REFERENCES attendees(id),
  timestamp timestamptz DEFAULT now(),
  UNIQUE(scanner_id, scanned_id)
);

Bonus Codes

CREATE TABLE bonus_codes (
  code text PRIMARY KEY,
  description text NOT NULL,
  points integer NOT NULL,
  max_claims integer,
  created_at timestamptz DEFAULT now()
);

Bonus Claims

CREATE TABLE bonus_claims (
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  attendee_id uuid REFERENCES attendees(id),
  bonus_code text REFERENCES bonus_codes(code),
  claimed_at timestamptz DEFAULT now(),
  UNIQUE(attendee_id, bonus_code)
);

Raffle Winners

CREATE TABLE raffle_winners (
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  attendee_id uuid REFERENCES attendees(id),
  raffle_type text NOT NULL,
  created_at timestamptz DEFAULT now()
);

Settings

CREATE TABLE settings (
  key text PRIMARY KEY,
  value boolean NOT NULL,
  updated_at timestamptz DEFAULT now()
);

๐Ÿ“ Project Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/     # Reusable React components
โ”‚   โ”‚   โ”œโ”€โ”€ admin/     # Admin-specific components
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ lib/           # Utility functions and API clients
โ”‚   โ”œโ”€โ”€ pages/         # Page components
โ”‚   โ””โ”€โ”€ main.tsx       # Application entry point
โ”œโ”€โ”€ supabase/
โ”‚   โ”œโ”€โ”€ functions/     # Edge Functions
โ”‚   โ””โ”€โ”€ migrations/    # Database migrations
โ””โ”€โ”€ public/           # Static assets

๐Ÿ”’ Security Features

  • Row Level Security (RLS) policies
  • Staff authentication with password protection
  • Duplicate scan prevention
  • Role-based access control
  • Environment variable protection

๐ŸŽฏ Available Scripts

  • npm run dev: Start development server
  • npm run build: Build for production
  • npm run preview: Preview production build
  • npm run lint: Run ESLint

๐ŸŽฎ Game Mechanics

Points System

  • Each attendee starts with 0 points
  • Points are earned through:
    • Scanning other attendees
    • Finding bonus QR codes
    • Staff awards
    • Participation rewards

Raffle System

Two drawing modes:

  1. Weighted Raffle:
    • Probability = attendee_points / total_points
    • Fair chance for everyone, weighted by participation
  2. Shares-Based Raffle:
    • Each point = one entry
    • More points = more chances to win

๐Ÿ“„ License

MIT License - see LICENSE file for details

About

Gamify your next event!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published