Counting Trick-or-Treaters

Just how much candy should I buy, anyways?

I made this tiny web app so my neighbors can self-report how much candy we all need to buy for Halloween.

6 October 2023

I put up a few dozen of these posters a few weeks before Halloween, with a QR code linking to this counter app. I put up a few dozen of these posters a few weeks before Halloween, with a QR code linking to this counter app.

“How much candy should we buy?”, you ask yourself every October. Buy too little and you risk an egging, or worse. Buy too much and you’ll be snacking yourself to death until Christmas.

Neighbors could quickly self-report their candy needs. No login needed - browser sessions keep track of each neighbor.

Why guess when you can use an app? As the unelected social convenor of my street, I made this little web app so that all my neighbors could self-report their trick-or-treaters.

The whole thing was designed to be a 5-second experience for people. No logins, no save button. Just one click per trick-or-treater. Allergies can be self-reported, too, and once you add an allergy, other people can opt into it as well. Mistaken clicks can be undone with one click of the “undo” button. The app makes liberal use of Rails’ ActionCable (websockets) to responsively update the page view. Since no sensitive information is being shared, I just used browser sessions (cookies) to keep track of each person.

Resources

Feel free to fork and contribute to this Rails app.