I'm sharing the experience on Cubing China since we've used for a couple of competitions.
Process:
1. QR code registration is one of the optional features for every competition. If it's turned on, every competitor will receive a QR code after successful registration (including payment, etc). They can check it later on the registration page too.
2. Competitor must show their unique QR code at the registration area. The staff will scan it with scanning-gun or Wechat app in mobile phone.
3. After scanning, the information of the competitor in this competition will show on the page. You then can check it and click "sign in" so they're checked in.
Programming idea:
1. Generating QR code is easy. The key is to make a unique key for every registration. In case people will like to scan it via any scanner, the content stored in QR code is an valid url and will redirect to the competition home page so there's nothing weird. The url is like
https://cubingchina.com/competition/sign/the_unique_key_here.
2. In China, Wechat is very popular so I wrote the first version to scan with it. In the web application in Wechat built-in browser (a page in fact), we can use the API to launch the scanner provided by Wechat. It reads the content and return to the script. Then we parse the unique key and request the server to fetch the information.
3. Scanning with scanning-gun is more tricky I think. I researched and found a scanning-gun with USB port was the best idea. It behaves like a normal input device and you can set the mode to auto typing everything it reads. So I built another page for the scanning. It contains a always-focused and hidden text input. The script listens to the keydown event and once the "Enter" is "pressed" by the scanning-gun, it will parse the content.
Problems:
1. Network required.
2. Scanning with mobile phone will run out the battery much sooner.
3. Scanning-gun doesn't work as expected with variable of screens. I'm thinking to change it to barcode.