Generative backend, an alternative to Backend-as-a-Service providers like Firebase or Supabase

Christoph Kappestein
3 min readDec 23, 2022

--

Introduction

In this post I like to share my thoughts regarding the current Backend-as-a-Service landscape and how a generative backend can improve the current situation to help developers build better APIs. As notice, I`am the founder of APIgen which is a service to generate backend APIs.

Today most BaaS providers work in a similar way, they provide a “Database” feature, which is either relational or No-SQL, where a user can CRUD data models and a “Function” feature, which is used to execute additional business logic at the backend. A user can then mostly use a Javascript SDK to easily work with those features. There are multiple BaaS vendors which work in this way i.e. Firebase, Supabase or Appwrite.

The motivation for most users to use such a provider (instead of manually building a backend) is that building and scaling a backend is not easy. If you look at the market there is a real demand for such solutions. With this in mind lets take a look at the problems of this architecture.

Problem

From my point of view the biggest problem with this architecture is, that you business logic code is separated from your data. At the frontend you can either get data from the database or you can execute a function.

In my experience the real value of an app is always added at the backend between the database and the frontend. I.e. at your backend you want to transform data or add additional data from other data sources, or you want to send a mail or a HTTP request if a user creates a new model.

At a classical BaaS provider you would need to move this logic to the frontend i.e. you create a model and then you call a function to execute the business logic. This approach is very fragile and your API is very tied to your frontend i.e. you can not give your clients a way to use this logic since it is in your frontend.

Solution

In the end like with all technologies there is no solution which solves every problem and I`am sure there are users who are happy with the features of current BaaS providers, but I think it is important to always challenge current ideas and solutions to evolve further.

With that being said, I like to introduce you to the idea of a generative backend. Basically what this means is, that you no longer specify your data model at a backend but instead you define it at a code generator. The code generator then generates based on this data model a complete API tailored to your use case.

With APIgen we have created such a platform. At our backend you can design your data model and we generate based on this data a complete working API to CRUD those models.

The great advantage of this approach is, that you are now able to customize the logic of every GET and POST request to your needs. This makes it very easy to i.e. send a mail if you create a new model etc. The generated code is based on Fusio, an open source API management platform which helps to create innovative API solutions.

Conclusion

This was a short post to introduce the idea of a generative backend as an alternative to Backend-as-a-Service providers like Firebase or Supabase and the initial implementation of our APIgen platform as generative backend provider.

--

--

Christoph Kappestein
Christoph Kappestein

Written by Christoph Kappestein

I am a developer in the API space, currently working on Fusio an open source API management platform

No responses yet