Control
Keep boundaries explicit
State, rendering, messages, and routing remain separate packages with ordinary JavaScript contracts.
Framework-independent TypeScript packages for state, rendering, coordination, routing, and project generation.
Why White Label
Use the web platform directly, adopt only the primitives a feature needs, and keep meaningful HTML as the foundation instead of hiding the application behind a framework runtime.
Control
State, rendering, messages, and routing remain separate packages with ordinary JavaScript contracts.
Platform
Real links, native events, the DOM, History API, ES modules, Node.js, and TypeScript stay visible and usable.
Adoption
Use one package or compose the stack. Static content can stay static and server-rendered content can remain server-owned.
Architecture
Each package has a focused responsibility. Use one by itself or compose them when a feature needs the full flow.
URL → application intent.
Intent → decoupled events.
Events → observable state.
State → rendered output.
These are responsibilities, not mandatory layers. A feature that only needs state can use Model by itself.
Learn by doing
Each example teaches one concept, shows the smallest useful code, and gives you one obvious interaction to try.
Model
Store state, listen once, then update it synchronously.
const model = new Model({count: 0});
model.on('change', state => console.log(state.count));
model.update({count: 1});Open API indexTry it
View
Give View a model and a template. Model changes trigger rendering.
new View({
parentElement: mount,
model,
template: ({name}) => <p>Hello, {name}</p>
}).initialize();Open API indexTry it
Mediator
Subscribers react to named events without the publisher knowing who they are.
mediator.on('message', text => console.log(text));
mediator.emit('message', 'Hello');Open API indexTry it
Router
Define a route, then enhance real links instead of replacing them.
router.routes = {
'/products': () => showProducts()
};
router.initialize();Open API indexTry it
API reference
The homepage stays focused on learning the architecture. The API index is optimized for scanning public signatures and jumping directly into the authoritative package documentation.
Observable state
Object, array, and Map state with synchronous observation and optional runtime validation.
Rendering + lifecycle
Browser and server rendering, model binding, delegated events, JSX, ownership, and cleanup.
Application events
Synchronous typed application events without coupling publishers to subscribers.
URL → application intent
One route contract across progressively enhanced browser navigation and server dispatch.
Project creation
CLI and programmatic project creation with equivalent JSX and plain-TypeScript templates.
Get started
Start with a generated application, or install only the primitives your existing project needs.
npx generator-white-label create my-projectThe generator asks whether you want JSX. Both choices produce the same application behavior.
npm install white-label-model white-label-view
npm install white-label-mediator white-label-routerEvery runtime package works independently. Add another piece only when the feature needs its responsibility.