What are some most useful libraries you use in production? And why?

Question is self explanatory. Relatively unknown libraries (less popular) are welcome.

Maybe explain what use case (context) led you to gravitate to library you mention.

:slight_smile:

9 Likes

I love Oban. I use puid for generating short-lived sign-in tokens.

10 Likes

Besides the most common Phoenix and Phoenix adjacent libs, I usually end up adding Mox, Tesla, Quantum and Briefly to most projects I work on.

5 Likes

I often use waffle, tz and samly.

8 Likes

I’ve had some pretty good luck with fast64. NIF for encoding and decoding base64.

5 Likes

Some libraries I use with Metamorphic:

  • cloak and cloak_ecto for encrypted fields
  • enacl for asymmetric encryption with Erlang libsodium (NaCl)
  • zxcvbn for more “secure, flexible, and usable” passwords
  • number for converting numbers to various strings like currency
  • stripity_stripe for all things Stripe
  • csv for letting people easily download their data into csv files
  • ex_aws and ex_aws_s3 for syncing to Storj for object storage
  • earmark for markdown rendering
  • remote_ip and plug_attack for protecting against abusive requests
  • credo and sobelow for quick static and security analyisis
  • libcluster for clustering
  • oban for jobs
  • nimble_totp for time-based one time passwords
  • ecto_enum for Ecto enum extensions
  • pwned_coretheory for checking emails and passwords against HaveIBeenPwned? database
  • cors_plug for managing cross-origin resource sharing headers
16 Likes

The latest versions of Ecto have support for Enum field.

10 Likes

The native Elixir implementation is too slow for your use case?

I always use Nimble CSV when I deal with CSV files

7 Likes

In some of our use cases that we have, yes. For small binary blobs, it is negligible. But for larger blobs it is noticeable.

2 Likes

I’ll check out fast64, thanks for mentioning. I have some pretty big blobs being encoded/decoded with the way we handle encrypting and decrypting people’s images.

I use ex_json_schema for validating some healthcare data.

4 Likes

A lot of essential and interesting libraries have already been mentioned.

I would like to mention the ones I use to do internationalization in my Phoenix projects.

I find that in this regard, @kip brings an invaluable grain of salt with his suite of CLDR libraries (Elixir CLDR · GitHub). I use them in most of my projects.

Still in the field of internationalization, I also have a project in production that uses trans (GitHub - crbelaus/trans: Embedded translations for Elixir) to allow users to add content in several languages to the database.

Finally, although it’s not yet in production, I’m also closely following the phoenix_localized_routes library. I think that this library will greatly improve the SEO of multilingual phoenix applications with ease.

Many thanks to all the contributors of the mentioned libraries as well as those which have not yet been mentioned. ^^

great thread!

typed_Struct - non-db structs made easy. alternative for Ecto Schemas that I haven’t tried yet: typed_ecto_schema.
shorted_maps - ES6 like destructing. I’ve not used this repo yet, but it’s going to replace my custom modukle that i’ve been copy-pasting across projects.
timex - formatting dates/times.