Skip to content

feat(sanity): YouTube transcripts intelligence and nightly production to dev sync - #696

Merged
codercatdev merged 1 commit into
devfrom
feat/sanity-youtube-transcripts-nightly-sync
Oct 8, 2026
Merged

codercatdev merged 1 commit into
devfrom
feat/sanity-youtube-transcripts-nightly-sync

Conversation

@codercatdev

Copy link
Copy Markdown
Contributor

Summary

  • Unified Transcript Reference: Added transcript reference field to content partial inherited by posts, podcasts, pages, lessons, and courses.
  • Transcript Schema: Created comprehensive transcript schema storing video title, YouTube ID/URL, channel details, ISO duration, seconds, description, tags, Wikipedia topic categories, timed-text cues, full text, summary, chapters, statistics, and fetch timestamps.
  • Sanity Function (sync-youtube-transcript): Listens for document publish/update events where youtube is present.
    • Restricted strictly to production dataset (context.clientOptions.dataset === 'production').
    • Requires YOUTUBE_API_KEY (throws explicit error if missing; no degraded fallbacks).
    • Fetches rich video metadata via YouTube Data API v3.
    • Fetches timed text cues using InnerTube client and parses cues, fullText, summary, and chapters.
    • Creates deterministic published document (transcript-yt-${youtubeId}).
    • Patches source document and guards against recursion loops.
  • Sanity Scheduled Function (sync-nightly-dataset): Native cron function running at 0 4 * * * that resets and clones production -> dev using Sanity's Enterprise Cloud Clone API.
  • Search & Query Intelligence: Updated semanticSearchQuery and textSearchFallbackQuery to index and score transcript summaries and full text. Updated contentFields to project transcript details.

Verification

  • pnpm --filter @codingcatdev/sanity typegen passed cleanly.
  • pnpm --filter @codingcatdev/sanity build succeeded.
  • pnpm --filter @codingcatdev/site typecheck passed (0 errors, 0 warnings across 148 files).
  • pnpm --filter @codingcatdev/site lint passed.
  • pnpm --filter @codingcatdev/site build succeeded.
  • node apps/site/tests/run-e2e.mjs passed all 156 test cases.

…ataset sync

- Add transcript document schema with cues, chapters, stats, and metadata
- Add transcript reference to content partial inherited by posts, podcasts, pages, lessons, and courses
- Implement sync-youtube-transcript Sanity function with YouTube Data API v3 and InnerTube caption fetching
- Restrict transcript sync execution to production dataset and enforce YOUTUBE_API_KEY
- Implement sync-nightly-dataset scheduled function copying production -> dev nightly at 04:00 UTC
- Update sanity.blueprint.ts registering both functions
- Update search and shared queries to index and project transcripts
@vercel

vercel Bot commented Oct 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
codingcat-dev Ignored Ignored Oct 8, 2026 3:50pm UTC

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

⚡ Cloudflare Worker Preview Ready!

Environment URL
PR Preview https://a4d4f00c-codingcatdev-dev.codingcatdev.workers.dev
Dev Custom Domain https://dev.codingcat.dev
  • Worker Version ID: a4d4f00c-c532-49c7-b33f-b74783cbab2e
  • Protection: Restricted to @codingcat.dev accounts via Cloudflare Zero Trust Access

@codercatdev
codercatdev merged commit bf3aa32 into dev Oct 8, 2026
4 checks passed
@codercatdev
codercatdev deleted the feat/sanity-youtube-transcripts-nightly-sync branch October 8, 2026 15:54
codercatdev added a commit that referenced this pull request Oct 8, 2026
…ataset sync (#696) (#697)

- Add transcript document schema with cues, chapters, stats, and metadata
- Add transcript reference to content partial inherited by posts, podcasts, pages, lessons, and courses
- Implement sync-youtube-transcript Sanity function with YouTube Data API v3 and InnerTube caption fetching
- Restrict transcript sync execution to production dataset and enforce YOUTUBE_API_KEY
- Implement sync-nightly-dataset scheduled function copying production -> dev nightly at 04:00 UTC
- Update sanity.blueprint.ts registering both functions
- Update search and shared queries to index and project transcripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant