Complex open source Phoenix apps to learn from?

Learning from examples is great!

The most complex open source Phoenix app I’ve come across is the website of the Hex package manager: https://github.com/hexpm/hex_web

Are there more (non-trivial) examples to learn from?

12 Likes

Great question, that’s one thing I missed while learning Elixir - more examples of real-world code and patterns.

I’d suggest also taking a look at https://github.com/evercam/evercam-media, it’s an open source project which is used to communicate with CCTV cameras.

Tech feature-wise, it has:

  • HTTP API which uses Phoenix (serving mainly json and jpeg responses)
  • Streaming data to a Rails dashboard using Phoenix Channels
  • Models/data layer which uses Ecto
  • Caching responses and queries using ETS (with ConCache)
  • Communicating with legacy Ruby app through Exq (it only enqueues tasks which are handled by Sidekiq on the other end)
  • Sending emails via Sendgrid
  • Simple communication with OS processes (starting and killing ffmpeg processes)
  • GenServers + Supervisors + GenEvent
  • It also used a Nif until recently, uploading to S3, etc.

FWIW, there are about 8k lines of Elixir code in evercam-media, 8.5k in hexweb. I’d guess that the code quality is probably higher in hex_web and it has had many more experienced developers contributing to it, but looking at evercam-media may still be a good way to see how Elixir/Phoenix is being used in the real world.

But I can’t really say for certain as I’m obviously biased :slight_smile:

12 Likes

evercam-media is also using multiple Repos/databases, which is interesting case.

1 Like

Found some more example on Libhunt: https://elixir.libhunt.com/categories/608-applications

3 Likes

This one is quite complex and very popular: https://github.com/thechangelog/changelog.com

1 Like