A pure Dart MongoDB driver for server-side applications, providing modern and legacy API support.
Mongo_dart is a MongoDB driver implemented in pure Dart for server-side applications. It allows Dart programs to connect to MongoDB databases, perform CRUD operations, run aggregation pipelines, and manage data with an API designed to resemble the MongoDB shell. The driver supports both modern MongoDB protocols (OP_MSG) and legacy methods for compatibility across versions.
Dart developers building server-side applications, backend services, or CLI tools that require MongoDB database interactions. It is particularly useful for projects that need a native Dart solution without relying on platform-specific packages.
Developers choose Mongo_dart because it is a pure Dart implementation with no external dependencies, offers extensive compatibility with different MongoDB versions through dual API support, and provides a fluent, intuitive query interface similar to the MongoDB shell.
Mongo_dart: MongoDB driver for Dart programming language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written entirely in Dart without external dependencies, using only dart:io, ensuring seamless integration in server-side Dart projects and avoiding cross-platform issues.
Supports both modern (OP_MSG) and legacy MongoDB protocols, allowing compatibility with MongoDB versions from 3.6 onwards and older, as highlighted in the README's API documentation.
Includes mongo_dart_query for constructing queries in a readable, fluent style, mirroring MongoDB shell syntax and simplifying complex query building.
Offers CRUD operations, aggregation pipelines, secure connections (TLS/SSL, authentication), bulk writes, and change streams, covering most MongoDB needs for server-side Dart.
The README explicitly states that 'the porting is not yet complete' for modern OP_MSG methods, potentially delaying access to newer MongoDB features and causing inconsistency.
The dual system of legacy and modern methods requires developers to manually choose between them (e.g., insert vs. insertOne), adding mental overhead and risk of using deprecated features.
Documentation is fragmented with many external links to examples and separate docs, which can make it harder for newcomers to find consolidated, up-to-date guidance.