homebrewery icon indicating copy to clipboard operation
homebrewery copied to clipboard

[LOCAL]: Flat File Structure

Open G-Ambatte opened this issue 3 years ago • 3 comments

Rather than saving documents to a MongoDB collection, some users in the past have requested that they would prefer to save to a local text file. Some have suggested placing these files in their own separate Git repository/sub-module to allow for versioning of their files, e.g. #346, #808.

I would suggest that we create a save system that will create files locally, but contain this behind a process.env.NODE_ENV == 'local' check so that it only applies to users who are running local installs.

G-Ambatte avatar Dec 26 '21 00:12 G-Ambatte

I think setting up a local text file save would be fine, especially now that we have metadata embedded into the brews themselves. However we still want local installs that can work with MongoDB for development. So perhaps we could rename the current local environment variable to dev or something, and then local would be just a self-contained to use the local file system?

calculuschild avatar Dec 26 '21 01:12 calculuschild

One option would be to change the Google icon from a toggle (Mongo/Google) to a dropdown (Mongo/Google/Local).

  • Google would be greyed out and unselectable unless the user has signed in with Google Drive.
  • Local would only be available where process.env.NODE_ENV == 'local'.

This dropdown option could also be extended as additional storage options are incorporated. This could be added to the UserInfo framework as an accountwide default setting, once that PR is completed.

G-Ambatte avatar Dec 26 '21 02:12 G-Ambatte

Issue #1101 appears to be a similar request to save to a Github repository, although I suspect that the intent there was to be able to do so from the production website rather than a local install.

G-Ambatte avatar Jan 06 '22 19:01 G-Ambatte