Powerful Schemas
Defaults, identity keys, indexes, computed properties, transforms, and property mapping. Bring your own validation with Zod or AJV.
Schema guide
A fast, front-end-first data toolkit with schemas, live queries, optimistic mutations, and swappable storage plugins. No lock-in, no rewrite.
npm install @routier/core @routier/datastore @routier/memory-pluginLive demo
useQuery call sorts, pages, and subscribes, so the page stays current with no cache to invalidate and no refetch to wire up. Try restocking a row, turning on traffic, or switching frameworks: both read the same store. Then open the Routier button in the bottom-right corner: devtools shows this store's rows and every query the grid runs. import { useState } from "react";import { useQuery } from "@routier/react";import { store, type Product } from "./inventory";export function ProductGrid() { const [page, setPage] = useState(1); const [pageSize, setPageSize] = useState(6); const rows = useQuery<Product[]>( onResult => store.products .sort(p => p.name) .skip((page - 1) * pageSize) .take(pageSize) .subscribe() .toArray(onResult), [page, pageSize], );New · Devtools
@routier/devtools adds a drawer to your page that shows what your store holds and how every query runs. One line to set up, in React, Vue, or plain JavaScript, and stripped from production builds. It is running on this page now: click the Routier button in the bottom-right corner. mountRoutierDevtools(store);
Every collection and view with a live row count, a paged table of rows, and the full value of any row. It updates as saves, syncs, and other tabs change the data.

The Queries tab records each query your app runs and shows its plan: the SQL or other statement it sent, its parameters, and anything that ran in memory, and why.
What you get
Swappable storage
import { MemoryPlugin } from "@routier/memory-plugin";class InventoryStore extends DataStore { products = this.collection(productSchema).proxy().create(); constructor() { super(new MemoryPlugin("inventory")); }}Why Routier
Keep your existing datastore. Add structure with schemas and defaults, speed with indexes and caching, and better ergonomics with live queries and optimistic updates.
Move from IndexedDB to SQLite or adopt OPFS by changing the plugin. Your app code remains unchanged.
Use Zod or AJV for validation. Routier handles transformation and persistence.
Designed for the browser and local-first workflows, while remaining adaptable to backend runtimes.
Next steps
Install the packages, define a schema, and run your first live query.
Quick StartRun and edit real examples in your browser.
PlaygroundSee where Routier helps and where it does not.
Why Routier?Schemas, collections, queries, and change tracking.
ConceptsHooks that keep components in sync with your data.
React integrationLocal-first apps, syncing, history tracking, and more.
Guidesnpm install @routier/core @routier/datastore @routier/memory-plugin