Separate Front-End, one Back-End

I developed an application that uses the Advanced Template and i installed it on three different servers, each for a different customer. At this point, each customer has its front-end and its back-end.

So i have:

  • 3 frontend on 3 different domains and three different servers.

  • 3 backend on 3 different domains and a unique server.

  • 3 db completely separate, a shared db (for i18n and accessories), and a Redis service, all hosted on a fifth server.

Now i would like to create a unique back-end on a single domain for all three front-end.

I also would settle for a login in the backend that allows you to choose the installation to handle. Although … The ideal would be to keep certain administrative accounts (currently cloned in all three installations).

It may be useful… the user is saved in the database with a Nested Set structure.

This is what i would like to somehow get:

In my current project, the only difference to the attached diagram, is that i have three different domains and three different back-en

If you think of the framework as a server and the various apps as clients, you can add a clients table to your backend database to register any number of frontend applications as well as the backend. Use something like Adjacency List in the clients table to handle hierarchies of apps including REST api apps. The clients table can include columns with routes to your configuration files and themes. The categories, menus, settings, storage, themes and other key tables shared among modules and components need a client_id foreign key constraint so the backend can load the appropriate backend data for each of the apps. Building from there gets fairly easy.