I created a custom admin panel in a Rails application that allows you to edit the contents of certain models through the gui interface. First, I developed the admin application to act as parent applications - with its MVC, Gemfile, migrations, etc. - and created sub-applications (in a directory called frontends) that act as website interfaces for admin models. Sub-applications inherit MVC from the parent admin application, allowing you to create website interfaces and build on the existing administrator architecture without having to review constantly updated admin sites for each new project.
Now the structure on my local machine looks like this:
Administration Application <-- Individual git repo -> app -> admin -> config ... -> frontends -> Website_1 <-- Individual git repo -> app -> config ... -> Website_2 <-- Individual git repo -> app -> config ...
The current interface is identified by a simple frontend.yml file in the configuration, which loads the external application in the initializer before the administrator application.
It seems to me that it is imprudent to have a nested structure this way. At first, the nesting of git repositories is messy on my location machine, and more importantly, it is very difficult to switch the project context in a relatively short period of time. For example, if I wanted to go from site_1 to site_2, I need to exit the rails server and run a rake task that switches interfaces. It also becomes a little more cumbersome when the front end uses a different branch of the administration application. I find myself spending a lot of time in git and switching between contexts to continue developing my projects.
I would like to change the structure of the application, where each interface is its own independent Rails application. It seems like this would make it easier to switch development contexts, allowing you to run multiple applications at once, rails server , testing, etc. I also want to be able to continue placing the administration application in git, so there are various tastes of the application in the entire series of branches and tags.
What would be the best way to get closer to this reconfiguration? I was thinking of creating the gem of an administration application and downloading it from the Bundler.
source share