Skip to content

alizbazar/garage-tickets

Repository files navigation

ElisaXSlush Garage Chillax registration system

The system is used for accepting registrations from invited guests. Each guest is allowed to invite a set number of his friends. There's also an open invite functionality, which let's anyone register if there are open tickets left. Once the event is full, people with a valid invite can register for a waitinglist.

All the configuration per guest is done directly in the database (phpMyAdmin or other GUI is useful here).

Architecture

Front end

The front end is just a onepager hosted on any web server. Last time Amazon AWS S3 was used, which served the purpose well. The page is mobile optimized and looks good on mobile & desktop. Styling is set in main.css and elisa's Verlag fonts are used.

It communicates with the backend hosted on a PHP & MySQL server for validating the tickets, performing registrations and so on.

Backend

The backend privides an API to be used with the frontend. It needs to be hosted on a PHP server with access to a mysql database.

The API has the following endpoints:

  • validate.php : Validates whether a token is valid and returns information on the invite (name, email, nbr of invites, flags). This is used to render the UI correctly.
  • register.php : Registers the person for the event and sends him a confirmation email.
  • invite.php : Sends an invite email to the given email address. Decrements the free invite count of the user.
  • openinvite.php : Gets an open invite token, if such is available, and redirects on that page.
  • generate.php : Generates new tokens to be inserted into the database (insertion has to be done manually).

Additionally, there are several helper files:

  • common.php : This is included into every request and provides essential functions and CORS handling
  • good-query.php : Helper functions for the mysql db
  • function.php : A few common functions used in different files

Mysql database is used with just a single table, which includes invites and their details. The structure is in the db.sql file. The fields are as following:

  • id (required) : autogenerated numeric incremental id
  • token (required) : 7 character unique token
  • name : guest name, firstname lastname assumed
  • email
  • phone
  • referredBy : Original invite token that created the current invite (for referrals)
  • freeInvites : How many free invites does this invite have?
  • registered : timestamp of the time registered, default NULL
  • visited : timestamp of the last visit, default NULL
  • waitinglist : boolean, whether the registration was only for the waitinglist
  • dev : boolean, a flag for developer invite (Used primarily for Helsinki JS meetup because developers were not required to have a Slush ticket.)

It's good to have access for the phpMyAdmin to be able to make quick changes when needed.

Useful SQL queries

List everyone who's been invited by someone else with the name of the inviter:

select garage_invites.name, garage_invites.email, (select name
    from garage_invites s2
    where s2.token = garage_invites.referredBy)
      AS invitedBy
from garage_invites
where referredBy != '' AND referredBy != 'open'

The process of generating and distributing the invites

  1. Create a table in Google Spreadsheet with following columns: name, email, token, freeInvites, dev, referredBy
  2. Fill in the info of the invitees. To have an open invite, set referredBy column to "open".
  3. Generate unique tokens by calling the /generate.php?no=100 , where 100 is the number of tokens to generate. Copy the tokens into the token column.
  4. Download the file in OpenDocument format.
  5. Import file into the mysql database with phpMyAdmin. Make sure you check the box "The first line of the file contains the table column names".

Congrats! Now you have generated the invites. You can generate the links by prepending the generated tokens with "http://elisaxslush.com/garage/?t=" and distribute them whichever way you like.

To send the invites in bulk to invitees, you can use MailChimp. However, personal emails always work better so alternatively use the following tool /email.html for generating bulk emails and sending them with your personal email client, such as Outlook.

TODO 1: Copying invite links for friends

Currently when an invitee refers a friend, the invite emails are sent by the system. However, at last year's Garage Chillax we found that many were hesitant at inviting their friends with some autogenerated email. A better solution would be perhaps if invite links could be copied by the user and distributed with friends any way they like.

In that case the functionality would need to be changed perhaps such that invite links could be generated one by one and used to invite by email or copy to clipboard.

TODO 2: Generating QR-codes for the tickets and an app for validating them at the door

Last year there was a huge queue in front of the entrance. Perhaps this could be handled so that the registration email would contain a QR-code, which then could be scanned at the door to verify the registration.

Perhaps one way to accomplish this would be to have a web page for displaying the ticket info on mobile based on the token. The page URL could be encoded into a QR code to be distributed with the registration email. Then the doorman could scan the QR code with any basic QR code scanner app and see the ticket in the browser.

About

Event registration system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published