Iridium is a lightweight, TypeScript-first ORM for MongoDB designed for power-users who want fine-grained control over database interactions. The current stable version is 7.2.5, with a low release cadence (last release in 2019). It provides a bare-bones abstraction over the MongoDB driver, supporting schema validation, pre/post hooks, and minimal magic. Compared to Mongoose, Iridium offers less built-in convenience but greater transparency and performance for advanced use cases. It ships with TypeScript definitions and requires Node.js >= 6. It is ideal for projects that need a thin wrapper without heavy opinionation.
npm install iridiumNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to connect to MongoDB, define a model with schema, create a document, and save it using Iridium.
Surround calls with Promise.resolve() or use async/await with Bluebird configuration.
Always call database.connect() and await the promise before using models.
Add static collection = 'your_collection_name'; to your model class.
Use Mongoose-like schema objects or check documentation for alternative formats.
Use import { Iridium } from 'iridium' (named import) instead of import Iridium from 'iridium'.Run npm install iridium and ensure node_modules contains it.
Provide username/password in the connection options (e.g., { username: 'user', password: 'pass' }).