Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git storage backend #99

Open
clark800 opened this issue Dec 20, 2024 · 0 comments
Open

Git storage backend #99

clark800 opened this issue Dec 20, 2024 · 0 comments

Comments

@clark800
Copy link

Git would be a great storage backend for this because it would save the complete history, you could make changes to the data from the command line and push to the server without using the frontend, it can be easily self-hosted, and there are reliable free git servers like GitHub and GitLab.

There is a javascript implementation of a git client that runs in the browser, which might work for this: https://isomorphic-git.org/

I think it would be good to store each list as a single file in the git repo so that it is convenient to work with lists from the command line. Each non-indented line could be the start of a note and indented lines could be continuations of the same note, which makes it possible for a text editor to fold notes so that each note appears as one line when folded.

Whenever the user makes a change, it would add a change item to a queue in localStorage. Then it would attempt to do: pull, apply all changes in queue, and push.

Dealing with merge conflicts would be a little tricky, but it looks like there is already some progress on that: #63

I don't think the merge conflict handling needs to be too advanced; it could just error on the side of keeping everything and the user can manually resolve by deleting duplicate notes or redoing changes that got messed up by merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant