Lucid Mongo is a MongoDB ODM and query builder for Node.js, built on top of the AdonisJS Lucid ORM ecosystem. The current stable version is 3.1.6. It provides ES6 class-based models, hooks, associations, serializers, migrations, seeds, and factories, similar to @adonis/lucid but specifically for MongoDB. It can be used standalone or integrated with AdonisJS. Key differentiators include noSQL-native features, async/await support (v2+), and MongoDB operator syntax (v3+).
npm install lucid-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: import Model and Database, define a User model, configure MongoDB connection, and create a new document.
Replace operators: { or: ... } -> { $or: ... }, { gte: 18 } -> { $gte: 18 }Upgrade to v2+ and rewrite yield to async/await.
Monitor GitHub for issues; consider forking or using another ODM if immediate support needed.
Run npm install lucid-mongo --save
Use: import { LucidMongoProvider } from 'lucid-mongo/providers/LucidMongoProvider'