Storion

Framework-agnostic client-side database for the browser. Use it with React, Vue, Angular, Svelte, or vanilla JS.

Create databases, tables, save and fetch records, and run JSON queries on localStorage, sessionStorage, or IndexedDB.

npm install @storion/storion

Features

Framework-agnostic

Works with any frontend; no framework-specific code.

Multiple stores

Use localStorage, sessionStorage, or indexedDB.

Tables & schema

Define tables with columns (int, float, boolean, string, json) and optional foreign keys.

CRUD + queries

Insert, fetch, update, delete; run JSON queries with where, orderBy, limit, offset.

Config from file/URL

Create a database from a config object or load config from a URL or file.

Change subscription

Subscribe to table or row changes so components stay in sync without polling.

Cross-context

Optional broadcaster + listener for extensions, background scripts, or multiple tabs.

Quick example

import { createDatabase } from '@storion/storion';

const db = await createDatabase({
  name: 'myapp',
  storage: 'localStorage'
});

await db.createTable('users', [
  { name: 'id', type: 'int' },
  { name: 'email', type: 'string' },
  { name: 'name', type: 'string' },
  { name: 'active', type: 'boolean' }
]);

await db.insert('users', { email: 'alice@example.com', name: 'Alice', active: true });
const { rows, totalCount } = await db.query('users', {
  where: { field: 'active', op: 'eq', value: true },
  orderBy: [{ field: 'name', direction: 'asc' }],
  limit: 20,
  offset: 0
});

Documentation

Links

ResourceURL
GitHubgithub.com/storionjs/storion
npmnpmjs.com/package/@storion/storion
IssuesGitHub Issues
LicenseMIT