talira

mongo_dart

MongoDB driver in pure Dart

open sourceMITfree

mongo_dart is a community MongoDB driver for Dart, written in pure Dart for server-side code (it uses dart:io, so it doesn't run in the browser). It covers CRUD operations and the aggregation pipeline, with an API modelled on the mongo shell; methods come in legacy and modern (OP_MSG) versions, and MongoDB 6.0 and later need the modern ones.

Problems it solves

  • connect to MongoDB from a Dart server
  • MongoDB driver for a Dart backend
  • query MongoDB from Dart without a native library

Features

  • pure Dart MongoDB driver
  • CRUD operations and aggregation pipeline
  • API modelled on the mongo shell

Limitations

  • Server side only: it needs dart:io and doesn't run in the browser or Flutter web.1
  • Not every command has a modern (OP_MSG) version yet, which MongoDB 6.0 and later need.1

Alternatives

The same job

These do what mongo_dart does.

  1. postgres (Dart) PostgreSQL driver for Dart and Flutter

Compare mongo_dart with the top 3