# Realm JS: a mobile-first database for React Native and Node.js

> Realm JS embeds a reactive object database inside React Native and Node.js apps, but MongoDB's deprecation of the Atlas Device SDKs means new projects must weigh the community branch before adopting it.

**realm/realm-js** —  Realm is a mobile database: an alternative to SQLite & key-value stores

- Repository: https://github.com/realm/realm-js
- Website: https://realm.io
- Stars: 6,005 · Forks: 613
- Language: TypeScript
- License: Apache-2.0
- Published: 2026-09-22 · Updated: 2026-09-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/realm-realm-js

## What Realm JS solves, and who it is aimed at

Realm JS is the JavaScript and TypeScript implementation of the Realm database, a store that runs inside the application process rather than behind a network socket. The README describes it as "the first database built from the ground up to run directly inside phones, tablets and wearables", and the supported hosts are React Native (JSC and Hermes on iOS and Android), Node.js, and Electron on Windows, macOS and Linux. The intended audience is mobile and edge developers who want persistence without mapping rows to objects by hand. The README argues that exposing data "directly as objects" and letting you query by code removes the need for ORMs "riddled with performance & maintenance issues". That is the pitch: your model classes are your storage schema, and queries return live objects rather than plain copies. It is a reasonable fit for an offline-first app with a few dozen model types and no server round trip on the read path.

## The deprecation notice changes the adoption decision

The first thing in the README is a warning, not a feature list. MongoDB announced the deprecation of Atlas Device Sync and the Realm SDKs in September 2024, and the README links to two MongoDB deprecation pages for the details. The practical consequence is that the managed sync service is not a foundation for new work. For a version of RealmJS without sync features, the README says to install from the community version on npm or to use the community git branch. So there are two products under one name: the default package, which still carries sync code, and the community build, which strips it. Anyone reading a tutorial written before late 2024 is likely reading about the version with sync, and the code may still compile while the backend it talks to is being wound down. The repository itself is not archived, and the last push was on 2026-09-17, so the code is still being touched. That does not restore the hosted service.

## How the schema and query layer actually works

Models are classes. The README's TypeScript example extends Realm.Object, declares a primary key as a static field, and uses decorators such as @index on a property. The @realm/babel-plugin package transforms those TypeScript classes into Realm schemas at build time, which is why the class definition doubles as the migration surface. There is no separate schema file to keep in step with your types. The README also states the database supports relationships, generics and vectorization, and that queries run against persisted objects rather than a snapshot. For React Native, the @realm/react package wraps this in hooks so components can subscribe to query results and re-render when the underlying objects change. The data flow is local: writes go to the Realm file on the device, and readers observe that file. When sync is in the picture, the SDK reconciles those local writes with a backend, but that is the part being deprecated.

## Installing Realm JS and running a first query

The README does not print an install command for the Node.js package; it points to the Atlas Device SDK documentation for Node.js and React Native, and to the community version on npm for a build without sync features. The repository's own package.json requires Node.js 20 or later and npm 10 or later, while the README's getting-started text says only Node.js 18 or later is supported for the SDK. Treat the repository engines field as the stricter of the two. What the README does print is the TypeScript model class, which is the shape your first schema takes:

```typescript
class Task extends Realm.Object<Task, "description"> {
  _id = new Realm.BSON.ObjectId();
  description!: string;
  @index
  isComplete = false;

  static primaryKey = "_id";

  constructor(realm, description: string) {
    super(realm, { description });
  }
}
```

That class is the whole schema declaration: _id is the primary key, description is required, and @index marks isComplete for indexing. The @realm/babel-plugin package is what converts it during the build. For React Native, the README recommends @realm/react and points to the Expo and React Native template apps under templates/, which carry their own setup instructions; that is where to look for the native build steps, since the README itself does not reproduce them.

## Debugging and tooling constraints you should know before you start

The known-issues section is blunt about one thing: Realm is not compatible with the legacy Chrome Debugger. The recommended path is the Hermes Debugger, and Safari developer tools also work but need extra setup and only support iOS. The README adds that you do not need to enable "Debug with Chrome" in the debug menu for either method. This matters because the legacy debugger is still muscle memory for a lot of React Native developers, and enabling it produces a broken environment rather than a warning. Separately, the React Native side is version-sensitive: the README points to a COMPATIBILITY.md file in the repository that maps supported versions, and it does not reproduce that matrix inline. If you are on an older React Native release, that file is the first thing to open, not the last.

## Where Realm JS is the wrong choice

If your application needs cross-device sync as a product requirement, Realm JS in its current form is the wrong starting point. The sync service is deprecated, and the community build the README recommends is explicitly the one without sync features. Building on the sync APIs today means building on a surface MongoDB has announced it is winding down. A second case is a server-side Node.js service with concurrent writers across processes. Realm is described as running inside the device or process, and the README's framing is mobile, edge, web and IoT apps rather than a shared server datastore. A third case is a team that needs a query language and tooling shared with a relational backend. Realm's queries are code, not SQL, so a team already fluent in SQL and its ecosystem gains little from the translation layer. None of these are defects; they are boundaries the README draws implicitly by describing what the SDK is for.

## SQLite, WatermelonDB and the difference in approach

The README positions Realm as "an alternative to SQLite & key-value stores". The concrete difference is the object layer. With SQLite in React Native you typically add a wrapper such as WatermelonDB or a hand-written DAO, and reactivity is something you build: observe a table, invalidate a cache, re-render. Realm puts the object graph and the change notification inside the database, so a query result is itself the subscription. That saves the mapping code, and it is also the lock-in: your models are Realm classes, and moving off means rewriting the persistence layer rather than swapping a driver. SQLite's advantage is the opposite one. It is a file format with decades of tooling, and a SQLite file can be opened by anything. If you expect to hand your data to an analytics pipeline or another language's runtime, that portability is worth more than live queries.

## Licence, maintenance and the cost of upgrading

The root package.json declares the licence as apache-2.0, and the repository carries a LICENSE file. Apache-2.0 permits commercial use and modification, and it includes a patent grant; it does not, on its own, guarantee that MongoDB will keep publishing the sync backend, which is a service question rather than a licence question. On maintenance, the last push to the default branch was on 2026-09-17, so the repository is receiving commits. The release list shows Realm JavaScript v20.2.0 and v12.15.0 both dated 2025-08-11, and Realm React v0.20.0 dated 2025-10-17, which tells you the React wrapper and the core SDK version independently. That split is the upgrade cost: a React Native app pins realm, @realm/react, and its React Native version together, and COMPATIBILITY.md is the only place the repository documents which combinations are supported. None of this is legal advice; read LICENSE and the deprecation pages before committing to a long-lived product.

## Conclusion

Realm JS still fits local-first apps that want objects and live queries instead of an ORM, but anyone who needs Atlas Device Sync should not start here: MongoDB's own README points to the community npm version or the community git branch. Before adopting, check COMPATIBILITY.md against your React Native version and confirm which package you are actually installing, because the default realm package and the community build do not carry the same features.

## FAQ

### Is Realm DB deprecated?

MongoDB announced the deprecation of Atlas Device Sync and the Realm SDKs in September 2024, and the repository README links to MongoDB's deprecation pages. The README also points to a community version on npm and a community git branch for a RealmJS without sync features. The realm-js repository itself is not archived and the last push was on 2026-09-17.

### What is Realm JS in software?

Realm JS is the JavaScript and TypeScript implementation of the Realm database, a mobile database that runs directly inside phones, tablets or wearables. It supports React Native with JSC and Hermes on iOS and Android, plus Node.js and Electron on Windows, macOS and Linux.

### How do I install Realm JS?

The README does not print an install command; it directs you to the Atlas Device SDK documentation for Node.js and React Native, and to the community version on npm for a build without sync. The repository package.json requires Node.js 20 or later and npm 10 or later, while the README's getting-started text says Node.js 18 or later.

### Can I use Realm JS with React Native?

Yes. The README states support for React Native with JSC and Hermes on iOS and Android, and recommends @realm/react for hooks-based integration. It also points to Expo and React Native template apps under templates/ and to COMPATIBILITY.md for the supported version combinations.

### Why does Realm JS not work with the Chrome debugger?

The known-issues section states that Realm is not compatible with the legacy Chrome Debugger. The README recommends the Hermes Debugger instead, and notes that Safari developer tools work with extra setup but only on iOS, and that you should not enable "Debug with Chrome" in the debug menu for either.

## Sources

- [License: Apache-2.0](https://github.com/realm/realm-js/blob/main/LICENSE)
- [Project website](https://realm.io)
- [README](https://github.com/realm/realm-js/blob/main/README.md)
- [realm/realm-js on GitHub](https://github.com/realm/realm-js)
- [Releases](https://github.com/realm/realm-js/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/realm-realm-js
