positronic

Foundations

The sure stack

Sure is the platform every positronic product is assembled from — small, dependency-light TypeScript libraries sharing one philosophy: plain data in, plain output out, no lock-in anywhere. All MIT-licensed. This very page is rendered by it.

Properties

Stop gluing together parts that were never designed to meet.

The usual approach is a form library, a state manager, a theme, an LLM SDK and a test harness that do not share conventions. Sure is a family built to compose instead — so an application can grow from a schema-generated form to a full agent product without swapping its foundations.

Plain data, no magic

Every module takes plain objects and returns plain output. You can log it, diff it, replay it, and hand it to an agent. No ORM tricks, no hidden reactivity.

Swappable by design

Themes are CSS strings. Providers are environment variables. State stores expose an inspector. Changing your mind costs an import, not a rewrite.

Generated, not hand-written

sure-factor turns a database schema into validated, sanitized, internationalized UI — so the boring half of an interface is derived rather than typed.

Accessible by default

Focus rings, contrast, semantic colour roles and keyboard support ship inside the themes, not bolted on after a compliance audit. Every theme's text, link and border contrast is asserted in CI — and two vision themes run at WCAG-AAA with 125% type.

Testable end to end

sure-web-testing gives an agent a persistent browser session behind MCP, so behaviour is verified in a real browser rather than a mocked DOM.

Dogfooded continuously

This site, the examples and the agent surfaces all run on these packages. Every improvement lands upstream and reaches the whole ecosystem.

Live demo

Switch the theme — this very page

sure-ui ships seven themes as plain CSS strings: no bundler, no build step, no framework. Two of them are vision themes for low-vision readers — identical WCAG-AAA palettes at 125% type, one on a Verdana-first system stack, one on vendored Atkinson Hyperlegible — so you can compare the fonts directly. Every theme carries the same mobile layer too: small-screen layout at 640px, 44px targets under a coarse pointer, and hover-only controls revealed on touch. This site already renders itself with positronic, the default. Pick a theme below (or use the gear in the header) — every page follows, and your choice persists between visits; auto is the default and tracks your system light/dark setting live. That is the whole integration: an app imports a string.

Active theme: positronic · auto shows the theme it maps to · one attribute on <html>, one variable block, zero requests.

Packages

Six libraries, one convention

@shing.wong/sure-factor

v0.5.0 · MIT

@shing.wong/sure-ui

v0.3.0 · MIT

@shing.wong/sure-state

v0.1.8 · MIT

@shing.wong/sure-gentic

v0.1.2 · MIT

sure-web-testing

vunreleased · null

sure-examples

vunreleased · null

The anchor

sure-factor: schema to interface

Point it at a SQL schema and it introspects the columns, matches each to a typed component, and generates the interface at one of three quality tiers — vibe, prototype and production. A built-in type catalog (email, phone, ZIP, ICD-10, SSN, credit card and more) carries its own validation, input and output sanitization pipelines, and translations.

That means the parts of an application nobody enjoys building — forms, validation, sanitization, i18n — become derived artefacts you can regenerate whenever the schema changes. As of 0.5.0 the component catalog reaches past forms into mail and account surfaces (account settings, mail search filter, message actions, session list), so the same generator covers a signed-in client and not just a form.

sure-factor on npm

How it fits together

A schema reaches sure-factor, which generates the interface. sure-ui paints it with a runtime theme (seven palettes, two at WCAG-AAA) and supplies the notification and mail component layer. sure-state keeps the server authoritative and records every transition, with zero runtime dependencies. sure-gentic provides the agent that reasons over it, and sure-web-testing drives a real browser to prove it works.

Swap any one of them without touching the others.

Questions

Using the stack

Do I have to use all of it?

No. Each package stands alone with minimal dependencies. Take sure-ui for theming and leave the rest, or adopt sure-state without the generator.

Is there a framework underneath?

No framework, no bundler, no virtual DOM. Components render through a factory with a pure render(state) function and delegated events, so output is plain HTML you can read.

Which license applies?

All @shing.wong/sure-* packages ship under the MIT License. That is deliberate — the foundations stay open even though the positronic engine is dual-licensed AGPL-3.0-or-later OR Commercial.

Where do I start?

The components example in sure-examples: write a database table, get a working validated form, with no hand-written HTML. From there, add sure-state for persistence and sure-gentic for an agent.

Build on foundations that do not fight you.