Phoenix 1.7-rc0 Project Organization; Multi-Endpoint & UI

Thanks for your input. Actually already landed on that conclusion for many of the reasons you mention.

Having said that, I’ve gone through a few different models of having multiple sites served from a single Elixir deployment and I’m a bit surprised that the most finicky approach to get working correctly is the umbrella approach. At least as far as getting to a simple boilerplate site up and running on each endpoint. Prior to the umbrella, I’ve gotten the dual sites going with a single Phoenix application with multiple Endpoint, Router, etc. modules and I’ve actually tried an approach of creating two standalone Phoenix applications and then adding them as dependencies to a top level Elixir project… sorta “poncho application” style and that was pretty straightforward to get going (that style matches some of the broader application development happening in this project)… and had a lower cognitive load compared the single Phoenix application approach.

However, I’ve had more trouble getting multiple Phoenix apps in a umbrella working well. I think the difference in experience is largely due to wanting to rely more on the Phoenix generators to do the right thing (at least initially) vs. the fact I had to hand-wire the configuration and setup for the other two methods I’ve played with. The generators almost do the right thing when setting up multiple Phoenix apps in an umbrella, but not quite and there’s enough magic in Phoenix that figuring out where something isn’t quite right isn’t as obvious as when I was hand-configuring the other options.

For example the generators will create the umbrella config.exs & dev.exs (& others) in the umbrella and it does create a boilerplate configuration for each of the Phoenix apps as you might expect. But it seems to fail to handle the esbuild/tailwind part of that configuration correctly for that scenario; thanks to a helpful post by @ Kurisu / Tailwind + Esbuild for umbrela applications - #3 by Kurisu I was able to get past that issue though there are other issues still present stopping the basic Phoenix starter pages to pop up; I expect they’ll be similar to the configuration issue above and not too terrible to track down, but clearly the generators only go so far. (And yes, I’m using release candidate Phoenix so that could well be a factor and understood as compromising action).

In the end I do still think the umbrella is the correct approach for dealing with the multiple UI management. Once the generated configurations are sorted I’m expecting things to work on par with the first approaches I tried with the added advantage of some of the tooling that is umbrella aware.

Thanks again!