Homepage    |    GitHub    |    API    |    FAQ

GSoC idea - Support for multiple profiles

this is the topic in regard to the above-mentioned topic.
Anything on how to do this, how it shall be done, what features in shell include etc. is discussed here if an existing topic hasn’t been created yet, see idea description below.
Your interest in this idea shall be announced here, otherwise, it gets easily lost as we would need to remember each introduction.

This topic is used to update the specification of the idea as well, even if there is an existing topic, so interested students, watch it!
Anything that shell be discussed privately as e.g. if it involves your proposal will be discussed through a private channel what is currently in discussion.

As of the moment, I’m writing this, the idea’s description of https://joplinapp.org/gsoc2020/ideas.html#1-support-for-multiple-profiles is:

The applications should support multiple profiles so that, for example, one can have a “work” profile and a “personal” profile. This will also make it easier to share notes: for example, a “work project” profile could be created and shared with co-workers via sync.

We want to offer this feature by allowing the user to select a profile from the app (eg. “work” or “personal”), then switch to it. Switching would be done by restarting the app and loading the selected profile.

Expected Outcome: The user should be able to select a profile and switch to it.

Difficulty Level: Moderate
Platforms: Desktop and/or mobile (at the student’s choice)
Skills Required: JavaScript; React; React Native (for mobile)
Potential Mentor(s): tessus, laurent22
More info: GitHub issue, Forum Thread


2 posts were merged into an existing topic: Can I run a second instance of Joplin?



so I move you post. There is more folks involved in the existing topic

Hey Tessus,

I’m trying to get an idea of how this has to be properly implemented as I would love to work on this as part of GSoC. If we implement this as a desktop feature only, won’t we run into problems while syncing the notes with other platforms? ( I’m quite unclear on how sync works. If there was a forum thread or something that describes how it works that would be great. )

No, why would we? Can you please elaborate?

I don’t think there’s a forum thread or documentation (other than in the code) how sync works.

Apologies. After thinking it through, I figured it won’t be an issue.

So If I’m correct, the scope of this project is only for the desktop application?

IMHO, at the end, the magic happens in the back-end. If you link profiles to users than you can easily switch them on any platform but starting with desktop is alright as long as implemantation allows extension at alger stage

1 Like

I don’t understand this. There are no users in Joplin. You can give the profile a username, but adding multiple profiles will not add a user authorization scheme.

may thinking goes properly too far :slight_smile:
When you share notes with other useres using the sharing service of the notes storage serice (e.g. nextcloud)

Correct me sir if I am wrong, but can’t we add Users to joplin, I mean what if we restrict users to login using any service ( eg. google ) to sync their data. We can link every existing to note users id, as joplin is using sql database, we can have another model, with users id, and their profiles and we can link notes to them. This way we don’t need change anything, we just query according to given profile and everything stores as it is on server. I might be wrong, but I am thinking this from a DBMS ( database management system ) point of view. And as far as I know, users data is synced using his account, ( eg, dropbox, nextcloud etc.), not our servers. So there won’t be a case where data is not matching. For all the notes, which are present before the addition of feature can have a default profile.

I’m against a user/pwd login for the Joplin app. The only users that are specified in Joplin are the users for syncing the data. But there’s only one sync target (user) per profile, so why would you want to use users?

1 Like

I can think of one scenario where that would be useful: a multi user household all sharing the same mobile devices. It’s less common these days but still is a thing. On a desktop, you can setup multiple user accounts but most mobile devices don’t allow multiple user logins.

This was my original train of thought. But I think what Tessus saying might be better. Joplin is supposed to be a simple and powerful note-taking app. Introducing the concept of user ids might make it a lot complicated. Also, it will mess up the current synchronization.

When you think about it, it makes a lot of sense. A lot of Joplin’s users say they want multiple profiles for maintaining personal and work notes separately. Well, they could technically create two separate notebooks and store them separately. However, they want the look of their app to be different as well. Sure, adding multiple profiles to a single user will help, but this would need a major refactoring of the code.

Creating different databases for different profiles will ensure that the “personal” and “work” are completely separated. Adding users does have it’s advantages, but I think it’s better to take the other approach. Also, adding issues might introduce more security concerns into Joplin.

I still don’t get the idea for profiles. Wouldn’t it be much more useful if I could create different sync targets for different Notebooks (similar for example to one note).

I agree with @tessus and @rabeehrz, because making profiles is a simple and robust idea. Making multiple sync targets will force the user to have multiple cloud accounts. On the other hand, profiles will really be a user-end phenomenon, on the desktop or mobile. The info of all the databases can be synced to a single target.

I’m sorry, but I didn’t understand what this means. The statements are contradictory and I will try to explain what multiple profiles mean in a comment later on.

Why does it only have to be for desktop?

The code in Joplin is not designed to handle this. So this is most likely not going to happen.

This is not true. You can sync to the same cloud account, but use different directories.

Is that feature there in all clouds?