Inspiration

The idea behind QRaffle is to create a SASS service to generate and distribute unique QR codes that can be redeemed in various vanues to get some freebie stuff.

What it does

PDF generation: Based on a template PDF it will generate a batch of unique QR codes that are inserted into the template PDF for printing. Share URL: Special URL that users can share on social networks. Every request to this URL generates a unique QR code. The page at this URL has social sharing meta tags! All QR codes are saved with MongoDB Atlas. A unique mobile endpoint for each bar that participates in the promotion that contains a Javascript QR code scanner. Upon scanning a QR code the id of the bar is patched into the dataset. The bar can also upload photos made during the QR code event. A leaderboard displays the realtime stats of the number of QR codes scanned at each bar. The realtime functionality is provided by FeathersJS using socket.io. As soon as a QR code is scanned at the bar the leaderboard is being updated. All bars can show the leaderboard on a public screen. A second leaderboard was built using Atlas Charts.

How I built it

Based on node.js with FeathersJS I built out the endpoints one after the others. I didn't find any capable realtime functionality by MongoDB itself so I used the service from FeathersJS. I also built the same dashboard with Mongo Charts but unfortunately it also lacks realtime functionality (It polls every 5 seconds) I am hosting the service on a cluster of CapRover servers hosted by Amazon Lightsail - which is much cheaper as the "big" cloud hosting services.

Challenges I ran into

Coordinating authenticated and anonymous realtime channels in FeathersJS. Optimizing the batch generation of tens of thousands of PDFs.

Accomplishments that I'm proud of

Completing the project in time.

Low cost of hosting with a VPS @ Amazon Lightsail.

Using a framework I have never used before successfully (FeathersJS) and successfully using the realtime service.

For this hackathon I made the project edition-aware, so I have a generic one for development, one for each client and a special one for the hackathon. Alle editions are customized with their own assets and strings.

What I learned

MongoDB rocks, but it would rock even more with realtime support!!! MongoDB Atlas is nice but I would only pay for it for huge projects with big data loads and necessity for dynamic instancing. MongoDB Charts is very easy to use but also here I miss the realtime functionality.

What's next for QRaffle

Approaching new clients and building it out to be a flexible QR code framework that can handle all sorts of use cases. Maybe even running it as a SASS sometime that attracts its customers automatically?

Built With

Share this project:

Updates