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.
what would the path be to port what we have in nextjs to a vs code extension - then we can depend just on local files using vscode, and use github more directly for managing files, etc.
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.