Snabbsite · Docs
For developers
Site Kit SDK

Edit against your own machine

Point the Snabbsite editor at the app you are running locally, so text and variants change while you build.

You build a hemsida in your own Next.js app. Until now, seeing it inside the Snabbsite editor meant deploying a preview first. The editor can point at the app running on your own machine instead.

Nothing about this is stored on the website. It lives in your browser, on your computer, and your client's editor is unaffected.

What works today

  • The editor's canvas can frame a loopback address you choose: https://localhost:4443, https://127.0.0.1:4443, and the rest of the addresses that mean "this machine".
  • A Local project control sits in the editor's top bar for any site whose delivery is set to Hos er själva (headless). Type the address once and the browser remembers it.
  • Your draft is pushed into the frame with the same render message a deployed preview receives, so what your renderer gets locally is what it gets in production.
  • Clicking an editable field in your rendered site selects that section in the editor, using the same visual-editing protocol a deployed preview speaks.

What is planned

  • snabbsajt dev, the local agent: it terminates TLS with a locally trusted certificate, reports which projects are running so the editor can list them, and starts one that is stopped. Until it ships, type the address by hand.
  • Writing an edit back into your own project files, from this canvas. Today an edit made here is saved to the draft in Snabbsite, exactly as it is for a deployed preview. There is already a way to write straight into your files: see Edit without the dashboard, which skips this canvas entirely.
  • The <SnabbsiteVisualEditing> component that marks your fields, published from the SDK. The marking helpers sajtField and fieldRefFromEventTarget ship today.

Plan: docs/plans/doing/P1-2026-08-25-visual-editing-on-localhost.md.

The other way to work locally

This page is about pointing our editor at your machine. If you would rather not open our editor at all, you can edit text directly in your own app. Button variants and images use a small control beside the selected item. It writes your content files directly, with no login and no network: Edit without the dashboard.

Why the address has to be https

A browser refuses to put an http frame inside an https page, so on https://snabbsite.com a plain http://localhost:3000 can never load. Serve your dev server over https with a locally trusted certificate and it works.

The one exception is a Snabbsite app that is itself running on http, which is only our own development harness. There an http loopback address is accepted, because the page doing the framing is http too.

Why you cannot save a localhost address in settings

Settings → Utvecklare → Var hemsidan visas refuses a loopback address, on purpose. That field is read by your client's browser, where localhost is their computer. Saving one there would hand every client an empty canvas, or a frame pointing at whatever they happen to run on that port.

So the two are deliberately separate: the stored preview URL is a real address that works for everyone, and the machine-local one never leaves the browser that typed it.

What we still never do

We never execute your code. The frame keeps its own origin, we post the draft to that exact origin and never to *, and every message coming back is validated before the editor acts on it. That is the same contract a deployed preview has, and none of it is relaxed for a local address.


Didn't find the answer, or is something wrong here? Tell us.

On this page