Admin backends for Phoenix

I alway use something like ActiveAdmin or RailsAdmin when quickly putting together an app (even if initially) with Rails - they are just so convenient and help you concentrate on the app itself.

What do you do or use with Phoenix? Prefer to roll your own or use something like Ex Admin?

7 Likes

We got away with https://elements.heroku.com/addons/adminium for now.

4 Likes

I tend to roll my own. Perhaps this could be the start of a collaboration of sorts on this forum.

2 Likes

What about ExAdmin? It looks pretty good? :slight_smile:

Demo here: http://demo2.exadmin.info/admin

5 Likes

Hello,
there is another one called: torch

edited: (I forgot this one…!)

  1. talon
    It’s the new version of ExAdmin and proposed by @smpallen99 as a solution of ExAdmin’s lack
4 Likes

Hello there,
concerning administration Panel concept, I’ll recommend reading the @chrismccord 's way… Writing Web-facing features…

Applications with “users” are naturally heavily user driven. After all, our software is typically designed to be used by human end-users one way or another. Instead of extending our Accounts.User struct to track every field and responsibility of our entire platform, it’s better to keep those responsibilities with the modules who own that functionality. In our case, we can create a CMS.Author struct that holds author specific fields as it relates to a CMS. Now we can place fields like “role” and “bio” here, where they naturally live. Likewise, we also gain specialized datastructures in our application that are suited to the domain that we are operating in, rather than a single %User{} in the system that has to be everything to everyone.

But knowing that the ideas may differ, what are your thoughts about his opinion/point of view?

1 Like

What are people using these days? Seems like most of the mentioned projects in this thread, is not maintained any longer. :slight_smile:

Currently the two most downloaded are:

Ex Admin - An Elixir Phoenix Auto Administration Package.
torch - Rapid admin generator for Phoenix

Full list here.

2 Likes

As i can see ExAdmin is not maintained any more?
Torch last commit was 4 month ago. And in general it doesn’t look like complex solution.

I’m looking forward to use Phoenix in my next project, but admin panel is really needed.
What to use, any advice?

I’m working on an admin backend inspired by torch and ex_admin. The core component is a library to generate ecto queries dynamically from phoenix params (also written by me) which I haven’t released yet. I can’t guarantee the API stability of this library yet, though…

If people are interested in trying it I might publish it (as super alpha software) . It’s already quite functional, actually.

It makes heavy use of generators, so it’s closer to torch than ex_admin. IMO, the main advantage over torch is that the generated code (especially the templates) are a bit cleaner and easier to extend, and I think it supports a little more features.

4 Likes

I tried both Torch and ExAdmin but didn’t like either so I built the admin interface using the Phoenix generators. It’s been really easy to work with, and so far it’s felt like the better option to opt for. This was done in an umbrella app setup with multiple Phoenix apps.

You can slap on a Bootstrap admin template, add a user authentication library, and have it up and running in no time.

2 Likes

I’ll check it out. I thought that ExAdmin was being retired for Talon. Haven’t tried either, just remember following the projects.

Hi @danschultzer . Can you share more details on how you generated your stuff? Especially, how do you interact with the contexts made in your main app?

It’s pretty much all in this one mix task: https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Html.html

Run with --no-context and --no-schema if you already have the context and schema. The mix tasks generates all you need for the admin interface.

You can also generate an admin context module for list/get/create/update methods. The generator will set it up so you can see how you interact with your context app from your controllers.

3 Likes

Okay ! If you want to make the Admin panel for a context Blog and a schema Post, what would be in the Controller of the admin/Post ? Will it be a plain copy of the basic PostController?

If the PostController is generated with the mix task, yeah. If not, then I would first generate the controllers/context with e.g. mix phx.gen.html BlogAdmin Post blog_posts title:string content:text --no-schema and then use the generated code.

Okay, thank you ! :smiley: