aesmail

aesmail

Hello guys,

I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the current global pandemic, I kind of had the mindset and time to work on a few things on that list.

The package is in its very early stages, but I started using it for my own projects.
The following is part of the README file.

Kaffy

Extremely simple yet powerful admin interface for phoenix applications

Why another admin interface

Kaffy was created out of a need to have a minimum, flexible, and customizable admin interface
without the need to touch the current codebase. It should work out of the box just by adding some
configs in your config.exs file (with the exception of adding a one liner to your router.ex file).

A few points that encouraged the creation of Kaffy:

  • Taking contexts into account.
    • Supporting contexts makes the admin interface better organized.
  • Can handle as many schemas as necessary.
    • Whether we have 1 schema or 1000 schemas, the admin interface should adapt well.
  • Have a visually pleasant user interface.
    • This might be subjective.
  • No generators or generated templates.
    • I believe the less files there are the better. This also means it’s easier to upgrade for users when releasing new versions. This might mean some flexibility and customizations will be lost, but it’s a trade-off.
  • Existing schemas/contexts shouldn’t have to be modified.
    • I shouldn’t have to change my code in order to adapt to the package, the package should adapt to my code.
  • Should be easy to use whether with a new project or with existing projects with a lot of schemas.
    • Adding kaffy should be as easy for existing projects as it is for new ones.
  • Highly flexible and customizable.
    • Provide as many configurable options as possible.
  • As few dependencies as possible.
    • Currently kaffy only depends on phoenix and ecto.
  • Simple authorization.
    • I need to limit access for some admins to some schemas.
  • Minimum assumptions.
    • Need to modify a schema’s primary key? Need to hide a certain field? No problem.

GitHub link
Hex package

All critique, criticism, PRs, and feedback are welcome.

Showing Posts 97 to 88

cgraham

cgraham

Does Kaffy work with Phoenix 1.8? Couldn’t figure out how to do it. Thx!

Stefano1990

Stefano1990

There is ashadmin.

brightball

brightball

I wonder how difficult it would be to use Kaffy with an application built with Ash?

Faheemvc

Faheemvc

I am curious to know how kaffy is validating forms with changeset and is it possible to customize the validation with different changesets in schema in admin modules

note: in my application context, admin module name is different from schema name

enterprise: [
        name: "Enterprise",
        resources: [
          plan: [
            schema: WraftDoc.Enterprise.Plan,
            admin: WraftDocWeb.PlanAdmin
          ],
          enterprise_plan: [
            schema: WraftDoc.Enterprise.Plan,
            admin: WraftDocWeb.EnterprisePlanAdmin
          ]
        ]
      ],

in WraftDocWeb.EnterprisePlanAdmin added
def create_changeset(schema, attrs) do
Plan.custom_plan_changeset(schema, attrs)
end

in plan admin with plan schema validations and everything works fine, in enterprise plan admin form validation not working, in case any changeset errors it raises error and not displaying the errors at form fields, if changeset is valid will create.

antonioparisi

antonioparisi

hi, @aesmail - are you still maintaining Kaffy?
I’m curious to know the progress of the has_many association forms feature (if any)

regards

aesmail

aesmail OP

This is an important announcement for anyone using Kaffy v0.10

Please note that Kaffy v0.10.1 introduced a bug that ignored all admin modules.

v0.10.1 was released on Monday, October 9, 2023 at 11:57am GMT and v0.10.2 (which fixed the issue) was released at 12:49pm GMT (the time period between the two releases is about 52 minutes).

So if you deployed within this time period, please update Kaffy and deploy again.

Version v0.10.1 has been marked as retired and is no longer available on hex.

Apologies for any issues that this might have caused some of you.

jarlah

jarlah

in v0.10 rc2, i love that you fixed an issue with many_to_many causing kaffy to crash :slight_smile: its not shown or is any value to kaffy, but i can use it in the rest of code :wink:

jarlah

jarlah

great work :slight_smile: lazy mans tool for when you dont want to use up your time fiddling with creating UIs when it might not even be used in the end…

aesmail

aesmail OP

You can always do {:kaffy, "~> 0.10.0-rc.0"} to test it out.
I don’t think things will change as long as there are no serious issues.
The plan is to release 0.10.0-rc.1 a week from now with a few planned minor changes, and 0.10.0 a week after that.

Hisako1337

Hisako1337

Hey there, any idea when 0.10 will release proper? I could need it this month in a project :slight_smile:

Where Next? Top

Trending in Announcing Top

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New
kip
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
New

Other Trending Topics Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews