Secret Santa wishlist
A web app used by a group of friends.

Problem
A group of friends wants to exchange gifts without two people buying the same thing. Lists in a chat get messy and have no pictures. The app has to be simple enough for everyone to open and closed enough that the lists are not public.
Solution
Everyone signs in with a name and a group code, uploads one to four photos per wish, and adds a description and a shop link. Others can reserve a wish. Everyone only sees “Reserved”; only the buyer sees that it was them, and can cancel. Groups have separate codes and fully separate data, and there is an admin page.
Architecture
Each group has its own D1 database and its own KV.
Key decisions
- No framework and no build step. The frontend is plain HTML, CSS and JavaScript, and the backend is Cloudflare Pages Functions. Deploying is just a push.
- Separate groups. Each group has its own D1 database, KV, code and gift date. No data is shared.
- Who reserved what stays hidden. The server only returns “reserved” and “reserved by me”. The buyer’s name never leaves the server for regular users.
- Sign-in without outside services. The session is a signed cookie (HMAC-SHA256, HttpOnly, Secure). Personal passwords are stored with PBKDF2-SHA256, and an account locks after repeated failed attempts.
- Updates without WebSockets. While the tab is visible, the client asks for changes every five seconds using a version number. If nothing changed, the server answers 204 with no body.
- Limited images. At most four images per wish, each up to 1 MB, JPEG and WebP only.
The code is in a private repository.