3 related questions about how to optimise seperation of concerns/apps

  1. Is it possible to make router.ex (and possibly other parts of phoenix framework) an app in an umbrella app?

  2. Is there a ‘master’ app in an umbrella app - is that the umbrella app - or is there no central app?

  3. What would be the best/standard way to build an an umbrella app eg make each group of modules based around a task eg authentication it’s own app?

eg
1 x auth app
1 x sessions app
1 x public facing content app
1 x search app
1 x free user app
1 x paid user app
1 x admin app
etc

Is this overkill if I were to build my idea of a multitenant SaaS app with free and paid user accounts and want it to have the right foundations to scale etc and be valued in the hundreds of millions or billions (muhaha)?

If it’s not, has anyone got a resource I can read or time to write up some suggestions that gets me started with this kind of infrastructure.

Thanks

1 Like

You might be interested in this talk by @wojtekmach and the accompanying repo.

Yes, it is possible. Phoenix is just an Elixir app like every other. You can look at the bank_web app on the repo.

You can have a master app (that depends on every other apps inside the umbrella), but it’s just an app inside the umbrella itself. From what I know, the umbrella app is just a container project with configs and no code (I might be wrong though).

I’m interested in this too :smile:

2 Likes

Thanks, I’ll check those links out.