Monastery is a simple and straightforward ODM for MongoDB, designed to be minimal and unopinionated. Current stable version is 4.0.1, with a stable release cadence focused on Node.js >=14. It leverages native MongoDB driver features and provides a clean schema-less interface. Key differentiators include its lightweight footprint, no dependencies on other Mongoose-like strict schemas, and built-in TypeScript support. Monastery is ideal for projects that need a thin data layer without the overhead of a full ORM.
npm install monasteryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows connecting to MongoDB, creating and finding documents with Monastery ODM.
Use ES module imports and set 'type': 'module' in package.json.
Instantiate a Client first: new Client({ uri, dbName }) and then new Monastery(client).Use async/await to get the array directly from Model.find() without calling .toArray().
Replace save() with Model.create() for new documents or update queries.
Switch to import statement or downgrade to version 3.
Use import { Monastery } from 'monastery' instead of import Monastery from 'monastery'.Ensure indexes are created and use supported query operators as per MongoDB documentation.