Introducing Serverpod, a complete backend for Flutter written in Dart

Serverpod
Serverpod
Published in
3 min readApr 24, 2023

--

Dart is a language that’s well-suited for server-side development. It’s fast, has a clean syntax, and has great libraries for communication and asynchronous programming. However, despite its advantages, there has been a shortage of good frameworks for server-side Dart development, and many have been forced to use other languages instead. Fortunately, projects like Serverpod, Shelf, and Dart Frog are starting to fill this gap. We started Serverpod because we were missing a great backend for Flutter with the ability to use Dart across the whole stack. We wanted something that felt intuitive and which worked seamlessly with Flutter.

Serverpod is an open-source app server written in Dart for the Flutter community. It has become increasingly popular among Flutter developers since the first stable release in January. The framework comes with a number of features that makes it faster to get things done, debug your code, and deploy your server. The code generator will analyze your server code, build your APIs and replicate your backend methods in your Flutter app. Calling a remote endpoint is as easy as making a local method call.

Calling a server endpoint from your app.

The visual log viewer makes it easy to pinpoint exceptions or slow database queries. You can talk to your database using native Dart types with null-safety and statically checked code. In addition, Serverpod provides libraries for common tasks such as uploading files, authenticating through social logins, streaming data through web sockets, caching, and scheduling tasks.

Serverpod Insights allows you to pinpoint errors and view health metrics.

Serverpod 1.1

Today, we are releasing Serverpod 1.1. This update is all about making Serverpod easier to deploy in the cloud. We are adding a lightweight run mode specifically made for serverless platforms, such as Google Cloud Run. With the lightweight mode, the only required dependency for your server is access to a Postgres database. Serverpod now also comes with a pre-configured Docker container, making it easier to deploy your server anywhere.

Serverpod 1.1

For version 1.1, we have also worked together with Google to bring full support for deployments to the Google Cloud Platform. This includes a Terraform module that sets up a complete backend infrastructure, including continuous deployments with Github actions, a load balancer, an instance group on Cloud Engine, certificates for SSL, a Postgres database, and buckets for file storage. Or, if you just want to run the lightweight serverless version of Serverpod, we have a 15-minute quick start guide to get you going. It’s super easy.

Thanks to a great idea and contribution from the community, we are adding another really cool feature to this release; serializable exceptions. This makes it possible to throw an exception in a server method but to catch it in your app. It is an efficient approach to error handling and will save you from writing lots of boilerplate code. Obviously, if you throw a normal exception in your server, it will still be caught, logged, and no sensitive data will leak to the client.

The community is really what makes Serverpod great, and we’d like to take this opportunity to send a big thank you to everyone who has contributed code, helped out your fellow developers on the discussion board, or filed ideas and bug reports. We wouldn’t be where we are without you.

Learn more about Serverpod at serverpod.dev or watch the 1.1 release video here.

--

--