BlinkDB Logo blinkDB

Overview

No matter if you’re using Redux, MobX, or just a simple JS Map() in your Frontend - These storage methods are not optimized for large-scale data, often buckling under the weight of having to handle a couple thousand objects at once. So, why not bring the queries, indices, convenience and raw speed of databases to the frontend?

blinkDB ⚡(0.031ms)
JS Map()(3.053ms)
lokijs(4.803ms)

retrieving all users named “Alice” or “Charlie” for an array of 100.000 items

blinkDB is a strongly optimized, blazingly fast database just for your frontend. It uses the same techniques & data structures as existing databases in order to speed up the retrieval of items, resulting in incredible performance, regardless if you’re working with 10.000 or 1.000.000 database entities.

First-class Typescript

No runtime assertion overhead.

  interface User { id: string; name: string; age: number; }
  interface Todo { uuid: string; description: string; }

  const db = createDB();
  const userTable = createTable<User>(db, "users")();
  const todoTable = createTable<Todo>(db, "todos")({
    primary: ["uid"] // '"uid"' is not assignable to 'keyof Todo'
  });
  // First 100 users named Alice with an age from 30 to 55
  const users = await many(userTable, {
    where: {
      name: 'Alice',
      age: { between: [30, 55] }
    },
    limit: {
      take: 100
    }
  });

Powerful queries

Filter, sort, and implement pagination directly within BlinkDB.

Observe changes

Keep your UI reactive by watching for changes on your database.

  // Either watch for changes on the whole table...
  await watch(userTable, users => {
    console.log('All users in the database:', users);
  });

  // ...or specify a filter
  await watch(userTable, { where: { age: { lt: 5 } } }, babies => {
    console.log('All babies in the database:', babies);
  });