DEV Community

Cover image for "Back-end as a Front-end" or How admin dashboards can drive your apps
Voltra
Voltra

Posted on

"Back-end as a Front-end" or How admin dashboards can drive your apps

A discovery

I was writing a playlist manager app. I had an API server setup, my database setup, and I was working on making a front-end client for it.

One source of my frustration was the back-and-forth I had to do with the API, the synchronization primitives that would be needed to make it a proper distributed system, and how complicated orchestrating everything could be.

And then I remembered a piece of tech I stumbled upon a few months prior: Laravel Filament.

What is Laravel Filament

Filament is a free admin dashboard (called panel in v3) toolkit/framework that sits on top of Laravel. You define your Laravel app as usual, and you have lots of tools to help build your back-office, including "auto"-generation of forms and tables.

"Back-end as a Front-end" isn't limited to Filament, and this post isn't about Filament. It's just that I was using Laravel for my API, so I gave it a try.

What is "Back-end as a Front-end"

An architectural design pattern. It can also be named "back-office as a front-office".

It's the idea that your user's space blends in with your admin's space. That the app is nothing more than the admin dashboard itself.

It's the idea that you might not need a front-end beside the admin dashboard. It's the idea that sometimes, a separate front-end is just redundant.

One pattern that emerges really quickly when you have this in mind: web apps can be built entirely relying on this principle.

Why have a decoupled admin panel and user app when you can just have everything be in one place and managed in the same way?

What is this architectural pattern good at?

It's really good at tying together every part of your application in one place: the back-end.

Your user flow is extremely similar to your admin flow? Use this pattern.

You need job queues? Easy. You need de-duplication? Easy. You need locks? Easy.

You don't even have an API lying around: your area of attack has been reduced.

What can't this pattern do?

Replace all the need for a separate front-end. Not everything can be architectured this way.

Most SaaS can, but most client-facing apps cannot. Blogs, social media apps, etc. they cannot benefit from it.

Admin panels are not the sexiest, most user-friendly and most usable pieces of software in the universe. They have one job, and they usually do it well: administering content.

Top comments (0)