TypeORM

A TypeScript/JavaScript ORM supporting both Active Record and Data Mapper, across more databases than any other JS ORM

Library
npm
v1.1.0
36,631stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
88/100Excellent
Development Activity92
Maintenance84
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture85
Code Quality82
Innovation76
Learning Curve70

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

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
Rust
67%
MIT

Bun

Developer Tools

95,452

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.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
Go
79%
Apache 2.0

Dolt

Databases · Data Engineering · Developer Tools

24,221

The SQL database you can branch, merge, diff, and clone — Git for your data, MySQL-compatible and ready for multi-agent AI workflows.

View details
91
Repo Health
9
Technical
72
Dependency
Built with
Go79%
Shell20%
Updated today
TypeScript
62%
Other

Flowise

Developer Tools · Automation · No Code Platforms

55,379

Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.

View details
91
Repo Health
77
Technical
64
Dependency
Built with
TypeScript62%
JavaScript27%
Updated 6 days ago
TypeScript
54%
MIT

FormBee

Forms Surveys

771

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.

View details
29
Repo Health
48
Technical
69
Dependency
Built with
TypeScript54%
SCSS25%
HTML19%
Updated 1 years ago
TypeScript
83%
Apache 2.0

Grist

Databases · No Code Platforms

11,469

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.

View details
91
Repo Health
93
Technical
68
Dependency
Built with
TypeScript83%
Python11%
Updated yesterday
TypeScript
98%
Other

Hexabot

AI Development · Automation

1,186

Build and run agentic workflows across channels with YAML, tools, and RAG

View details
79
Repo Health
76
Technical
70
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,618

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
53
Repo Health
66
Technical
64
Dependency
Built with
TypeScript94%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search