There is also a chapter on application design in the Ecto Book Funnily enough, I posted about it last night in the Ecto Book Club thread: https://elixirforum.com/t/programming-ecto-book-club/20448/3 (you might also find this discussion interesting: Discussion: Don't add a database layer to your Phoenix application)
Ecto follows the Repository Pattern which helps separate the pure from the impure and Phoenix encourages working with Contexts, which is made easy by Ecto. The Ecto book says Phoenix Contexts were inspired by the concept of bounded contexts as described in the Domain Driven Design book.
Also, @sasajuric just posted a new package today Boundary - enforcing boundaries in Elixir projects which may also be of interest.
If you haven’t read it, I highly recommend the Ecto Book - it’s so easy to read as the examples are clear and easy to follow. Check out my interim review here