For a type-safe ORM for TypeScript applications, the strongest matches are prismagraphql/prisma (Prisma is a leading type-safe ORM for TypeScript and), prisma/prisma (Prisma is a type-safe ORM that generates fully typed) and prisma/prisma1 (Prisma1 is a TypeScript-first ORM that generates a fully). mikro-orm/mikro-orm and drizzle-team/drizzle-orm round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
These libraries provide robust database interaction with full type safety for Node.js and TypeScript applications.
Prisma is a type-safe database object-relational mapper that uses a declarative schema to map data models to relational and document databases. It provides a unified toolkit for data access, combining a database driver with tools for schema management and record manipulation. The project features a multi-database driver that standardizes interactions across PostgreSQL, MySQL, and MongoDB. It includes a system for tracking and applying structural schema migrations across different environments and a graphical user interface for browsing and editing database records. The system ensures data in
Prisma is a leading type-safe ORM for TypeScript and Node.js that uses a declarative schema to generate a fully typed client, supports migrations, and works with multiple databases—exactly the compile-time type-safe tool this search is after.
Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations. The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o
Prisma is a type-safe ORM that generates fully typed database clients from a declarative schema, provides a query builder with compile-time validation, migration management, and supports multiple databases—exactly what this search requires.
Prisma1 is a TypeScript object-relational mapper and type-safe database client designed for interacting with relational databases. It functions as a system for declarative schema modeling, where database structures are defined in a single schema file that automatically synchronizes with the underlying database. The project provides a type-safe query builder that generates a custom client to ensure database queries match defined schema types at compile time. It also includes a database GUI administrator, providing a visual web interface for browsing, editing, and managing relational database r
Prisma1 is a TypeScript-first ORM that generates a fully type-safe database client from a declarative schema, includes migration management and a visual database GUI — it squarely fits the search for a type-safe ORM with compile-time type safety and TypeScript integration.
Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB. The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction. The library covers com
Mikro-ORM is a TypeScript-native object-relational mapper that gives you full compile-time type safety with a type-safe query builder, automatic schema migrations, and support for multiple database backends — exactly the kind of type-safe ORM you're looking for.
Drizzle ORM is a TypeScript-native database toolkit providing type-safe SQL query building, schema management, and automated migrations across PostgreSQL, MySQL, SQLite, and SingleStore.
Drizzle ORM is a TypeScript-native database toolkit that delivers exactly the compile-time type safety, full type inference, generated types from schema, typed query builder, migration management, and multi-database support this search is after.
TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented application code and relational database tables. It provides a comprehensive data persistence layer that allows developers to define database entities using class decorators or configuration objects, enabling seamless interaction with data through object-oriented patterns. The project distinguishes itself through a flexible architecture that supports both the data mapper and repository patterns, alongside a fluent query builder that translates high-level method calls into platform
TypeORM is a mature, feature-rich ORM for TypeScript that provides compile-time type safety through decorators and entity definitions, a fully typed query builder, migration management, and support for multiple relational databases — exactly what this search for a type-safe ORM requires.
(These badges are from typegoose:master)
Typegoose is a TypeScript library that adds compile-time type safety to Mongoose models, making it a genuine type-safe ORM for Node.js, though it focuses solely on MongoDB and lacks the multi-backend and migration features you likely need.
Prisma Client is a database client for Node.js and TypeScript applications that provides a type-safe interface for interacting with relational databases. It functions as an object-relational mapper that translates declarative schema definitions into strongly typed query interfaces, ensuring that database operations align with the underlying data structure. The library distinguishes itself by generating type definitions directly from a schema model, which enables static analysis and IDE autocompletion during development. By abstracting database interactions into a unified query language, it st
Prisma Client is the runtime component of the Prisma ORM, delivering type safety, generated types, and a type-safe query builder, but it does not include migration management (handled by the separate Prisma CLI), so it fits the type-safe ORM intent but has a feature gap.
Kysely is a TypeScript SQL query builder that provides a type-safe interface for constructing and executing database queries. It functions as a database layer that ensures schema compliance and prevents runtime errors by using a fluent interface and a programmable way to build complex SQL statements. The project features a type-safe database layer capable of inferring return types and aliases from SQL selections and joins. It also includes a SQL migration manager to track and apply schema changes across different environments to keep database versions synchronized. The toolkit covers relatio
Kysely is a type-safe SQL query builder with migration support, but it is not an Object-Relational Mapper—it provides a fluent SQL-building interface rather than mapping database tables to TypeScript objects, so it falls short of the ORM functionality this search targets.
sqlc is a code generation tool that compiles raw SQL queries into type-safe application code. By analyzing SQL statements against database schema definitions during the build process, it eliminates the need for manual data mapping and prevents runtime type errors. The project functions as a schema-aware generator that translates database column types into native language primitives. It distinguishes itself through a modular, plugin-based architecture that allows for the extension of the generation pipeline to support diverse programming languages and custom frameworks beyond its default capab
sqlc generates type-safe Go (and other languages via plugins) code from raw SQL, but it is a code generator, not an ORM, and lacks explicit TypeScript/Node.js integration as described.
sqlc is a SQL compiler and code generator that creates type-safe database client code from raw SQL queries. It transforms SQL statements into typed definitions and functions, eliminating the need for manual row mapping between database results and application structures. The tool ensures compile-time safety by validating SQL queries against the database schema before the application is run. This workflow integrates the database schema directly into the application code, deriving types from the underlying SQL definitions to prevent runtime errors. The system utilizes AST-based query analysis
sqlc is a SQL compiler that generates type-safe Go code from queries, not a TypeScript/Node.js ORM — while it provides compile-time safety and code generation, it does not support TypeScript or Node.js at all, so it is a neighboring category rather than what you are looking for.
Gel is an object-relational database system that models data as a graph of interconnected objects. By utilizing a strongly typed schema, it enables complex relational queries and polymorphic data structures without the need for traditional join tables. The system integrates native vector storage and similarity search operators, allowing it to function as both a relational and a vector database for semantic data retrieval. The platform distinguishes itself through a comprehensive suite of developer-centric automation tools. It features a declarative migration system that tracks and versions sc
Gel is a strongly-typed graph-relational database system rather than an ORM library; while it offers TypeScript clients and type-safe querying, it is a database engine you run separately, not a compile-time type-safe ORM integrated into the Node.js application layer.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| prismagraphql/prisma | 16.4K | Scala | Apache-2.0 | |
| prisma/prisma | 46.4K | TypeScript | Apache-2.0 | |
| prisma/prisma1 | 16.4K | Scala | Apache-2.0 | |
| mikro-orm/mikro-orm | 9.1K | TypeScript | MIT | |
| drizzle-team/drizzle-orm | 34.8K | TypeScript | Apache-2.0 | |
| typeorm/typeorm | 36.5K | TypeScript | MIT | |
| typegoose/typegoose | 2.3K | TypeScript | MIT | |
| prisma/prisma-client-js | 1.5K | TypeScript | Apache-2.0 | |
| kysely-org/kysely | 14K | TypeScript | MIT | |
| sqlc-dev/sqlc | 17.9K | Go | MIT |