# Architecture: future of model, users and groups

**URL:** <https://forum.xwiki.org/t/architecture-future-of-model-users-and-groups/9693>\
**Category:** Development\
**Tags:** brainstorming\
**Created:** [January 14, 2022, 10:42am UTC](https://forum.xwiki.org/t/architecture-future-of-model-users-and-groups/9693 "2022-01-14T10:42:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surli](https://forum.xwiki.org/user_avatar/forum.xwiki.org/surli/32/2687_2.png) [@surli](https://forum.xwiki.org/u/surli)\
**Post date:** [January 14, 2022, 10:42am UTC](https://forum.xwiki.org/t/architecture-future-of-model-users-and-groups/9693/1 "2022-01-14T10:42:53Z")

</div>

Hi everyone,

I’m opening a rather large brainstorming mainly to try to envision what we want in the future in terms of Maven architecture for xwiki-platform around the concepts of model, users and groups.

To contextualize I’m bringing up this brainstorming because I had an issue this morning because of a dependency: `xwiki-platform-user-api` currently depending on `xwiki-platform-model-api`. Currently this dependency exists because of a `GroupManager` interface that is part of `xwiki-platform-user-api`. Personally I don’t think this is accurate.

Conceptually I think API manipulating users and API manipulating groups should be well separated, this was already discussed in [User and Group APIs](https://forum.xwiki.org/t/user-and-group-apis/7715) and I still think a design such as:

- wiki-platform-actor
  - xwiki-platform-actor-generic
    - xwiki-platform-actor-generic-\*

  - xwiki-platform-actor-user
    - xwiki-platform-actor-user-\*

  - xwiki-platform-actor-group
    - xwiki-platform-actor-group-\*

would be more accurate.

Now another related question is about `xwiki-platform-model-api` in my case the issue was that I introduced a dependency to `xwiki-platform-user-api` in it because I needed to use `UserReference` in the model API.

The way I see it, we want `xwiki-platform-oldcore` to decrease and so we want in the future to refactor it by creating new components for the model which will use the `UserReference` since it should be our new standard API to manipulate user. And for me those APIs should take place in `xwiki-platform-model-api`.

Now maybe the problem is that `xwiki-platform-model-api` currently contains all the references that are used everywhere such as `DocumentReference`, so maybe in the future we should create a dedicated `xwiki-platform-model-references` to hold the document references only without the model APIs. It might avoid the cyclid dependencies like the one I got this morning.

So wdyt, do we share the same vision, or is it something completely different for you?
