YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.
https://syncedstore.org
MIT License
1.69k stars 51 forks source link

Question: How many stores should you create? #119

Closed AlexW00 closed 8 months ago

AlexW00 commented 9 months ago

I'm building a flashcards app. Until now I used PouchDB and created a new Document for each flashcard. Using SyncedStore, is it recommended to create one "flashcards" object that holds all cards or one store for each card? Note that a flashcard can contain cached html.

YousefED commented 8 months ago

This depends on your application. In general, I would say you only need multiple stores if you have external reasons for it, such as sharing / permissions. Documents (stores) are a good level to isolate permissions. If you don't have this boundary, it's fine (and recommended) to keep all flashcards in one store