Watts-Lab / deliberation-portal

MIT License
0 stars 0 forks source link

Decide the structure of the storage of markdown files #15

Open shapeseas opened 2 weeks ago

shapeseas commented 2 weeks ago

Story Researchers will need to create markdown files -- whether typing them out or using the interface -- to design their deliberation experiments. These files needs to be stored.

Description Storage of markdown files. Researchers will need to be able to edit treatment file and create/edit/delete any files that the main treatment file references.

Potential approaches In discussion with @JamesPHoughton: 1) Store files on server 2) Store on browser as a serialized string, using localStorage

Additional approach: 3) Store on browser in db, using IndexedDB (or wrapper like idb, PouchDB)

IndexedDB seems like a strong candidate because it allows for secure, persistent storage that allows storage of documents, instead of just strings. It enforces the same-origin policy, uses transactions, handles asynchronous requests, and facilitates queries in a NoSQL style. It would facilitate offline usage of the application, which may be a bonus feature for researchers who are on flights or somewhere without wifi.

shapeseas commented 2 weeks ago

Additional notes:

JamesPHoughton commented 1 week ago
JamesPHoughton commented 1 week ago

Possibly useful: