Skip to main content

Overview ๐ŸŽฏ

Dart Frog is built on top of shelf and mason and is inspired by many tools including remix.run, next.js, and express.js.

The goal of Dart Frog is to help developers effectively build backends in Dart. Currently, Dart Frog is focused on optimizing the process of building backends which aggregate, compose, and normalize data from multiple sources.

Dart Frog provides a simple core with a small API surface area in order to reduce the learning curve and ramp-up time for developers. In addition, Dart Frog is intended to help Flutter/Dart developers maximize their productivity by having a unified tech stack that enables sharing tooling, models, and more!

Quick Start ๐Ÿš€โ€‹

Prerequisites ๐Ÿ“โ€‹

In order to use Dart Frog you must have the Dart SDK installed on your machine.

info

Dart Frog requires Dart ">=3.0.0 <4.0.0"

Installing ๐Ÿง‘โ€๐Ÿ’ปโ€‹

# ๐Ÿ“ฆ Install the dart_frog cli from pub.dev
dart pub global activate dart_frog_cli

Creating a Project โœจโ€‹

Use the dart_frog create command to create a new project.

# ๐Ÿš€ Create a new project called "my_project"
dart_frog create my_project

Start the Dev Server ๐Ÿโ€‹

Next, open the newly created project and start the dev server via:

# ๐Ÿ Start the dev server
dart_frog dev
tip

To customize the running dev server, you can use the following options:

  • --port - The port to run the dev server on. Defaults to 8080.
  • --dart-vm-service-port - The port to run the Dart VM service on. Defaults to 8181. This is required when trying to run multiple dev servers simultaneously on the same host.
  • --host - The host to run the dev server on. Defaults to localhost.
caution

Each release of the dart_frog_cli supports a specific version range of the dart_frog runtime. If the current version of the dart_frog runtime is incompatible with the installed dart_frog_cli version, an error will be reported and you will need to update your dart_frog_cli version or dart_frog version accordingly.

Create a Production Build ๐Ÿ“ฆโ€‹

Create a production build which includes a DockerFile so that you can deploy anywhere:

# ๐Ÿ“ฆ Create a production build
dart_frog build

Uninstalling ๐Ÿ—‘๏ธโ€‹

To uninstall Dart Frog completely, the CLI completion files have to be removed before uninstalling.

# ๐Ÿงน Uninstalling the Dart Frog CLI completion files
dart_frog uninstall-completion-files

Now, if you installed Dart Frog globally via Pub, Dart's package manager, you can uninstall Dart Frog using:

# ๐Ÿ—‘๏ธ Uninstall the Dart Frog CLI from pub.dev
dart pub global deactivate dart_frog_cli

Feature Set โœจโ€‹

โœ… Hot Reload โšก๏ธ

โœ… Dart Dev Tools โš™๏ธ

โœ… File System Routing ๐Ÿš

โœ… Index Routes ๐Ÿ—‚

โœ… Nested Routes ๐Ÿช†

โœ… Dynamic Routes ๐ŸŒ“

โœ… Middleware ๐Ÿ”

โœ… Dependency Injection ๐Ÿ’‰

โœ… Production Builds ๐Ÿ‘ทโ€โ™‚๏ธ

โœ… Docker ๐Ÿณ

โœ… Static File Support ๐Ÿ“

โœ… WebSocket Support ๐Ÿ”Œ

โœ… VS Code Extension ๐Ÿ’ป

๐Ÿšง Generated Dart Client Package ๐Ÿ“ฆ

๐Ÿšง Generated API Documentation ๐Ÿ“”