Florian I hope it's okay that I would slightly (and possibly wrongly) disagree. When I, as step 3, remove the user's role in my app, he gets synced to the app's contacts. My understanding is therefore that a role change does trigger a user_sync, but instance.has_role_any() reads out the OLD state instead of the NEW. – But this is only judging from my observations, and there might be something else going on under the hood.
Disagreement is not problem 😉
I checked the code and the user sync for updates triggers right after the meta data update, but before role changes are applied:

It might be a small change to execute the sync after the role change so that a "has-role" check via instance function would reflect the updated roles.
I´ll have a look at it.
Florian I might be misusing REI3 a bit. Currently I work on three different apps for mostly separate but partially overlapping user groups. Since I read in one of your replies that one can also run several REI3 instances on the same server, I am mentally going back and forth between having all three apps in the same instance or in three separate ones. As far as I can tell, it would be easier to separate the three apps from one instance to three (by duplicating the initial one via backup/recovery and then deleting two apps in each instance, respectively) than starting with three instances and later on combine them in the same instance (because transferring an app with its data only works via a backup, and a recovery can only be done into an empty instance).
There is definitely something odd in this scenario, but to get to the bottom of this would require a discussion and probably a whiteboard... 😅
In general, you should not need to backup / recover app data between instances unless you are restoring a production system or want to mirror something for testing. r3 apps are, in general, just meta data - empty shells that define how they work. They can include data (s. presets) for stuff like hardcoded states, workflows, example records and so on. But when data needs to be moved between r3 instances, you should look at APIs or CSV files. When you need to move (transfer) an app to another r3 instance, it´s like a fresh installation of a server application - without any data.
Regarding how apps are built and/or separated, this really depends on the architecture of what you are trying to build and what makes the most sense in your situation.
I generally try to keep entities together - for example, not having 4 relations if I need to store 4 types of people. Instead I would find conditions for separation and then filter accordingly (is it an employee, an external contact, superior of someone, etc.). This way changes/improvements to the entity (like display rules, processing) as well as features that work with this entity (like apps that deal with people) can work for all people records - instead of having to connect to multiple relations because employees and customer contacts are not on the same relation.
There are up- & downsides to any data structure and it might be more useful in your case, to split stuff up. But there are very few cases where outright duplication of entities is useful; and it comes with many drawbacks that can get costly when changes are required later.
Florian Btw. the forum software is excellent. The citing functionality is super useful...
Yep, we are still very happy with it ;)