I’ve actually just been doing that today. I’m building a new project in both ASP.NET Core and Elixir/Phoenix to see what is a better fit.
I recreated the ASP.NET folder structure for “Areas” and and placed all controllers/channels/views/templates into there. If I remember correctly the biggest issue was that templates were not found by default so what I ended up doing was creating different macros for the controller/view for each area by duplicating the generated ones and changing the default namespace and template location.
I moved all of the default controllers/channels/views/templates into a “shared” area. This also required changing the default controller/view macros.
The Phoenix namespacing is pretty annoying to be honest as the controllers/views e.t.c. aren’t namespaced like most Elixir modules. Controllers and views have to live in the same namespace if you want them to work by convention, even though they’re in separate directories. Stick with “AppWeb.Areas.AreaName.ControllerName” and not “AppWeb.Areas.AreaName.Controllers.ControllerName”.
I decided to reverse my decision and go back to the default structure so everything was just subdirectories in the root controllers/views/templates directories. Mainly because I felt dirty for having a controller/view macro for each area and it’s easier using the generators.