About SorlaDB

SorlaDB is an open-source document database that lives in memory, in the browser or in Node. You store plain JavaScript objects and work with them using the MongoDB language you may already know: find, $in, $regex, $set, bulkWrite. No server round-trip.

It isn't a database in the traditional sense. Nothing is installed and nothing runs on a server. Think of it as an engine for your data: a small, fast layer that turns the arrays in your app into collections you can query, update, validate and watch, and that keeps your React, Vue, Svelte or Angular components in sync as the data changes.

That opens a lot of doors: advanced data grids, comboboxes with smart filters, faceted catalogs, live dashboards, schema-validated forms, and screens that load 100 000 rows from your backend without freezing. All of it in 54 kB, with no dependencies.

SorlaDB orca holding code brackets

Our story

Why it's called Sorla

Every project starts with a reason. This one starts with a name.

Sorla is an acronym of my mother's name. She gave me life, taught me, and guided me toward the person I am today. When it was time to name the project I cared about most, no other name felt right.

My mother passed away from cancer. Watching someone you love face that disease changes the way you see everything: time feels shorter, and the people who shaped you feel more precious than ever.

To be honest, cancer is one of the saddest things in this world. It takes people too early, and it weighs on everyone who stands beside them. If I could choose, no one would ever have cancer again.

I can't make that choice. What I can do is keep her name working the way she always did: helping others. SorlaDB was created to honor her, and to carry forward what she taught me: build things that make other people's lives lighter. For me, that starts with giving the frontend more flexibility and better instruments, one release at a time.

Anderson ArrudaFounder of SorlaDB · #andmarruda

At a glance

What SorlaDB gives your frontend

Frontend developers rebuild the same data plumbing over and over: filter this list, sort that table, keep two components in sync, validate a form, load a big dataset without freezing the page. SorlaDB gives the frontend the instruments a backend has always had, so that work takes a few lines instead of a few hundred.

What it is
An in-memory document database for JavaScript, in the browser or in Node 18+. No server, no dependencies.
MongoDB queries
find, findOne and count with $and, $or, $nor, $not, $in, $nin, $regex, $exists, comparisons and dot paths. Cursors sort (with collation), skip, limit and project.
Safe writes
$set, $unset, $inc, $push, $pull, upserts, replaceOne and bulkWrite. Batches are all-or-nothing and you always get copies.
Reactive
Change events and live queries with watch(), plus bindings for React, Vue, Svelte and Angular, and RxJS observables.
Connected
Load 100 000+ rows in blocks over Server-Sent Events, or page and receive live changes over WebSocket.
Small and fast
54 kB, TypeScript types, MIT license. An _id index and copy-on-read keep 100 000 documents comfortable.

Use cases

What you can build with SorlaDB

A few ideas to get you started. Every snippet below is real SorlaDB code.

Advanced data grids

Filter, multi-column sort and paginate thousands of rows on the client, without a request per click.

products.find({ price: { $gte: 10, $lte: 50 } })
  .sort({ rating: -1, name: 1 })
  .skip(page * 25).limit(25)
  .toArray();

Comboboxes with smart filters

Case-insensitive search as the user types, sorted the way people read, accents included.

cities.find({ name: { $regex: '^' + term, $options: 'i' } })
  .sort({ name: 1 }, { collation: { locale: 'pt-BR', sensitivity: 'base' } })
  .limit(10).toArray();

Faceted search and catalogs

Combine categories, price ranges and availability for filter sidebars that answer instantly.

products.find({
  category: { $in: ['shoes', 'bags'] },
  $or: [{ onSale: true }, { stock: { $gt: 0 } }]
}).length;

Live UIs in any framework

A live query keeps components current: only the documents that changed re-render, in React, Vue, Svelte or Angular.

import { useQuery } from 'sorla-db/react';

const open = useQuery(db.tasks, { done: false },
  { sort: { due: 1 } });   // re-renders on change

Schema-validated forms

Bind an HTML form to a collection: typed values, per-field errors and accessible messages for free.

users.bindForm('#signup', {
  generate: true,
  onSuccess: ({ id }) => console.log('saved', id)
});

Shopping carts and app state

Keep quantities and line items consistent with atomic update operators instead of hand-written reducers.

cart.updateOne({ sku: 'A-42' },
  { $inc: { qty: 1 } }, { upsert: true });
cart.updateOne({ _id: id }, { $pull: { coupons: 'OLD10' } });

Big datasets from your backend

Stream 100 000+ rows in blocks with progress, then filter and sort them on the client without another round-trip.

const loading = db.orders.stream('/api/orders/stream', {
  onProgress: ({ loaded, total }) => bar.set(loaded / total)
});
await loading.done;   // then query it like any collection

Prototypes and tests

Model a real backend with schemas and fixtures before the API exists, and keep tests fast and deterministic.

sorla.db.createCollection('users', userSchema);
sorla.db.users.insertMany(fixtures);
expect(sorla.db.users.count({ role: 'admin' })).toBe(1);

Get started

Up and running in under a minute

Install it with npm, or drop a single script tag into any page. TypeScript types are included.

npm
npm install sorla-db

import sorla from 'sorla-db';
CDN
<!-- 54 kB, registers window.sorla -->
<script src="https://cdn.jsdelivr.net/npm/sorla-db@1/dist/sorla.min.js"></script>
First collection
const app = new sorla();
app.useDb('shop');
app.db.createCollection('products');

app.db.products.insertMany([
  { name: 'Coffee', price: 12.5, tags: ['hot'] },
  { name: 'Tea', price: 8, tags: ['hot', 'herbal'] },
  { name: 'Juice', price: 9.9, tags: ['cold'] }
]);

app.db.products.find({ price: { $lt: 10 } }).sort({ price: 1 }).toArray();
// [{ name: 'Tea', price: 8, … }, { name: 'Juice', price: 9.9, … }]

Who we are

Sysborg: the company behind SorlaDB

Sysborg is the software company founded by Anderson Arruda. We build SaaS products and open-source tools for people who want to get real work done without fighting their software.

Our products share one foundation: a single Sysborg Account. You sign in once and move between every Sysborg product with the same identity. Everything we build plugs into that foundation, so each new product feels familiar from the first click.

SorlaDB is part of that foundation too. It was born to power the next generation of Sysborg tools: data-rich interfaces that respond instantly because the data is already in the browser. We made it open source so every developer can build the same way.

One account, every product
Sign in once with a Sysborg Account and move between every Sysborg product. No new passwords, no separate sign-ups.
Small, focused products
Each product solves one problem and solves it well, so it stays fast to learn and easy to adopt.
Open source at the core
SorlaDB is MIT licensed. When a building block can help other developers, we share it.
Built to grow with you
Our products start simple for one person and scale to teams, on infrastructure designed for the long run.

More products are on the way, and several of them will run on SorlaDB. If you want to follow along, watch the repository on GitHub.

FAQ

Frequently asked questions

Is SorlaDB a database?

Not in the traditional sense. SorlaDB is a document database that lives in memory inside your app, in the browser or in Node: nothing to install on a server, no connection strings. It turns the data your app already has into collections you can query, update, validate and watch with the MongoDB language.

Does SorlaDB save my data?

Not by itself. Data lives in memory for as long as the page or process runs. SorlaDB is a fast working layer on top of your API, not a replacement for your backend database. To keep data, listen to change events and save it wherever you like (the docs have a localStorage recipe), or load it back from your server with stream() or connect().

Which frameworks does it work with?

Any of them, or none. SorlaDB is plain JavaScript and ships optional bindings: useQuery for React, Vue and Svelte stores, and Angular signals. It also runs in Node 18+. Install it from npm, or add one script tag that registers window.sorla. TypeScript declarations are included.

How big is it?

The browser build is 54 kB with no dependencies, and the framework bindings are separate entry points, so you only ship what you use.

Is SorlaDB free?

Yes. SorlaDB is open source under the MIT license, and the code lives on GitHub at github.com/sysborg/sorla-db. Contributions are welcome.

Who makes SorlaDB?

SorlaDB is made by Sysborg, the software company founded by Anderson Arruda. Sysborg builds SaaS products connected by a single Sysborg Account, and SorlaDB is part of the foundation for its upcoming tools.

What does the name Sorla mean?

Sorla is an acronym of the founder's mother's name. She passed away from cancer, and the project was created to honor her for giving him life and for guiding him to become who he is today.

Meet the Team

Built in the open

SorlaDB is developed by Sysborg. It began as an idea from our founder, #andmarruda, and it grows with every issue, pull request and suggestion from the community.

Want to help? Contribute on GitHub. Code, docs and ideas are all welcome.

#andmarruda

#andmarruda

Founder

Sysborg

Sysborg

Company