Frontend ORM
Model and AsyncModel classes that mirror your API resources, with .save() / .delete() / relations — the same mental model as a backend ORM.
Typed models, HTTP-backed stores, and a model-store registry inspired by Ember Data.
pnpm add @ofrusch/kita
# or: npm install @ofrusch/kita / yarn add @ofrusch/kitaPeer dependency: vue@^3.0.0.
SPA only
kita targets client-side single-page apps. SSR and multi-app support are out of scope for 0.x (the model-store registry is a module-level singleton). If you need SSR today, reach for Pinia. See Architecture → singleton registry.
import { AsyncModel, AsyncStore, registerModel } from "@ofrusch/kita";
class UserModel extends AsyncModel {
static readonly id = "users";
static { registerModel(this); }
declare email: string;
declare name: string;
}
class UserStore extends AsyncStore<UserModel> {
static readonly id = "users";
}
// GET /users/u-1/ → a fully-typed UserModel instance
const user = await appStore.users.findRecord("u-1");
user.email = "new@example.com";
await user.save(); // PUT /users/u-1/Continue with the getting-started guide.