github.com/mikro-orm/mikro-orm ↗
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, MS SQL Server, PostgreSQL and SQLite/libSQL databases.
Open this visualization on its own page →
Contributors
70
Lines of Code
11,335
From
2018-03-15
To
2021-01-08
About mikro-orm/mikro-orm
MikroORM is a TypeScript ORM for Node.js built on proven architectural patterns: Data Mapper, Unit of Work, and Identity Map. It provides a clean abstraction layer over multiple databases including MongoDB, MySQL, MariaDB, PostgreSQL, SQLite, libSQL, MSSQL, and Oracle, drawing inspiration from established ORMs like Doctrine and Hibernate.
The framework emphasizes automatic change tracking through its Unit of Work pattern, where entities are modified in memory and all changes are coordinated in a single database transaction when you call flush(). It supports flexible entity definition through decorators, EntitySchema, or the modern defineEntity API, along with comprehensive features like QueryBuilder, relationship loading strategies, schema generation, migrations, and lifecycle hooks.
MikroORM caters to Node.js developers building web applications and serves multiple frameworks with example integrations for Express, NestJS, Koa, GraphQL, and Next.js. The project includes extensive documentation, CLI tooling, entity generation from existing schemas, and support for advanced features like embeddables, custom types, composite keys, and request-scoped identity maps for web contexts.