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.
Routier is a fast, front-end-first data toolkit that augments any datastore with schemas, collections, live queries, optimistic mutations, replication, caching, and more, without locking you into a specific ORM or backend.
Modern apps inevitably build a data abstraction layer: defaults, business rules, computed fields, and adapters for whatever datastore you start with. That works until you hit performance ceilings, need local-first, or want to adopt a different storage primitive. Routier gives you a datastore-agnostic layer you control: keep your domain model and data API intact, and swap the storage plugin beneath it.
Try it live
Open the live playground to use the demo immediately, or view and edit its source in CodeSandbox.
import { DataStore } from "@routier/datastore";
import { s } from "@routier/core/schema";
import { MemoryPlugin } from "@routier/memory-plugin";
const userSchema = s
.define("users", {
id: s.string().key().identity(),
email: s.string().distinct(),
name: s.string(),
createdAt: s.date().default(() => new Date()),
})
.compile();
class Ctx extends DataStore {
users = this.collection(userSchema).proxy().create();
constructor() {
super(new MemoryPlugin("app"));
}
}
const ctx = new Ctx();
await ctx.users.addAsync({ name: "Ada", email: "[email protected]" });
await ctx.saveChangesAsync();| I want to⦠| Start here |
|---|---|
| Install and build my first app | Installation β Quick Start |
| Decide whether Routier fits | Why Routier? |
| Understand the core ideas | Concepts |
| Use Routier with React | React Integration |
| Explore real patterns | Guides |