TNS
VOXPOP
Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
0%
No: TypeScript remains the best language for structuring large enterprise applications.
0%
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
0%
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
0%
I don’t know and I don’t care.
0%
Security / Software Development

Supabase Takes Aim at Firebase with a Scalable Postgres Service

Though Firebase offers tools to help developers get app backends up and running quickly, it's proprietary. Supabase offers an open source alternative.
Jan 4th, 2022 6:00am by
Featued image for: Supabase Takes Aim at Firebase with a Scalable Postgres Service

Google’s Firebase has been a popular way for web and mobile developers to get started quickly by providing a set of tools taking care of the backend so they can focus on functionality on the frontend.

Yet Firebase has its limitations, according to Paul Copplestone, who set out to create the open source alternative Supabase to address the issues he’d encountered.

“I was using Firebase in my previous startup, and I ran into some scaling issues. So I migrated that part of the system over to Postgres, but Postgres doesn’t have some of the functionality, namely the real-time data stream that Firebase has,” Copplestone said.

The Firebase Realtime Database stores and syncs data with a NoSQL cloud database.

“Firebase has this very nice system where you can listen to database changes via websockets. So I reimplemented that using a server on top of Postgres, and then I open sourced it,” he said.

It started gaining traction, and he got together with his friend Anthony Wilson, and the two decided they could build a company with their open source version.

Based on Postgres

While Firebase is about 18 different products, Supabase has focused on four that are most-requested within its community: the Postgres database, authorization, storage for large files and auto-generated APIs. It’s still building out equivalents to the Firebase functions.

Supabase is not a one-to-one clone of Firebase, Copplestone points out.

“Firebase, to its credit, is a phenomenal developer experience. It’s probably the best tool in the world for starting a new project. But when your project starts to scale, sometimes it has a few difficulties. And so that’s the thing that we wanted to solve, and we solve it by offering this fully-fledged Postgres database,” he said. “Postgres, of course, is extremely scalable, and it’s been battle-tested for over 30 years.”

Despite its age, Postgres in recent years has experienced a resurgence in popularity, with System Initiative cofounder Adam Jacob summing it up as: “Other databases offer better models for a given niche, but nothing so elegantly can be twisted into whatever shape you need it to be.”

Supabase employs a lot of different parts to Postgres, for example, the security layer, in particular the authorization layer, along with OAuth and magic links.

Rather than putting authorization in the middleware, it’s in the database level, employing Postgres’s robust row-level security capabilities. Row-level security makes it easy for developers to restrict access to only certain groups or departments row by row.

Supabase pulls other open source tools into the mix as well.

In addition to the Postgres database, it harnesses PostgREST for generating APIs. It employs Go True, API service developed at Netlify for handling user registration and authentication for Jamstack projects. If offers a storage server for managing files in S3 buckets or other S3-compatible systems and uses the API gateway Kong.

Its target is the Jamstack development crowd.

Growing Rapidly

In its most recent launch, Supabase open sourced its dashboard, which includes a built-in SQL editor and Airtable-like table view.

It announced the acquisition of Logflare, which adds searchable Supabase API and database logs within the dashboard. And now row-level security works with the real-time server, so row-level policies can be set per user to be effective in real-time. It’s still working on GraphQL, but built a Postgres extension to resolve GraphQL queries on the database.

While it officially supports JavaScript and TypeScript, the open source community is building out a number of client libraries,  including TypeScript, Python, C# and Swift.

The project has been growing rapidly. It has been among the fastest-growing startups on GitHub for the past five consecutive quarters. It has more than 25,000 stars and around 45,000 developers have signed up for the platform.

It’s not the only open source rival to Firebase. There’s also the Swedish open source backend-as-a-service (BaaS) Nhost and Etebase, focused on end-to-end encryption with its open source SDK and backend-as-a-service platform.

Hasura is an open source real-time GraphQL API engine providing GraphQL or REST APIs with built-in authorization. It supports Postgres, BigQuery, MS SQL Server and others.

Then there’s Skygear, a BaaS built in the Go programming language, with a database with support for relational data types and real-time data synchronization. And AppWrite, which offers cloud capabilities including databases, storage and authorization in a set of integrated REST APIs.

Parse provides a backend server developed for Node.js apps that can run anywhere using environment variables. It adds a GraphQL interface, a file system, and a notifications framework to a core that rests upon either PostgreSQL or MongoDB.

Back4App, based on the Parse platform, offers a low-code backend accessible with GraphQL and REST.

Meanwhile, Microsoft has the .NET-based mobile app platform Xamarin, and AWS  offers the BAAS Amplify and GameSparks, designed to simplify building backends for networked games, but still with the proprietary lock-in associated with Firebase. And some Firebase components are open source, but not all.

Working Remotely

While Copplestone and Wilson are based in Singapore, its team of around 25 is based all around the world, totally remote. It joined the first fully remote class at YCombinator in the summer of 2020. After an alpha launch in June 2020, it announced beta in December 2020.

Its customers include companies like Indonesian payment gateway Xendit, no-code web monitoring and integration website Monitoro and no-code website builder TAYFA.

It raised a $30 million Series A last September, following a $6 million round announced in December 2020.

The company will focus the funding on its hosted platform, ensuring that it’s robust, enterprise-ready and continues to scale, Copplestone said.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Xendit.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.