mirror_match/docs/DATA_MODEL.md

29 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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.