Frame Room and Matching Design

Part of Frame. All rules below are proposed refinements of the requested limited-swipe experience.

Participation and settings

  • Support 2–8 participants for the initial release; “2 or more” remains the core requirement.
  • Join with a Frame guest session, display name, and claimed Letterboxd username. No Letterboxd credentials are requested and ownership is not verified.
  • Host chooses swipe cap N before the round; default 20, platform maximum 50.
  • Each member imports an accessible complete watchlist and marks ready.
  • Freeze roster, source snapshots, pool mode, deck, and settings atomically at start. Participants joining later wait for a new round.

Duplicate normalized usernames are disallowed within a round by default so one public watchlist is not accidentally represented as several independent people. Guest tokens establish Frame membership, not Letterboxd ownership.

Candidate deck

Default pool: union of all participant watchlists, deduplicated by resolved film identity. A title need not already be in everyone’s watchlist: unanimous swiping establishes willingness.

Optional pool: intersection of all watchlists. If empty, explain the result and let the host explicitly choose the union before starting.

Let K = min(N, eligible unique pool size). Every participant receives the same K films; otherwise limited independent random decks could prevent an available match simply because a candidate was never shown to everyone.

Proposed selection: seeded shuffle with round-robin contributions from participant watchlists, deduplicating as candidates enter the deck. Shuffle participant order from the saved seed. This gives each list an opportunity to contribute without promising equal representation when overlap, list sizes, or K make that impossible. Save the actual deck and seed; do not rebuild on reconnect.

Show the actual K before start. Empty pools cannot start. A deck smaller than requested is a visible shorter round. Metadata filters, if added, must not treat unknown runtime/genre as known values.

Swipe semantics

  • Like or pass each deck film once per member. Every accepted unique choice consumes one budget unit.
  • Enforce uniqueness by (round_id, member_id, film_id) and a request idempotency key. Duplicate requests do not consume additional budget.
  • Server verifies membership, round state, deck membership, outstanding card, and remaining budget. The client cannot supply its own accepted vote count.
  • No undo in the MVP; explain that before starting. Skips are passes and consume a card.
  • A member may stop early or disconnect; that means waiting, not passing all remaining cards automatically.
  • Votes and other members’ detailed choice order remain private.

Match rule

A film matches only when every member in the locked roster has recorded a like for that film. One pass eliminates that candidate from unanimous matching. An absent vote is not a pass or a like.

In one PostgreSQL transaction, lock the round row, validate/insert the vote, check unanimity, and set the first result if none exists. All vote writes use this serialization point; otherwise two concurrent final likes can miss each other under a weaker implementation. Unique constraints prevent duplicate results and votes.

First committed unanimous match wins and ends the round. Other pending submissions receive the committed outcome. It is acceptable for timing to determine which of multiple possible films wins; document that rather than claiming a deterministic preference ranking.

Store a durable reveal event with a round revision in the same transaction. Retry event delivery safely; the UI should not replay confetti on every reconnect.

Lifecycle and no match

lobby → importing/ready → swiping → matched | no_match | expired | cancelled

Import status belongs to each member and the lobby can mix ready and importing members. Start only when all locked participants have valid snapshots and are ready.

Declare no_match after all members have settled every deck card and no unanimous match exists. A finished member waits for unfinished people. An optimization to end earlier when every candidate has a pass can be considered later, with clear UX.

Cancellation and expiry reject further votes while preserving the terminal state. Disconnecting does not shrink the roster. Removing a person or changing N requires a new round, with a clearly reset vote/deck scope. A later round can avoid previously shown candidates if the remaining pool supports it; disclose repeat candidates when necessary.

Reconnect and room privacy

Use unguessable invitation tokens and separate hashed membership credentials in secure sessions. Possessing an invite lets someone join the lobby subject to room controls; it must not expose individual votes or full imported watchlists. Lock invitations for the active round as appropriate.

Fetch state and revision from the server on reconnect; recover the stored deck index and result. Polling or events are delivery conveniences, not the authority for matching. Expire unused rooms and define deletion for watchlist snapshots, guest membership, and events.