Skip to content

Commit

Permalink
docs: document the firestore data model
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbrayo committed Aug 22, 2024
1 parent d700cdc commit bf70e70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/firebase/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
// - A collection called `screentime`
// - Each document in the collection is keyed by the user's ID
// - Each document has a collection of days, which each have an array of events for that day
// - A collection called 'leaderboard'
// -
// - A collection called `leaderboard`
// - Each document in the collection points to a nested user collection
// - Each user collection has docs keyed by the ISO date of the data contained within.
// - Each user collection doc is of type `ScreenTimeSummaryRanked` which is just ScreenTimeSummary
// with an extra rank field
// - A collection called `users`
// - Each document is keyed by the user's uid
// - Each document contains an apikey

import { db } from './firebaseInit'
import {
Expand Down

0 comments on commit bf70e70

Please sign in to comment.