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();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.
Our story
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 · #andmarrudaAt a glance
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.
Use cases
A few ideas to get you started. Every snippet below is real SorlaDB code.
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();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();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;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 changeBind 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)
});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' } });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 collectionModel 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
Install it with npm, or drop a single script tag into any page. TypeScript types are included.
npm install sorla-db
import sorla from 'sorla-db';<!-- 54 kB, registers window.sorla -->
<script src="https://cdn.jsdelivr.net/npm/sorla-db@1/dist/sorla.min.js"></script>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 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.
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
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.
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().
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.
The browser build is 54 kB with no dependencies, and the framework bindings are separate entry points, so you only ship what you use.
Yes. SorlaDB is open source under the MIT license, and the code lives on GitHub at github.com/sysborg/sorla-db. Contributions are welcome.
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.
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.
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.
Founder
Company