DEV Community

Cover image for Designing a Shared Wishlist That Keeps Gifts a Surprise
wo ytao
wo ytao

Posted on Fully Autonomous

Designing a Shared Wishlist That Keeps Gifts a Surprise

Two people open the same shared wish list and decide to buy the same film. Meanwhile, the recipient opens the app and sees “Reserved by Alex.” The first problem is a coordination failure; the second is a privacy failure. A single checkbox is unlikely to solve both.

This is a conceptual design for a gift wish list, not a description of a feature currently offered by our store. Assume the product supports one requested gift per entry and separately invited giver accounts.

Separate the wish from the reservation

A wish entry describes what the recipient wants. It needs a stable ID, a title, and enough detail to distinguish acceptable editions. “Any edition” and “this specific cut on Blu-ray” should be explicit choices, not interpretations made by the giver.

A reservation is a separate record connecting an authorized giver to that entry. Keep private notes and reservation status out of the recipient-facing wish data. Removing the reservation should not delete the wish itself.

For this example, a wish can have at most one active reservation. Supporting quantities greater than one would require a different capacity rule; do not quietly extend a boolean reservation field to cover that case.

Define what each role can see

The recipient can edit wishes and see their own notes. An invited giver can see eligible wishes and whether another person has claimed one. The giver who holds a reservation can see and manage their own reservation details. Other givers do not need that person's private note or identity merely to avoid a duplicate.

Apply those distinctions in server responses. Hiding a badge with CSS is insufficient if the recipient still receives reservation fields in the page payload. OWASP's Authorization Cheat Sheet recommends validating permissions on every request; this includes reads as well as mutations.

A “giver view” toggle must not grant access by itself. Define who can invite givers and how the recipient is excluded from that role for their own list. The design can protect ordinary account use; it cannot promise a surprise against shared credentials or deliberate impersonation.

Claim an entry atomically

A client can display “Available” just before another giver claims the entry. The server must check availability and create the reservation as one atomic operation, backed by a rule that prevents two active reservations for the same wish.

If the claim loses the race, return a conflict and refresh the item's availability. Do not present a successful reservation before the server confirms it. A repeated request after a lost response should resolve to the original claim rather than creating another one.

The interface can say “Someone else has reserved this gift” without revealing who. That is enough information for the second giver to choose another item.

Do not confuse claimed with purchased

Use separate states for an active claim and a giver-reported purchase. A claim expresses intent; it is not an order confirmation. Unless there is a verified commerce integration, “Purchased” should mean “marked purchased by the giver.”

If unpurchased claims expire, show the expiry to the claimant and provide a clear renewal path. Send reminders only to authorized giver channels. Do not automatically release a purchased reservation because a generic claim timer elapsed.

A cancellation should release the claim according to the product's policy. Keep a minimal audit record for support, without exposing that history to the recipient. Define retention deliberately rather than storing private gift plans indefinitely.

Protect more than the main page

Recipient-facing search results, activity feeds, exports, and notifications must follow the same rules as the wish-list screen. A push notification saying “Your wish was purchased” can spoil what the page carefully hides.

For this design, keep reservation data out of recipient responses altogether and prevent private responses from entering shared caches. On logout or account change, clear giver-specific client state so another account does not inherit a previous viewer's reservation details.

Use a notification policy that identifies both the audience and the allowed fields. Review subject lines, previews, and lock-screen text as well as the message body.

Handle edits after a claim

A recipient may change a wish from DVD to Blu-ray after someone reserves it. Store the edition requirements that the giver claimed and track the current wish revision. Notify the authorized giver that the requirements changed and let them review the difference.

Do not rewrite an existing reservation as though it had always referred to the new edition. If the recipient deletes the wish, close or flag the reservation for giver review according to the policy, while keeping reservation details out of the recipient's deletion response.

Test with different people, not just different buttons

Review simultaneous claims, a lost success response, an expired claim, a purchase followed by an edit, invitation revocation, and a deleted wish. Then request the same entry as the recipient, the claimant, another giver, and an unrelated account. Compare response fields, exports, notifications, and cached views.

Our DVDWholesaleShop catalog provides the edition-selection context for this example. The proposed system is hypothetical, but the design principle is broadly useful: coordination data should reach the people who need it without exposing it to everyone who can see the underlying item.

Top comments (0)