Tutorial: Building a JSON API with Phoenix 1.3 and Elixir

You can achieve that by simply passing a flag to phx.new:

mix phx.new --umbrella my_app

And then if you need an app that doesn’t talk to the database:

cd my_app/apps
mix new some_api_client

Those capabilities have been there since v1.3. It is not a default but it is definitely promoted as part of Phoenix as a first class concept.

There have been plenty of discussions on why it isn’t the default so maybe someone can post a link to those (in a nutshell, dropping users into an umbrella project without any context may confuse more than help). We also plan to explore and discuss it in the upcoming Phoenix v1.4 book update too.

5 Likes