Turn a request into reviewable form suggestions — with a glass Spotlight interface or your own UI. Your schema sets the boundaries. Your user approves every change. Your provider keys stay on your server.
Try the live demo · Quickstart · API & protocol · Languages · Contribute
A good suggestion should feel like a starting point, not a surprise. Form Assist reads the fields you explicitly allow, returns a revision-bound change plan, and lets users compare current and suggested values before applying selected changes. It never saves, submits, publishes, pays or deletes on its own.
One engine works across different form schemas. Nothing in the core assumes an article editor, a CMS or a particular provider. The article form in the demo is one recipe, with a protected existing slug and publication state.
A dark launch page with a cursor-responsive grid, a working editor, and the same Spotlight interface you can embed. Light mode and right-to-left layouts are included. These captures come from the running fixture demo.
![]() Review first — compare values and apply only selected fields. |
![]() Every screen — keyboard, reduced motion and mobile layouts. |
Open the live demo on GitHub Pages — no installation or API key required.
Try a sample prompt, review the proposed fields, apply selected suggestions, and undo your changes. The hosted demo uses localized fixture responses rather than live AI requests.
To run it locally:
git clone https://github.com/Sentroy-Co/form-assist.git
cd form-assist
npm ci
npm run demoOpen http://localhost:5173. The demo detects navigator.languages, loads the
matching catalog, and translates the page, editor, prompts, comparison and
status text. Use the language selector to override it or return to browser
language. Switching languages preserves your edits and active proposal.
Fixture mode: responses are fixed, localized examples. No API key or model request is involved. The launch screen labels this clearly. Provider credentials belong in your authenticated host server when you integrate the SDK.
Build portable static files with npm run build:demo; output is
artifacts/launch/, with relative assets suitable for a repository subpath.
npm run preview:demo serves that production output locally.
The Pages workflow publishes this static demo automatically on pushes to main;
it can also be run manually from GitHub Actions.
| Spotlight UI | Your own UI | |
|---|---|---|
| Interface | Explicitly registered Shadow DOM Web Components | Subscribe to the headless controller |
| Form state | Native, controlled React or React Hook Form binding | Any binding implementing read/write/subscribe |
| Approval | Field comparison and selected apply | Your own review and approval flow |
| CSS | Isolated glass/neon styles; dark/light themes | No prepared UI CSS required |
| Engine | The same schema validation and revision checks | The same schema validation and revision checks |
import { createAssistant, createHttpTransport } from '@sentroy-co/form-assist/browser';
import { registerFormAssist } from '@sentroy-co/form-assist/ui';
const assistant = createAssistant({
binding,
transport: createHttpTransport('/api/form-assist'),
connectionId: 'editor',
model: configuredModelId,
});
registerFormAssist(); // browser, after mount
const spotlight = document.querySelector('form-assist-spotlight');
spotlight.controller = assistant;
// No locale setting needed: the browser preference is used automatically.
// spotlight.locale = 'ja'; // optional explicit overrideThe npm package is not published yet. Build a local tarball with
npm run pack:local, then install
artifacts/sentroy-co-form-assist-0.1.0.tgz in your host project. The package
scope is provisional until ownership and a release license are settled.
The prepared UI and launch demo share complete UI and demo catalogs. Region and
script matching handles examples such as fr-CA, pt-BR, zh-HK, zh-Hant and
zh-Hans; unsupported preferences fall back to English. Arabic, Hebrew, Persian
and Urdu use right-to-left layout. Catalogs load on demand, so a visitor does not
have to download every translation up front.
See the language guide for the exact list, overrides, SSR behavior and contribution rules. Translations are machine-assisted; key coverage and behavior are tested, while native-speaker editorial review remains open.
| Entry | Responsibility |
|---|---|
core |
JSON Schema 2020-12, safe change plans, revision checks, selected apply and undo |
server |
Host authentication hooks, registered forms, connection/model allowlists and limits |
providers |
Explicit server-side OpenAI, Anthropic, Gemini, Workers AI and gateway transports |
browser |
Snapshot binding, cancellation and the headless controller |
ui / i18n |
Glass Spotlight, credential editor, themes and lazy language catalogs |
native / react / react-hook-form |
Form-specific setters and validation bindings |
server/node |
Tenant-scoped AES-256-GCM encrypted local credential storage |
| CLI | The same engine through JSON/NDJSON; real Rust and C# process clients |
Core has no DOM or provider SDK dependency. Browser builds reject server imports. Workers uses a separate portable graph; Node file storage stays Node-only.
npm ci
npm run build
npm run typecheck
npm test
npx playwright install chromium
npm run test:browser
npm run pack:local
npm run verify:packageValidation details record the actual checks and limits. The first vertical includes native forms, React, React Hook Form, Next.js and CLI clients. Other frameworks are marked planned in COMPATIBILITY.md. Live provider/model calls have not been verified; transport tests are not advertised as live interoperability. NDJSON exposes complete results and lifecycle events, not token streaming.
Quickstart · API · Server & credentials · Providers · Bindings · UI & themes · Languages · CLI · OpenAPI · Architecture
The code is UNLICENSED, pending an explicit license decision. A public source repository does not grant redistribution or commercial-use rights. The Sentroy name and logos remain Sentroy trademarks. No npm release or paid hosted service is created by this repository.


