Umbrella Project Example

Learn how to build umbrella projects.

Building an umbrella example

Let’s create an umbrella project with two applications inside. Follow the steps written below to build the project.

Terminal 1
Terminal
Loading...

That’s it, you created two applications in the apps directory. Now, you can see the full power of umbrellas. You can access, compile, and test each of those applications individually. You can also run the application altogether when you’re trying to work on integrations between the components.

All Elixir systems are built of multiple applications, typically packaged as OTPOTP (Open Telecom Platform) is an awesome set of tools and libraries that Elixir inherits from Erlang, a programming language on whose VM Elixir runs. servers. Applications are responsible for packaging code. The Elixir programming language itself is an application that’s part of all Elixir systems. Each application has its own initialization and shutdown logic and can be started and stopped as a unit.

Elixir applications are naturally isolated and decoupled. The applications app_1 and app_2 we have created are very similar to any other Elixir application, except for four lines of code that can be found in their mix.exs configuration:

Press + to interact
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",

These four lines of code add some coupling between app_1 and app_2. The first two say that they use the same configurations, and the last two say they use the same dependencies. ...