Stamp Rally


Introduction
This application is a Stamp Rally project for Japan Expo 2024, with a theme about booths selling products related to the world of VTubing. Loosely inspired by the concept of Holoquest, but entirely developed from scratch. I worked with Leon on this project, each of us took care of a distinct part. I will focus on my personal parts.
Stamp Rally
A stamp rally is a game where participants (here called rallyists) must go to different booths to get a stamp. Once a minimum number of stamps are obtained (here 10), the rallyist can come to a specific booth, to have their participation validated by a rally staff member, spin a fortune wheel, and win a prize (here a certain number of exclusive cards).
Overall application operation
Each booth owner has a "standist" account, and has an ECDSA key that is personal to them. From their "standist" space, the booth owner can generate an ephemeral QR code, which contains a generation timestamp, their identifier and a signature of these two fields, by their ECDSA key.
Each rallyist can scan one of these QR codes generated by a booth owner, and get a stamp. The signature is verified when adding the stamp, to avoid any cheating attempts, and the timestamp is verified to avoid basic replay attacks.
Some screens
Screenshot of the artist list, in the rallyist section
Screenshot of the QR code generation page, for booth owners Backend (Appwrite)
The backend consists of an Appwrite server, which manages
- users (with Authentication)
- booth sheets (name, position, public key, etc.) as well as submissions and stamps related to it (with Collections)
Permissions are managed by labels on Appwrite users:
- rallyists have no label
- booth owners have the
standistlabel - staff members have the
stafflabel
When a rallyist has obtained the minimum number of stamps, they can submit their participation. This is a POST call to an Appwrite cloud function (a serverless function) verify-qrcodes, which verifies the stamps, and if everything is good, adds a submission to the submissions collection, with the submission timestamp, the rallyist's identifier, and the stamps obtained.
Frontend
The frontend is a Vite-React application that contains three "sub-applications"
- the rallyist part, which allows you to see the list of booths, scan a QR code, and see the stamps obtained, as well as a convention map developed with MapLibre
- the booth owner part, which allows you to generate a QR code
- the staff part, which allows you to validate a rallyist's submission, spin the fortune wheel, as well as a QR code generation function, for testing and debugging.
It's possible to navigate between these three parts, by returning to the home page (rallyist space), then in "About" and at the very bottom, there are two links.
Particularities
QR codes generated by booth owners are regenerated every 5 seconds, and "expire" (are no longer accepted) after 2 minutes. However, in order to have a solution for booth owners who cannot have the application on a phone, it's possible to generate a "permanent" QR code (that does not expire) from the staff section, to print it. The date is then replaced by -1. In this case, the timestamp is therefore not verified.
Deployment
Deployment is automated with Netlify. The Appwrite backend is deployed from the configuration file appwrite.json, and the frontend is deployed from the configuration file netlify.toml.