Skip to content

Commit df0869f

Browse files
Kjubikstronkclaude
andcommitted
Document the couples model
Adding a person is now a document, not a rules edit — worth writing down, since the old instructions said to paste UIDs into the console. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 7b97d24 commit df0869f

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,36 @@ npm run dev
8888
Then open http://localhost:5173/dateideas/ — note the path, it matches the
8989
GitHub Pages base.
9090

91+
## More than one couple
92+
93+
Two couples share this one deployment without ever seeing each other's dates.
94+
95+
A `members/{uid}` document holds a `coupleId`, every date carries the same
96+
field, and the rules compare the two. Membership is a document rather than a
97+
list in the rules, which is the point: **adding someone never means editing or
98+
re-publishing the rules**, and there are no UIDs in `firestore.rules` at all.
99+
100+
To add a person:
101+
102+
1. Firebase → Authentication → Users → Add user (their password is yours to set)
103+
2. Create `members/{their-uid}` with `coupleId` set to their couple's id
104+
105+
That's it. Nothing is deployed, nothing is edited. An account with no `members`
106+
document sees "not paired up yet" rather than an empty app, so a half-finished
107+
setup says so instead of looking broken.
108+
109+
Bug reports are deliberately *not* scoped to a couple — they go to whoever
110+
maintains the app, which is the point of the feature.
111+
112+
### Rules
113+
114+
```bash
115+
npm run rules
116+
```
117+
118+
Deploys `firestore.rules` straight from the repo. They used to be pasted into
119+
the console by hand, which is how they drifted from what's in git.
120+
91121
## Offline, and staying updated
92122

93123
The app precaches its own shell with a service worker and keeps a Firestore

0 commit comments

Comments
 (0)