Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Pulse Wall: I Let Sanity Run My Repost Marketplace's Content

Description and use

The author replaced a complex backend with Sanity, enabling live content updates without redeploys using Next.js and Render.

Problem

Repost marketplace needed a content layer that could be edited without redeploying the site, but the existing backend was too complex to replicate.

Outcome

The author successfully replaced a complex backend with a Sanity content layer, enabling live content updates without redeploys and simplifying the deployment pipeline.

Workflow

  • 1. Point Claude Code at the existing Pulse repo and instruct it to reuse the Next.js UI.
  • 2. Strip out backend‑coupled code (auth, wallet, Paystack, Go API).
  • 3. Define two Sanity schemas: campaign (with vibeScore) and spotlight.
  • 4. Embed Sanity Studio into the Next.js app at /studio using next‑sanity.
  • 5. Add CORS origins (localhost and Render URL) with credentials allowed to resolve Studio load errors.
  • 6. Move export const dynamic = "force-dynamic" into page.tsx to enable runtime revalidation of Sanity data.
  • 7. Deploy the single app to Render using a render.yaml blueprint.
  • 8. Add a GitHub Actions workflow to ping the free‑tier instance every 5 minutes to keep it awake.

Evidence

After publishing new campaigns in Studio, they weren't showing up on the live site. Turned out Next.js route segment config (revalidate/dynamic) only takes effect in page.tsx/layout.tsx files, not in an arbitrary component I'd put it in.

Source

CORS. Sanity blocks Studio API calls from origins it doesn't recognize, so both localhost and the deployed Render URL had to be explicitly added as CORS origins with credentials allowed before Studio would even load.

Source

  • Record date: 2026-09-21T21:30:28.115Z