Skip to main content

The UI runtime for code you didn't write

A model can generate a BaseNative interface at inference time — no build step, and no escape hatch to arbitrary JavaScript. The expression evaluator never calls eval or new Function, and render() takes that generated template string and returns HTML on the spot.

Why this is different

A CSP-safe evaluator, a runtime template renderer, and a toolchain that lets the model check its own output before it ships.

Eval results: not yet published — the harness ships, the corpus is in progress.

How it works

Write standard HTML with template directives. BaseNative handles the rest — server-side or client-side.

Reactive counter in 6 lines

<button @click="incrementCount()">
  Clicked {{ count() }} times
</button>

<script type="module">
  import { signal, hydrate } from 'basenative';
  const count = signal(0);
  function incrementCount() { count.set(count() + 1); }
  hydrate(document.body, { count, incrementCount });
</script>

Server-rendered list with Express

// server.js
import { render } from 'basenative/server';

app.get('/', (req, res) => {
  const html = render(`
    <template @for="user of users">
      <li></li>
    </template>
  `, { users });
  res.send(html);
});

This is a supporting fact, not the argument — the CSP sandbox and runtime string rendering above are the reasons to use it.

Recent updates