---
title: "Save, preview, and publish"
description: "Understand local draft state, JSON persistence, Preview sessions, and the future production release flow."
canonical_url: "https://nyxel.dev/docs/publishing"
markdown_url: "https://nyxel.dev/docs/publishing.md"
---

# Save, preview, and publish
URL: /docs/publishing
LLM index: /llms.txt
Description: Understand local draft state, JSON persistence, Preview sessions, and the future production release flow.

# Save, preview, and publish

Nyxel separates editing a document from releasing a storefront change. The local repository implements draft editing, Save, and unsaved Preview sessions. Nyxel Connect contains a **Partial** production release implementation, but it has not been proven with a customer-owned provider installation.

## Local draft state

The editor loads header, page, footer, and theme JSON into separate Yjs documents. Actions update those documents immediately, Canvas renders the latest projection, and the dirty indicator compares the current state to the last saved state vector.

Undo and redo operate on user and agent actions. Loading, restoration, and system synchronization do not appear as author history.

## Save

Save validates the selected document boundary and writes ordinary JSON through the storefront development API. It does not persist Yjs binary updates. Reloading the editor reconstructs the same document tree from JSON.

Template files remain reviewable source artifacts, which makes local development compatible with normal version control and code review.

## Preview before Save

Preview sessions let the real Astro route render unsaved page, group, and theme snapshots. A short-lived token identifies the session, and same-origin links preserve it while the user navigates.

This is the surface for verifying route behavior and hydrated interaction. Canvas is intentionally non-interactive; Preview is where product forms, cart, filters, search, and locale behavior must work with the draft applied.

## Production publishing

A hosted release flow needs authenticated durable storage, environment ownership, deployment status, rollback, and an auditable relationship between a saved revision and the storefront build serving it. Those concerns do not belong in the local file API.

**Partial:** `@nyxel/connect` defines and tests the Project, Revision, and Release state machine. `apps/connect` adds Redis-backed records, Shopify OAuth and session verification, short-lived editor handoffs, server-only GitHub and Vercel clients, immutable Preview deployments, immediate promotion, and a scheduled-publish worker. The editor can create and monitor a review Release when it is launched with a Connect project capability.

The missing proof is significant. Provider access currently uses bootstrap server credentials rather than a complete customer-owned GitHub App and Vercel authorization flow. Webhook reconciliation, production rollback, operational hardening, and a live merchant release remain **Planned**. Until those are proven, the public editor demo saves an isolated draft but does not expose publishing controls.

The sequence stays explicit: save the documents, capture an immutable Revision in a review Release, inspect its Preview, then publish that Release now or on a schedule. Save and Publish are never synonyms.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
