Welcome to ElixirDrops!

Hello there and welcome to the ultimate hub for the Elixir community! Whether you're a seasoned developer or just starting your journey, ElixirDrops is the perfect place to discover, share, and discuss the best tips and tricks for mastering Elixir. Sign in to explore, learn and become a contributor on this platform.

Creating and hosting sitemaps in Elixir/Phoenix

Recently, we implemented sitemap generation for ElixirDrops, so I thought I'd share our approach. Since we don't store sitemaps in git and hosting pr...
almirsarajcic

almirsarajcic

4 days ago

Ecto fragments for complex queries

Sometimes when writing Ecto queries, you might discover that the conventional approach doesn't quite cut it. This is where fragments come in, which ar...
Deankinyua

Deankinyua

5 days ago

Capturing Logs in Tests

Sometimes when you writing functions that may produce errors, you might want to log the error in the terminal :...
Deankinyua

Deankinyua

10 days ago

Temporarily changing app config in tests

When testing functionality that depends on application configuration, you can temporarily set specific config values and ensure they're restored after...
almirsarajcic

almirsarajcic

11 days ago

Multi-process collaboration in Mox

Mox enforces process-based verification, meaning only the process that defines expectations is allowed to call the mock by default. This can prove pro...
Deankinyua

Deankinyua

13 days ago

Gracefully handle 404s and other errors in Phoenix using Plug.ErrorHandler

Instead of letting your Phoenix app crash with ugly errors, add this clean error handler:...
amos-kibet

amos-kibet

16 days ago

Cleaning up after tests (on_exit)

When your tests create files, database records, or other side effects, you need to clean them up regardless of whether the test passes or fails. Data...
almirsarajcic

almirsarajcic

17 days ago

Auto-disappearing flash messages in Phoenix LiveView

Use this LiveView hook to make flash messages automatically disappear after 5 seconds in your Phoenix app. Create the JavaScript hook file:...
almirsarajcic

almirsarajcic

24 days ago

Enhanced missing gettext translations check in CI

Earlier I wrote about a check for strings that haven't been extracted yet to .pot and .po gettext files (link). Still, extracting them is not enough....
almirsarajcic

almirsarajcic

1 month ago

Using Playwright MCP in Cursor

Building Phoenix LiveViews and want to see how they actually work in a real browser? Playwright MCP in Cursor lets your AI agent check your features a...
almirsarajcic

almirsarajcic

1 month ago

Improving code coverage with AI agents

Did you know AI agents can even help you with code coverage? Maybe you wanted to figure out all the scenarios you haven't covered in your tests. That'...
almirsarajcic

almirsarajcic

1 month ago

optimum_gen_infra v0.2.0

optimum_gen_infra version 0.2.0 was released....
almirsarajcic

almirsarajcic

1 month ago

Optimum Credo checks

During code reviews, we've noticed some patterns emerge. To avoid wasting time and attention on these pesky details, we started using Credo in all our...
almirsarajcic

almirsarajcic

1 month ago

Cursor rules for Elixir and Phoenix app development

We've been experimenting with vibe-coding using Cursor and Claude for a while now, and noticed some of its shortcomings. Sometimes we've had to make s...
almirsarajcic

almirsarajcic

1 month ago

Using Tidewave with new MCP Proxy (Rust)

Elixir MCP Proxy has been deprecated, and it's time to switch to the Rust one....
almirsarajcic

almirsarajcic

1 month ago