Zero-dependency · TypeScript-first · Framework-free

The reactive toolkit for the modern web.

Alwatr is a nano-package ecosystem for building fast, production-grade applications — starring the Flux family: Signals, Actions, Directives, Bind, and Storage, wired together by one strict, unidirectional data cycle.

app.ts
import {createStateSignal, createComputedSignal, actionService} from '@alwatr/flux';

declare module '@alwatr/flux' {
  interface ActionRecord {
    ui_increment: void;
  }
}

const count = createStateSignal({name: 'count', initialValue: 0});
const doubled = createComputedSignal({
  name: 'doubled',
  deps: [count],
  get: () => count.get() * 2,
});

actionService.on('ui_increment', () => count.update((n) => n + 1));
actionService.setupDelegation();
< 15 KB
gzipped, the whole Flux bundle
0
runtime dependencies
O(1)
event delegation, any element count
100%
TypeScript, tree-shakeable ESM

The Flux Family

One architecture, five primitives.

Every Flux primitive plugs into the same cycle: View → Action → Controller → State → View. Learn one, and the rest read like dialects of the same language.

Read the architecture

Unidirectional Data Flow

Data flows down. Intent flows up. Always.

Views never mutate state directly — they dispatch a typed action. Controllers never touch the DOM — they write to signals. It's a strict, zero-coupling cycle that keeps every layer independently testable and replaceable.

ViewActionControllerStateView

The Kit

A whole ecosystem, not just a framework.

Flux and FSM are the headline acts, but they sit on top of ~35 independent, dependency-free nanolib primitives — and are joined by backend-side siblings for the rest of your stack.

Ship reactive UI without shipping a framework.

Install the kit, wire your first signal, and see the whole cycle click into place in a few minutes.