rizwankhalid

rizwankhalid

API Management Console - runtime route toggling for Phoenix apps

Hi everyone.

I’ve been working on a Phoenix LiveView library that lets you enable/disable routes in real time from a protected dashboard — no redeploy needed. Route discovery happens automatically from your router, and disabled routes return 403 at the Plug level before they ever reach your controller.

What it does:

  • Automatically discovers routes from Phoenix.Router.routes/0

  • One-click toggle, individual or bulk, live via LiveView

  • Blocks disabled routes with 403 via a route guard plug

  • Provides session-based login with admin/viewer roles

  • Audit log (who did what, when), with CSV export

  • Includes search, dark mode, and protected/immutable route(s) config

  • Dead render fallback — works even for API-only apps without LiveView JS

Why I built this:
I work on a small team. We had a business requirement to expose some endpoints publicly. Nothing bad happened — no security incident, no hack — but the thought stuck with me: these endpoints are out there, and if something ever goes wrong, what’s the quickest way to limit the blast radius?

That question grew into this idea. The first step isn’t a perfect fix — it’s to turn it off, limit exposure, and buy time to think, hotfix, or deploy a permanent solution. I asked AI to help me explore and assess the use cases, and what started as a small concern grew into something I thought might be valuable beyond just my team.

The honest part about the package:
This is my first Hex package. I’m new to open source. I’m posting this to get your genuine feedback on whether this idea has legs:

  • Is this actually useful for teams, or is it solving a problem that’s better handled differently?

  • Would you use something like this? If not, why not?

  • What’s missing? What’s over-engineered?

A couple of honest caveats:

  • Without LiveView JS loaded (e.g. --no-assets apps), it falls back to a dead-render mode — most features still work, but a few JS-dependent ones (bulk checkboxes) are hidden in that mode.

  • Storage is currently CubDB only (single-node). PostgreSQL support is something I’m considering adding — thoughts welcome on whether that’d actually be useful to you.

Also: The free-tier route selection UI (the 50-route cap) still needs some work, and I have features like scheduled toggles and PostgreSQL storage in mind. If you spot bugs or design issues, please let me know — I’ll fix them.

Try it out

# mix.exs
{:api_management_console, "~> 0.1"}

Then use ApiManagementConsoleV2.Router in your router and mount it with api_console “/admin/api-console”.

I’d genuinely love to hear:

  • Your first impressions

  • What would make this a “must-have” for your team

  • What I should prioritize next

This is a work in progress, and I’m here to improve it based on real-world needs.

Thanks for reading — and if you try it, let me know how it goes! :folded_hands:

Where Next?

Popular in Announcing Top

tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have ...
New
mtrudel
Bandit is an HTTP server for Plug and WebSock apps. Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
sbs
Only 650 LOC, wrote for fun :slight_smile: https://github.com/sunboshan/qrcode
New
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New

We're in Beta

About us Mission Statement