TypeORM
A TypeScript/JavaScript ORM supporting both Active Record and Data Mapper, across more databases than any other JS ORM
Repository Health
Technical Analysis
TypeORM is an ORM that runs in Node.js, browsers, Cordova, Ionic, React Native, NativeScript, Expo, and Electron, usable with either TypeScript or modern JavaScript. It supports more databases than any other JS/TS ORM — MySQL/MariaDB, Postgres, CockroachDB, SQLite, Microsoft SQL Server, Oracle, SAP HANA, Google Spanner, and MongoDB — through a common driver architecture.
Unlike most JavaScript ORMs, TypeORM supports both the Active Record and Data Mapper patterns side by side, letting teams choose the style that fits their codebase. It ships with entities/decorators, an entity manager and repositories, a full migration system, connection pooling and replication, a fluent QueryBuilder, and hooks (listeners/subscribers), drawing heavy influence from Hibernate, Doctrine, and Entity Framework.
What You Get
- A common driver layer spanning MySQL/MariaDB, Postgres, CockroachDB, SQLite, SQL Server, Oracle, SAP HANA, Google Spanner, and MongoDB
- Both Active Record and Data Mapper patterns, selectable per project rather than locked in by the library
- Decorator-based entity/column/relation definitions plus an alternative entity-schema (non-decorator) API
- A CLI for generating and running database migrations, including automatic migration generation from entity diffs
- A fluent QueryBuilder for complex joins, pagination, and cross-database/cross-schema queries
Common Use Cases
- Building a Node.js/NestJS backend that needs a full-featured ORM with migrations and relations across a relational database
- Standardizing data access across a codebase that must support multiple database engines (e.g. Postgres in prod, SQLite in tests)
- Modeling complex domain relations (eager/lazy, self-referenced, closure-table) that simpler query builders don’t support natively
- Migrating an existing Active Record-style codebase to TypeORM without switching to a Data Mapper architecture (or vice versa)
Under The Hood
Architecture - the src/ tree separates concerns cleanly: driver/ implements the per-database adapter layer, query-builder/ and query-runner/ handle SQL generation and execution, metadata-builder//metadata-args//metadata/ build the entity/column/relation reflection model from decorators, schema-builder/ derives and applies schema/migrations, and entity-manager//repository/ expose the Data Mapper API while persistence/ backs the Active Record BaseEntity methods. Tech Stack - TypeScript targeting Node.js, browser, and mobile runtimes (Cordova/Ionic/React Native/NativeScript/Expo/Electron), built with gulp, tested via a pnpm workspace, and using Stryker for mutation testing (stryker.config.json) alongside SonarCloud for coverage reporting. Code Quality - the test/ directory contains roughly 2,700 TypeScript test files split into functional, unit, core, and github-issues regression suites, with a docker-compose.yml spinning up real database instances for integration testing rather than relying solely on mocks — a strong signal for an ORM where driver-specific SQL dialect bugs are easy to miss. API Design - decorator-based entities (@Entity, @Column, @OneToMany) keep model definitions declarative and close to the class they describe, while the dual Active Record/Data Mapper support means the public API intentionally offers two idiomatic entry points (entity.save() vs repository.save(entity)) rather than forcing one pattern on all consumers.
Used by 16 apps in this directory
Activepieces
Automation · AI Assistants
Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.
APITable
Low Code Platforms · Databases
API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.
Bun
Developer Tools
An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.
Dolt
Databases · Data Engineering · Developer Tools
The SQL database you can branch, merge, diff, and clone — Git for your data, MySQL-compatible and ready for multi-agent AI workflows.
Flowise
Developer Tools · Automation · No Code Platforms
Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.
FormBee
Forms Surveys
A self-hostable form backend that accepts HTML form submissions and routes them to email, Telegram, Discord, webhooks, and automation platforms — without writing any server-side code.
Grist
Databases · No Code Platforms
A modern relational spreadsheet that combines Python-powered formulas, drag-and-drop dashboards, and granular access controls in a self-hostable, SQLite-backed data platform.
Hexabot
AI Development · Automation
Build and run agentic workflows across channels with YAML, tools, and RAG
Laudspeaker
Marketing · Automation
Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.