A local-first, open-source visual editor for social graphics, carousels and video scenes, built so people and AI agents can edit the same structured design. Extracted from the editor I built inside Sociona.
It began as one feature of Sociona: a carousel and image editor on a Fabric.js canvas, with an engine plan written the same day. The plan fixed the big decisions early: Fabric is only a renderer, a versioned JSON document is the source of truth, and people, agents and workflows share one small command API.
breakthroughshared formatJul 2026
The document comes first
The document format moved into a shared package, so the web app, the backend and the agents all read and write the same thing. Anything the editor can do is a validated command, which is what later made agent edits safe.
versiongrowthAug 2026
More than a carousel
It kept growing: multi-page projects, seamless spreads, frames, image effects, layers and grouping, video scenes and a phone studio. A Canva-style editor was taking shape inside a social app.
breakthroughlive editsSep 2026
An agent beside the editor
The design agent works through the same commands as a person. An open editor shows it working and pulls each revision in as it lands, undoable like any other edit.
problemhost boundarySep 2026
Untangling it from Sociona
The editor knew too much about the product around it: accounts, billing, publishing. Everything outside the canvas had to go behind a small host interface, and the packages had to build and bundle on their own.
lessondecisionSep 2026
A product of its own
Somewhere along the way it stopped feeling like a feature. Plenty of people need a capable design canvas without the rest of a social platform, and developers are exploring what creative software looks like when humans and agents share a document. It would be more useful in public.
launchv0.1Sep 2026
Extracted as Stencil
On 17 Sep the reusable core came out as Stencil: a standalone Next.js app, the document and command packages, and the StudioHost contracts with a local IndexedDB implementation. MIT licensed.
The hosted version runs as a free studio on Sociona. Designs save on your device, a few exports are free, and one button hands a design over to publishing.
Design editors people know are hosted, account-based and closed, with AI added on the side. I wanted a capable canvas that works without an account or a backend, and whose document is something an agent can understand and safely change. It started as a feature of Sociona and I pulled the reusable core out so others could use it, embed it and extend it.
facts.txt
Problem
A good design canvas that agents can also operate
Audience
Creators, and developers building editor or agent tools
Origin
Extracted from the Sociona studio
Status
Open source (MIT), early
Demo
Free public studio, no sign-up
Timeline
Jul 2026 to now
04process
How I approached it
01
A document, not pixels
Pages and elements live in a typed, versioned document validated with Zod. Fabric.js draws and manipulates it, but it is a replaceable renderer, never the source of truth.
02
Every edit is a command
Moving, styling, grouping and deleting are validated commands with undo. A person and an agent use the same door, so agent edits land in the same history.
03
Keep the host outside
Storage, assets, the assistant, version history and publishing come in through a StudioHost boundary. The canvas does not know if it runs locally, in a hosted product or in a desktop shell.
04
Do the heavy work in the browser
Projects and fonts live in IndexedDB, video is encoded locally and background removal runs in a worker, so the standard editor needs no server and no key.
05
Stay a normal design tool
Agentic features extend direct manipulation instead of replacing it. The editor has to be good with no agent attached.
05shots
A look at the editor
text and typography
elements
canvas backgrounds
fonts
06how it is different
How it is different
Most design editors are hosted products: you sign in, your work lives on their servers, and any AI feature is bolted on to a format built for people. They are not made to be embedded or to be driven safely by someone else's agent.
Stencil starts from different assumptions:
Local-first. No account, no backend and no AI provider needed for the standard editor.
A document model designed for agents, with validated commands and a shared undo history.
Embeddable. Storage, assets, assistants, versions and publishing are host interfaces you can fill in.
Open source under the MIT licence, so it can be read, forked and extended.
07stack
What it runs on
Next.js 16 + React 19The app shell and editor UI
TypeScript + ZodThe document format and command protocol
Fabric.jsCanvas rendering, selection, transforms and cropping
IndexedDBLocal projects, assets and fonts
MediabunnyEncoding video projects in the browser
ONNX Runtime Web + Web WorkersOptional background removal off the UI thread
Tailwind + RadixStyling and accessible primitives
08challenges
What got in the way
the problem
The editor was tangled up with Sociona: accounts, billing and publishing.
so →
fix.md
Everything outside the canvas moved behind StudioHost interfaces, and the packages were made to build and bundle standalone, so the editor runs with nothing but a browser.
the problem
Using Fabric's own JSON as the project format would tie every agent to one library.
so →
fix.md
The product owns a versioned document. Fabric objects are built from it, and Fabric's interaction events are turned back into commands.
the problem
Background removal and video export are heavy and freeze an interface that shares a thread.
so →
fix.md
They run in Web Workers and with the browser's media APIs, and the decoder is released when a slide goes inactive.
the problem
Long carousels got slow to open and to flip through.
so →
fix.md
Slides are parked when they are off screen and mounted progressively, so only the visible ones cost anything.
the problem
A canvas UI that passes type checks and unit tests can still render wrong.
so →
fix.md
I kept a written list of what had not been seen in a browser, and clicking through it came first. Rendering parity tests are the next piece of work.
09results
What came out of it
160commits on the editorinside Sociona, Jul to Oct 2026
Stencil elements panel: templates, shapes, frames, graphics, stickers, photos
13up next
up next →
SocialLoop
2025–2026
closed source
Events · Realtime · Next.js
Event networking with games instead of icebreakers. Attendees join with a code or QR, then play bingo, scratch cards, social deck and pair matching that get them talking, while organizers run check-in, announcements, surveys and analytics. A web dashboard and an Expo guest app on a Convex backend.
say-hi.txt
Want something like Stencil?
Tell me what you're making and I'll tell you how I'd build it.