GSoC idea - Support for multiple profiles

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?

It seems that there's a huge misconception of the idea of several profiles.

The current status of Joplin is the following: You start Joplin for the first time and a profile is automatically created. This profile holds all your settings, which includes the single sync target for that profile. This won't change. There will be only ONE sync target per profile.

There's an unsupported argument --profile <path> which allows to start Joplin with a new profile, which will be created, in case it does not exist in <path>.

So you can start Joplin with different profiles in different paths. Those are independent from each other and you can't start 2 instances of Joplin (with either the same or the a different profile) at the same time.

Now here's the idea of this project:

Joplin should allow people to manage these profiles within the application (desktop, mobile, cli). There's a setting where one can choose the profile and that's the profile that is used when starting Joplin.
This setting is not supposed to be in the preferences, but maybe a dropdown box right of the search bar. So as soon as you switch the profile, Joplin is restarted with the new profile. I still think there's a way to do this without actually restarting the app, but that's a point that has to be figured out during the project.

This does not change the fact that no more than one instance of Joplin can run at the same time. This is not part of the project - but could be. As a next step, I envision the possibility of starting two or more instances of Joplin with different profiles.

So, to summarize:

There are 2 distinct (but not mutually exclusive) concepts:

  • multiple profiles
  • multiple instances

This project idea is about multiple profiles.

I hope I was able to clear this up a bit.

10 Likes

Currently the directory and file names for the default and only profile are hard-coded. The project aims at changing this and allowing the user to create multiple profiles. Am I right, @tessus?

Yes, that’s correct.

Thank you for clearing this. Will keep this in mind

1 Like

as I started the mess I will try to explain myself. It is mainly said above but I will but in my own words.
I’m mainly driven by the combination of the ideas / features

origin from the same background as stated in

mine too

The final wish is, to run Joplin headless combined with the Web application companion for Joplin on a server on my network (what is currently in reconstruction) allowing to share notes between family members and friends.
User accounts are provided by the sync target such as nextcloud.
A big surplus would be to have work and private profile with different settings (and notes by having a work and private account). You can imaging, profiles present roles and depending on your current role you need a different configuration,

First of all it needs to be answered what is stored in the profile, if it is anything (CSS style, preferences, search weighting, tags, sync-target, …) but the notes than there is even some kind of user profile, as you switch sync-target, you may store at the same service using a different user account.

Of course, we are not going to introduce user account management but using multiple profiles is somehow a transition towards this although leaving the tough work, user management, to the sync-target.
I hope, I expressed it a bit more clearly this time.

I do have some thought about leaving the multiple profile to the OS of the app.
We want to keep Joplin app as simple as possible, so that any user can manage it. Setting up different user profiles on OS is still a tasks to more advanced users, in particular for Android and iOS.
So if we are going to have multiple profiles, like mother, father, kid (staying with the family idea), privacy could become an issue but depending on how GSoC Idea - Password-protected notes is implemented that could be solved

A last though, how could the web companion deal with multiple profiles?
It may need to spin-up another Joplin instance if two user open the web companion with their respective profiles, wouldn’t it?
The question remaining is, how resource consuming is this approach, if operate with headless Joplin apps.

Last but not least, this does not happen at once but, if it is agreed to my thoughts, it shall keep the door open to continue development towards these features.

1 Like