This page explains how Nuxt Studio keeps your content synchronized between the browser (your production site) and your GitHub repository.
The self-hosted Nuxt Studio module uses a three-tier system for storage:
When the application loads in the browser, Nuxt Content v3 downloads a SQLite database dump from the server and initializes a local WASM database.
This local database contains all content from the content/ directory of your deployed branch.
Studio maintains a separate draft layer using unstorage, backed by IndexedDB.
When you edit content, your changes are stored as drafts in this layer.
Each time the Studio app loads, these drafts are merged with the SQLite database to render a drafted version of your production site.
When you publish, Studio commits your draft changes directly to your GitHub repository through the GitHub API.
Your CI/CD pipeline then rebuilds and redeploys your site automatically.
Nuxt Content downloads the SQLite database dump generated during the build process.
This file contains all parsed content from your content/ directory.
Studio checks IndexedDB for any existing drafts from previous sessions and loads them into the SQLite database.
Studio refreshes the site preview so you can view your latest drafts and edits directly on your production website.
When you modify content in Studio:
Changes are saved immediately in IndexedDB as draft items with a status of created, modified, or deleted.
The local SQLite database is updated to include your draft content, allowing instant visual preview.
Studio compares your draft content against the latest version on GitHub to detect possible conflicts.
Conflicts can occur when:
When you publish your edits:
Studio gathers all draft items that contain changes.
Using the GitHub API, Studio creates a new commit with all updated files.
Your CI/CD platform detects the commit and automatically rebuilds and redeploys your website.
After publication, Studio clears the local drafts and waits for the deployment to complete.
During this time, a loading state is shown while the production SQLite database catches up with your latest commit.