Deterministic JSON delivery across static, SSR, and edge preview targets
Consume allowlisted Dual-JSON payloads and compiled CSS variables from cms.sectionblocks.com with zero proprietary SDK lock-in.
Simple HTTP contracts for any JS runtime
Built cleanly over standard REST JSON responses hosted at https://cms.sectionblocks.com/api/public. Cache indefinitely against immutable snapshots or serve real-time drafts to authenticated editors.
Discover public projects, or pass ?scope=user with auth cookies/token for member-scoped previews.
Return full sitemap, pages, Dual-JSON section payloads, schemas, records, and List Views.
Compiled Tailwind v4 stylesheet & OKLCH custom property theme variables for the project.
Purge in-memory SWR cache + Netlify durable cache tags upon publish events from the CMS.
// Fetch deterministic published content or live draftsconst res = await fetch( "https://cms.sectionblocks.com/api/public/projects/marketing-site?mode=snapshot", { headers: { Accept: "application/json", // Optional bearer/cookie when listing private workspaces via ?scope=user }, });
const payload = await res.json();// -> { project, themeCssUrl, sitemap, pages, sectionsByKey, listViews, records }// Instant cache invalidation for Mode 4 (Live SWR SSR on Netlify)POST https://your-site.netlify.app/api/revalidatex-sb-webhook-secret: $SB_REVALIDATE_SECRETContent-Type: application/json
{ "projectRef": "marketing-site", "mode": "snapshot", "paths": ["/", "/pricing"]}4 Deploy Modes & Netlify Configuration
Pick the exact tradeoff between build-time determinism and editorial immediacy using a single environment flag.
[build] command = "VITE_DEPLOY_MODE=ssr-live npm run build" publish = "build/client"
[build.environment] VITE_CMS_BASE_URL = "https://cms.sectionblocks.com" VITE_CMS_PROJECT_REF = "marketing-site"
# Edge CDN durable caching for Live SWR SSR responses[[headers]] for = "/*" [headers.values] Netlify-CDN-Cache-Control = "public, durable, max-age=60, stale-while-revalidate=600"Custom React & shadcn Component Overrides
Need an interactive calculator, custom motion carousel, or bespoke chart backed by a CMS Record List? Assign a componentName on any List View in the CMS and register your implementation on the frontend.
If a component name isn't matched in your app registry, the renderer gracefully falls back to the built-in shadcn Component Mode preset or Template JSON.
import { TeamMemberCardGrid } from "~/components/overrides/team-grid";import { FaqAccordion } from "~/components/overrides/faq-accordion";
export const LIST_VIEW_REGISTRY = { // Exact match to CMS "Custom frontend component name" TeamMemberCardGrid, "faq-accordion": FaqAccordion,};
// Renderer falls back automatically to built-in shadcn presets// or Template JSON if an override component name isn't registered.cms.sectionblocks.com
Ready to wire your React Router or Vite frontend?
Provision your project token at cms.sectionblocks.com and inspect the live JSON payload right in your browser.