Best architecture for multiple front-ends (e.g., Admin vs. Client) sharing one backend?

Hi everyone,

I’m trying to find the best architectural solution for a Jmix application where I need to have a single backend (data, entities, services) but two (or more) different front-end “entry points”.

My goal is to have a setup like this:

  1. office.myapp (The Admin/Back-office App)

    • This would be the “main” Jmix application.
    • It defines the full data model, all entities, and includes all the standard Jmix UI screens for managing the entire system.
    • Users here are administrators or back-office staff ad see all tentants data.
  2. client.myapp (The Client-facing App)

    • This would be a separate front-end application, running on a different port or URL.
    • It’s intended for external users (clients/tenants).
    • Users logging in here should only see a very specific, limited set of screens and be able to perform only a few actions (e.g., input data, update entities ecc) on a subset of the entities.

My key requirement is to physically separate these front-ends. I want to avoid having one single, monolithic UI where I have to manage complex role-based logic to hide/show 90% of the application for client users. I’d prefer two distinct applications that share the same backend logic and database, if is it possible

I’ve been considering two potential approaches and would love your advice on the “Jmix-idiomatic” way to do this:

Option 1: The Composite Project Approach
Is using a composite project the right way to go?
For example, I could have:

  • A core module (add-on) with all entities and services.
  • An office-ui module (add-on) with the full admin UI.
  • A client-ui module (add-on) with the limited client-facing UI.
    Would this allow me to deploy two different runnable “apps” (office and client) that both depend on the core module? i don’t find best practice to configure this solution in a good way, i don’t know if there is documentation about this use of composite projects

Option 2: Main App + REST API Approach
Is the recommended solution to build office.myapp as a standard, complete Jmix application, and then build client.myapp as a completely separate application (e.g., a simple Jmix app with its own UI) that consumes the data from the main app via its RestDatasource?

I feel like Option 2 might be cleaner, but I’m not sure if it’s the most efficient way or how data sharing works best in that scenario (especially if the client app is also a Jmix app).

What is the best practice for achieving this “split front-end” architecture?

Thanks in advance for any guidance!