diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md index 5be71bd3e..813f0e3c9 100644 --- a/web/docs/dependencies.md +++ b/web/docs/dependencies.md @@ -121,3 +121,10 @@ set of defaults for bundling our app into a static export which we can then deploy to our webserver. In addition, the Next.js page router is convenient. Apart from this, while we use a few tidbits from Next.js here and there, overall our apps are regular React SPAs, and are not particularly tied to Next. + +### Vite + +For some of our newer code, we have started to use [Vite](https://vitejs.dev). +It is more lower level than Next, but the bells and whistles it doesn't have are +the bells and whistles (and the accompanying complexity) that we don't need in +some cases. diff --git a/web/docs/storage.md b/web/docs/storage.md index 8f072684b..bdd1b2c2f 100644 --- a/web/docs/storage.md +++ b/web/docs/storage.md @@ -8,9 +8,32 @@ cleared when the browser tab is closed. The data in local storage is tied to the Document's origin (scheme + host). +Some things that get stored here are: + +* Details about the logged in user, in particular their user id and a auth token + we can use to make API calls on their behalf. + +* Various user preferences + ## Session Storage +Data tied to the browser tab's lifetime. + +We store the user's encryption key here. + ## Indexed DB We use the LocalForage library for storing things in Indexed DB. This library falls back to localStorage in case Indexed DB storage is not available. + +Indexed DB allows for larger sizes than local/session storage, and is generally +meant for larger, tabular data. + +## OPFS + +OPFS is used for caching entire files when we're running under Electron (the Web +Cache API is used in the browser). + +As it name suggests, it is an entire filesystem, private for us ("origin"). In +is not undbounded though, and the storage is not guaranteed to be persistent (at +least with the APIs we use), hence the cache designation.