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/
What is 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.
Overview of mikro-orm
What it is
MikroORM is a TypeScript ORM for Node.js based on the Data Mapper, Unit of Work, and Identity Map patterns. It supports MongoDB, MySQL, MariaDB, PostgreSQL (including CockroachDB and PGlite), SQLite (including libSQL), MSSQL, and Oracle databases. It is heavily inspired by Doctrine and Hibernate.
Key features
- Clean and Simple Entity Definition — decorators, EntitySchema, or defineEntity
- Identity Map and Unit of Work — automatic change tracking
- Entity References and Collections
- QueryBuilder and Kysely Integration
- Transactions and Cascading
- Populating Relations and Loading Strategies
- Filters and Lifecycle Hooks
Use cases
MikroORM is used in web applications (Express, Nest, Koa, etc.) and other Node.js projects that require database persistence with TypeScript. Example integrations include Express + MongoDB, Nest + MySQL, Koa + SQLite, GraphQL + PostgreSQL, NextJS + MySQL, and more.
Getting started
Install a driver package for your database:shnpm install @mikro-orm/postgresql # PostgreSQLnpm install @mikro-orm/mysql # MySQLnpm install @mikro-orm/sqlite # SQLitenpm install @mikro-orm/mongodb # MongoDBSee the repository README for the full quick start guide, including entity definition and initialization.
License and pricing
This project is licensed under the MIT License. It is open source and free to use.
Based on the project's public README and repository metadata.