Write Firebase Functions in Dart

A type-safe framework for writing Firebase Cloud Functions using Dart. Deploy with confidence using our modern CLI tools.

@OnDocumentCreated('todos/{todoId}')
Future<void> oncreatetodo(DocumentSnapshot snapshot, RequestContext context,
{required String todoId}) async {
  context.logger.debug('todoId: ${todoId}');
  final data = snapshot.data();
  final title = data?['title'] as String?;
  await snapshot.ref.update({'title': '$title from server!'});
}
@Http()
Future<Response> updateTodo(Todo todo) async {
  firestore.collection('todos').doc(todo.id).update(todo.toJson());
  return Response.ok('Todo updated: ${todo.id}');
}

Modern Features for Modern Development

Type Safety

Build with confidence using Dart's strong type system. Catch errors at compile time and get excellent IDE support for a robust development experience.

Firebase Integration

Seamlessly connect with Firebase services. Native Firebase integration with type-safe APIs and built-in best practices.

Flutter Developer Friendly

Already know Flutter? You'll feel right at home. Use the same language, tools, and patterns you love from Flutter development.

Familiar Ecosystem

Use your favorite Dart packages and libraries. The entire pub.dev ecosystem is at your fingertips for maximum productivity.

Code Sharing

Share models, logic, and utilities between your Flutter app and backend. Write once, use everywhere with perfect type safety.

Powerful CLI

Automate your workflow with our intuitive CLI. Quick project setup, easy deployment, and development tools at your command.

Start Building in Minutes

Getting Started

1. Create a new project

dartblaze new project_name

2. Initialize Firebase configuration

dartblaze init -e "[email protected]" -p project_id

3. Generate necessary files

dart run build_runner build -d

4. Deploy your functions

dartblaze deploy