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

Feature request: support Github as a syncing backend #956

Open
iamkarlson opened this issue Jun 3, 2023 · 5 comments
Open

Feature request: support Github as a syncing backend #956

iamkarlson opened this issue Jun 3, 2023 · 5 comments
Labels
question Further information is requested

Comments

@iamkarlson
Copy link

I'm new in org-mode world, and trying to setup mobile setup of any kind. I stumbled upon this incredible project, but regretfully I can't use it right away.
I don't have a personal Gitlab account, and it would be a problem to make one (it would conflict with all the sessions I have for thr wotk account on my phone).
Also, I'm not using Google Drive because of the privacy concerns.
However, I'm able to setup WebDav storage but it's too much hassle and additional cost per month if I want my notes to be accessible everywhere via some cloud.

On the other side, Github is a popular solution to store such private repos with notes. It would be great (and I believe for project adoption too) to support Github as a syncing backend.

@munen
Copy link
Collaborator

munen commented Jun 3, 2023

Hi @iamkarlson

Thank you for checking out organice and your kind words🙏🏻

If you want to implement GitHub as a sync back-end, I’m happy to support you in that. The back-ends are implemented in a strategy pattern, so it’s simple to create a new one.

Having said so, I’d say that it won’t be necessary for you. You said that a new Gitlab session will conflict with your existing Gitlab session. When you install organice as a SPA (add to homescreen), it will not. It will have its own session management.

Let me know if one of the options works for you.

Kind regards and a sunny Saturday👋

@munen munen added the question Further information is requested label Jun 3, 2023
@iamkarlson
Copy link
Author

If you want to implement GitHub as a sync back-end, I’m happy to support you in that. The back-ends are implemented in a strategy pattern, so it’s simple to create a new one.

I see that WebDAV backend has only a few methods to implement. Is is the best example that I can use for creating a new integration?

Having said so, I’d say that it won’t be necessary for you. You said that a new Gitlab session will conflict with your existing Gitlab session. When you install organice as a SPA (add to homescreen), it will not. It will have its own session management.

Yeah, but in order to maintain this repo, I would need to log out from my current account, or create a new profile in the browser. This is not very user-friendly tbh.

@munen
Copy link
Collaborator

munen commented Jun 12, 2023

I see that WebDAV backend has only a few methods to implement. Is is the best example that I can use for creating a new integration?

The synchronization back-ends are implemented in a strategy pattern, so they mostly implement the same functions:

return {
type: 'WebDAV',
isSignedIn,
getDirectoryListing,
getMoreDirectoryListing,
updateFile,
createFile,
getFileContentsAndMetadata,
getFileContents,
deleteFile,
};

If WebDAV is a better starting point than GitLab or Dropbox, I do not know. Since they implement the same functions, you cannot go wrong picking any of the existing sync back-ends as a template. The "best" starting point would be the current implementation that is the closes to the Github API. Since I have not developed against the Github API, I cannot tell which one that will be.

Yeah, but in order to maintain this repo, I would need to log out from my current account, or create a new profile in the browser. This is not very user-friendly tbh.

Not really. I probably wasn't clear in my previous statement. When you add organice to your home screen, it's started as a PWA. The instance of organice will have a new session, independent of your browser. So you can be logged in to Gitlab in any other application and organice will not know. You can also be logged in to Gitlab in organice and any other application will not know.

@munen
Copy link
Collaborator

munen commented Jun 20, 2023

For future reference, I have added an ADR on how to implement a new synchronization back-end: https://organice.200ok.ch/documentation.html#adr-003

@iamkarlson Will you be working on adding support for Github as a synchronization back-end?

@maikol-solis
Copy link

I just want to support this idea. I'm not an app developer, just a regular user. However I have my org-roam files in github and it would be useful for my workflow.

Best.

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

No branches or pull requests

3 participants