Hexagonal architecture in elixir

Last year, I am pretty obsessed with the Hexagonal architecture and trying to implement it in Phoenix. I learn that if your application has a portion where there are some logic to it (i.e. not CRUD related), then hexagonal architecture makes sense.

For example, think of a Todo application that give you analytics on how many tasks you have completed every day, and even forecast how many tasks you will complete tomorrow given the current productivity.

The code to tabulate the tasks completed everyday, and the forecasting logic for tomorrow is something that make up the core of your hexagonal architecture. It can and should be shield from your HTTP and your DB layer. Ideally, the core should also be pure. It doesn’t maintain state. It merely just takes in data, and return the output.

However, most applications will have their fair share of CRUD operations. Can we use hexagonal architecture for this? I think it is possible, and I have tried out an example by defining my own mock Repo. But after some time, I think it is not worth the effort.