Dart Frog 1.0 is here! 🎉

This marks the first major release of Dart Frog — and a bright future for backend Dart

August 2, 2023
and 
August 2, 2023
updated on
April 19, 2024
By 
Guest Contributor

Today we announce the first major release of Dart Frog with v1.0.0! This release focuses on improving the developer experience with Dart Frog. Read on for some of the main features of the release, the history of Dart Frog, and why you should use Dart Frog in your Flutter projects.

What’s in Dart Frog 1.0

Here are the main features and bug fixes:

  • Daemon: We believe that good tooling is at the heart of improving the developer experience. With this release, we introduce the Dart Frog daemon to make it easier for developers to build first and third party tools to manage, diagnose, and build Dart Frog projects. This will set the foundation for numerous items on our roadmap, including: Open API documentation generation, Dart API client generation, and health check endpoint for monitoring and debugging via IDE extensions and plugins. 
  • Authentication: We added a new package to the Dart Frog ecosystem: dart_frog_auth, which provides a foundation to write authentication APIs. This package doesn't implement all of the authentication checking, since this is almost always specific to an application. Instead, dart_frog_auth gives you a head start for implementing authentication by providing helper middleware that already solves the common code for authentication, so you can focus on the specific implementation details.
  • VS Code extension: As part of our efforts to improve the Dart Frog developer experience, we have begun official support for VS Code as requested by the community. Using the VS Code extension, you will be able to easily create a new project, new routes, and new middleware. There are more exciting features to come to the extension as the Dart Frog daemon is now available! You can already start using the extension here.
  • Wildcard route support: Wildcard routes allow developers to map requests handlers that will handle a wider number of variations of urls, such as the following wildcard route /pages/[...pages] will be able to handle /pages/page/1, /pages/summary, /pages/news, etc. This gives you a lot of flexibility to create dynamic namespaces.
  • Environments: Dart Frog allows developers to define different environments like staging, development, production, etc. We solved bugs that could cause confusion while working with different environments and also added documentation to address this.
  • FormData support and file uploads: With the support of the  multipart/form-data API, you can now easily upload multiple form data like data fields and files. Keep in mind that the request's MIME type should always match application/x-www-form-urlencoded or multipart/form-data for this to work.
  • Custom init method: With the custom init method, you can initialize anything on server start without having to worry about it being reinitialized on server hot reloads. This can be especially useful for setting up database connections, loading environment configurations, or whatever else a developer might need to do only once.

See the full changelog from stable to 1.0 here.

About Dart Frog

Dart Frog is a fast, minimal backend framework for Dart. It can be used by any developer wanting to build a scalable backend, especially Dart and Flutter developers. It is built on top of shelf and mason and is inspired by many tools including remix.run, next.js, and express.js.

Dart Frog is focused on optimizing the process of building backends which aggregate, compose, and normalize data from multiple sources. It’s meant to be a lightweight tool, not a fully-fledged backend solution. Even though it doesn’t bundle features like database access and data caching out of the box, it gives you freedom to use any of your preferred tools with Dart Frog.

Dart Frog also provides a simple core with a small API surface area in order to reduce the learning curve and ramp-up time for developers. Having a unified tech stack enables you to share tooling, models, and more!

Why you should use Dart Frog

Here are some of the benefits that Dart Frog brings:

  • Developer efficiency: As a Flutter developer, you can expand your skills beyond frontend to full stack. You can also use some of the same tooling and workflows on the backend to ensure high-quality code (for example, you can use Dart-specific workflows on the CI to validate your code just like you would with Flutter apps). The learning curve is small, for example, building routes on Dart Frog feels very similar to creating a widget tree in Flutter.
  • Shared code: Sharing code between the front and backend means you can write functionality once and use it on both ends of an application. This is particularly helpful for use cases such as a server-authoritative game; in this case, all of the logic happens on the backend and is passed to the frontend for the UI to change accordingly.
  • Middleware: Working with legacy backends can be frustrating and slow down the development process. Dart Frog can be used as a backend for frontend so that the backend data is normalized and becomes easy for developers to use. This approach also gives more control to developers to do things like optimize and cache backend data.
  • Cloud agnostic: Dart Frog can be configured with any cloud service, so you can use whatever works best for you. There are currently docs for deploying to Google Cloud Run, AWS App Runner, and Digital Ocean App Platform.

History of Dart Frog

We’ve been blown away by the reception of Dart Frog since its initial release in May 2022! It was first released as an experimental backend framework, and after a few months, we upgraded it to stable with a few key features and bug fixes. Dart Frog has since been used in multiple projects in production, including the AI-designed card game I/O FLIP and Flutter News Toolkit. It has also gained over 1,400 stars on GitHub and been incorporated into many articles, tutorials, and conference talks.

Try out Dart Frog v1.0! Get started on dartfrog.vgv.dev →

A note on major releases

There are a few schools of thought when it comes to major or minor releases. In our view, a major release has to meet a few criteria:

  • The source code is stable
  • The tool is well-documented
  • Our team is prepared to support the tool after release
  • Our team is able to provide continued support for our other open source tools (Very Good CLI, etc.)

Full changelog from stable release to 1.0

dart_frog

  • feat: stable 1.0.0 release 🎉
  • feat: provider support nullable values
  • feat: Add Response.movedPermanently() constructor
  • deps: upgrade to Dart ">=3.0.0 <4.0.0"
  • deps: upgrade to very_good_analysis ^5.0.0
  • fix: Pipeline does not maintain RequestContext (#605)
  • fix: Response.json() overwrites content-type header (#596)
  • feat: add SecurityContext named argument to serve method
  • feat: add Response.stream
  • feat: add support for multipart/form-data (#551)
  • deps: upgrade to Dart ">=2.19.0 <3.0.0"
  • deps: upgrade to very_good_analysis ^4.0.0
  • feat: cache Request and Response body
  • feat: add formData to Request/Response
  • BREAKING fix: Request.json() and Response.json() return Future<dynamic>
  • feat: add x-powered-by-header to serve
  • fix: update Response.json headers to <String, Object>

dart_frog_auth

  • feat: stable release 🎉
  • feat: initial release 🎉

dart_frog_web_socket

  • deps: upgrade to Dart ">=3.0.0 <4.0.0"
  • deps: upgrade to very_good_analysis ^5.0.0
  • deps: upgrade to Dart ">=2.19.0 <3.0.0"
  • deps: upgrade to very_good_analysis ^4.0.0
  • fix(deps): upgrade to shelf_web_socket ^1.0.3
  • feat: initial dev release 🎉

dart_frog_gen

  • feat: detect conflict between dynamic routes and non-dynamic ones
  • feat: update to Dart 3 and Very Good Analysis 5 (#681)
  • feat: adding wildcard detection to dart frog gen (#691)
  • feat!: re-land "add route configuration validation to gen" (#614)
  • fix: revert "add route configuration validation to gen" (#628)
  • feat: add route configuration validation to gen (#614)
  • feat: detect custom init method (#564)
  • deps: upgrade to Dart ">=2.19.0 <3.0.0"
  • deps: upgrade to very_good_analysis ^4.0.0
  • BREAKING fix: support for cascading middleware
  • RouteDirectory signature for middleware changed from MiddlewareFile? -> List<MiddlewareFile>
  • perf: exclude route directories with no routes
  • BREAKING feat: support mounting dynamic routes
  • BREAKING deps: upgrade to Dart ">=2.18.0 <3.0.0"
  • deps: upgrade to very_good_analysis ^3.1.0

dart_frog_cli

  • feat: add uninstall command
  • feat: add verify-only flag to update command
  • feat: add dev_server domain to daemon
  • feat: daemon logger
  • fix: Remove multiple EOL when creating route or middleware
  • feat: enable asserts when running dart_frog dev
  • fix: use custom docker file when building prod server
  • feat: start daemon implementation
  • feat: add devserver lifecycle
  • feat: add dart_frog daemon command
  • feat: update brick bundles to dart 3.0.0
  • feat: Add dart-vm-port option to dev command
  • feat: added default port number for --dart-vm-service-port
  • feat: recommend using --dart-vm-service-port on VM port failure
  • feat: Update to dart 3.0.0 and vg analysis to 5.0.0
  • feat: adding list command
  • feat: adding dart version flag to build command
  • feat: add "new middleware" and "new route" commands
  • fix: filter out error messages from killing the server process (#592)
  • refactor: remove duplicate dart:io import (#556)
  • chore: bump cli_completion from 0.2.0 to 0.3.0 in /packages/dart_frog_cli (#553)
  • feat: support custom init method (#587)
  • fix: adjust InternetAddress to anyIPv6
  • refactor: update to Dart 2.19 and very_good_analysis ^4.0.0
  • fix: update silently fails when the sdk is incompatible
  • feat: dart_frog create uses Dart 2.19
  • feat: upgrade to mason ^0.1.0-dev.38
  • perf: significant decrease in hook startup times
  • feat: upgrade to dart_frog ^0.3.0
  • fix: hook execution after pub cache clean
  • fix: handle UsageException when invalid option is passed (@Ascenio)
  • fix: nested dynamic route resolution
  • fix: support cascading middleware
  • feat: add startup log to production build
  • deps: upgrade to mason ^0.1.0-dev.34
  • BREAKING feat: support for mounting dynamic routes
  • BREAKING deps: upgrade to Dart ">=2.18.0 <3.0.0"
  • deps: upgrade to very_good_analysis ^3.1.0
  • fix: run update check on sigint
  • feat: package:dart_frog runtime compatibility check
  • fix: dart_frog build Dockerfile dependency resolution
  • fix: copy static assets into docker image
  • feat: dart_frog update command
  • feat: automatic updates prompt
  • feat: report external path dependencies
  • feat: dart_frog create
  • upgrade to dart 2.18.0
  • upgrade to very_good_analysis 3.1.0
  • fix: avoid generating an empty .dart_frog directory
  • refactor: use packageName internally for consistency
  • fix: dart_frog build serve static assets
  • fix: dart_frog build failures on windows

More Stories