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

sasajuric
I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries ...
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
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 52673 488
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 18934 194
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
anshuman23
Hello all, I have been working on my proposed project called Tensorflex as part of Google Summer of Code 2018.. Tensorflex can be used f...
New
kevinlang
Hey all, We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3! We have successfully on-boarded the full suite of integration tests (...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
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
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement