Serverpod: A FastAPI like app server written in Dart
I'm the OP, but I just want to be clear that this isn't my project and I'm not affiliated in any way.
The primary author is Viktor Lidholt. He posted on Reddit about some work his team has been doing to improve desktop widgets for Flutter. Serverpod has a GUI server manager component, which is where the motivation comes from I believe and he included a link to Serverpod as well.
I haven't done much mobile app development since I was in college, but in my free time I've been messing around with Flutter and working on a library written in pure Dart as well and I've really been enjoying the experience. Especially just working with pure Dart.
I took a look at Serverpod and was impressed. I'd describe it as perhaps an opinionated Firebase or Supabase alternative with a more cohesive vision. The comparison to FastAPI is purely my own. At work FastAPI just gets out the way and lets me get stuff done in a way that I never felt like Django or Flask did. The comparison is clearly not perfect, it was just what came to mind for me personally. Here are some of my personal highlights from Serverpods feature set.
1. The DB queries use native dart types and null safety, though you can always fall back to pure SQL.
2. Code generation gives you a gRPC or SOAP API like level of integration with client objects and lets you largely avoid making raw HTTP requests to your own back-end API.
3. Auth is ready out of the box with support for regular email/pw as well as Google/Apple logins.
4. Health checks are built-in.
5. Authenticated web sockets support.
There's a bit of marketing on the home page, but there's also a nice snippet of some server side and corresponding client side code that I think really gets the point across.
Server:
Client:// Creates an endpoint called ‘example’ class ExampleEndpoint extends Endpoint { // Endpoint method to be called from client. Future<String> hello( Session session, String name) async { return ‘Hello $name’; } }
Here's the GitHub URL: https://github.com/serverpod/serverpod// Client that can connect to the pod. var client = Client (‘https://myapi.com/’); // Calling generated client code. var result = await client.example.hello(‘World’); // ‘result’ will be ‘Hello World’.