mirror_match/docs/DATA_MODEL.md

1.0 KiB
Raw Blame History

MirrorMatch Data Model (MVP)

Terms

  • Group: invite-only membership boundary (family, friends, etc.).
  • Set: a “round” containing 210 Photos and 24 Options (names/labels).
  • Option: a label to guess (e.g., “Dad”, “Me”, “Twin A”, “Twin B”).
  • Photo: an uploaded image in MinIO plus its secret correctOptionId and points.
  • Guess: a users choice for a specific photo (one guess per user per photo).
  • Invite: admin-created email invite with a token, used to join a Group.

Constraints (enforced by app)

  • Set has 210 photos.
  • Set has 24 options.
  • Photo points is 110.
  • A user can guess at most once per photo.
  • A photo uploader cannot guess their own photo for points.

Prisma models

See prisma/schema.prisma.

“Same set, different groups”

If you want the same photos/options for multiple Groups, create multiple Sets (one per Group). Photos can reuse the same MinIO objects by reusing the same storageKey if desired.