Conference Check-in App

NHS-R/NHS.pycom 2023

Oct 17, 2023

or, on why you should ignore your boss, play about, and have fun

Can we not do better?

QR codes are great

and can be easily generated in R

install.packages("qrcode")
library(qrcode)

qr_code("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

But can we build a shiny app to read QR codes?

No (probably)

Why not?

  • {shiny} would be doing all the processing on the server side
  • we would need to read from a camera client side
  • then stream video to the server for {shiny} to detect and decode the QR codes

Well, can we do it client side?

Yes

How does this work?

Front-end

  • uses the React JavaScript framework
  • @yidel/react-qr-scanner
  • App scan’s a QR code, then sends this to our backend
  • A window pops up to say who has checked in, or shows an error message

How does this work?

Back-end

Uses the {plumber} R package to build the API, with endpoints for

  • getting the list of all of the attendees for that day
  • uploading a list of attendees in bulk
  • adding an attendee individually
  • getting an attendee
  • checking the attendee in

How does this work?

More Back-end Stuff

  • uses a simple SQLite DB that will be thrown away at the end of the conference
  • we send personalised emails using {blastula} to the attendees with their QR codes
  • the QR codes are just random ids (UUIDs) that identify each attendee
  • uses websockets to update all of the clients when a user checks in (to update the list of attendees)

I’ve wanted to play about with React for a while…

This was a silly, inconsequential project to get to grips with something new

Was it worth it?

Yes!

Learning different tools can show you the light

Go away, learn something new

Thanks!

thomas.jemmett@nhs.net