Elixir/Ecto-only project with CRUD API

I’m still learning how to work with elixir and it feels like setting up a CRUD API without a Phoenix frontend is a rather complex task. I’d like to ask if anyone knows of any open-source project that uses Elixir and Ecto to build an API without Phoenix as the frontend to see how they handle some of the problems that I’m having, mostly with building complex associations between tables.

Hopefully, this will help me to understand better the logic behind how to use complex changesets to both create and update new instances of objects. Thanks!!

2 Likes

Are you using Phoenix for the CRUD API controllers or something else?

Nope, it is all just elixir, plug, and ecto. Not using Phoenix.

Sound like your problems are around joins and associations in Ecto and managing that sort of thing? If so, I don’t think you’re alone in finding that stuff confusing.

Do you want to share the problem you’re having more specifically and the errors you are encountering?

Yeah, most of the problems come when trying to update complex associations. It’s not really the fact that it is a problem, I’ve been able to kind of pull it off, but more of that I think there has to be a better way to do it than how I am since I’m new to the language. And also, it feels like the way I’m doing it is super fragile and not really something solid or scalable, so I just want to see how others have solved this problem and compare it to how I have.