For a pure JSON API application, is Phoenix overkill?

is Phoenix overkill?

I believe that question is a result of carrying misconceptions from other languages or frameworks which oftentimes add code bloat and performance penalty. Phoenix is not like that. E.g. in Ruby world, you often see discussion about choosing Rails (heavyweight but complete) vs Sinatra (lightweight, requiring more from the user, but not carrying over bloat).

This dichotomy does not exist in Phoenix. The next sentence is a little stretch, but it should give a nice intuition. In the sense of lightness Plug might be comparable to Sinatra. Now, imagine if Rails was just a generator for a full blown app that glues some Sinatra configs together. Then you could use the quick start convention and remove all the unnecessary stuff.

That is exactly how Phoenix works. It is a layer on top of Plug with conventions and configurations. Even better, you don’t need to start with full Phoenix and remove stuff, the mix phx.new task allows specifying –-no-assets –-no-html –-no-live and you are ready to go.

So, in the end, use Phoenix. It is not like Rails which would pull a lot of unnecessary things. Phoenix can be as lean as you need it while benefitting from easy to follow conventions. It is even fine to use Phoenix to server static content with -–no-ecto.