Repository navigation
Release: videos CMS (collections, YouTube sync, review workflow) - #314
Merged
Merged
Conversation
…a clean editor Adds the `videos` and `videoTopics` collections for the /videos page. Nothing on the public site changes: the page itself ships separately and the CMS only becomes its data source when VIDEOS_SOURCE=cms is set on the web app. - Videos play inline on the listing, so there is no per-video page: no SEO block, permalink, or detail route. The slug stays but is hidden. - Editor: the video and its YouTube facts at the top, category (explainer or product demo), topics with one-click suggestions from the YouTube hashtags and inline "+ New", summary with a "use the first paragraph" helper, one video in the hero at a time. - List view: thumbnail, state chip (Needs review, Live, or a problem such as private on YouTube), category, topics and length. Dashboard card: Videos to review. - Hourly sync (task syncYoutubeVideos, gated by PAYLOAD_AUTO_RUN): imports new uploads as needs-review drafts. Uses the YouTube Data API when YOUTUBE_API_KEY is set (length, privacy, removed videos), otherwise the RSS feed. Optional category suggestion from two playlists. Never publishes anything. - Publish gate: a video needs a category, one topic and a summary. - Teams message "N new videos need review" (event video.needs-review) when a sync run imports new videos and an integration subscribes to it. - Migration 20261031_100000_add_videos, checked against Payload's own schema push on a database with every earlier migration applied in order. - Backfill script for the 14 videos on the current page (dry run by default), and the rollout steps in docs/operations/PRODUCTION-ROLLOUT.md (section 26).
feat(cms): videos library with a YouTube sync, review workflow and editor
jadhavgaurav
marked this pull request as ready for review
October 31, 2026 07:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this ships to production
Only the CMS half of the /videos work (merged to
developmentin #312, CI green). There are noapps/webchanges in this PR, so the website is unchanged. The page itself is in #313 and stays indevelopmentuntil it is approved.Merging this runs the CMS deploy workflow: the image is rebuilt and the migration
20261031_100000_add_videosruns on boot (additive: new tables and enum labels, nothing is altered or dropped).Before merging
YOUTUBE_API_KEY(read-only key restricted to YouTube Data API v3). The workflow renders it into the server.env. Without it the sync uses the RSS feed, which has no video length and cannot see removed videos, and YouTube's feed endpoint returned 404 in testing.YOUTUBE_EXPLAINER_PLAYLIST_IDandYOUTUBE_DEMO_PLAYLIST_ID(pre-fill the category of new uploads)./api/health, then open Content, Videos in the admin.What happens after it deploys
syncYoutubeVideos(runs only wherePAYLOAD_AUTO_RUN=true) imports the channel's recent uploads as drafts marked Needs review. It never publishes anything. Expect about 14 drafts and a "Videos to review" card on the dashboard.WEBHOOK_TEAMS_URLis set withoutWEBHOOK_TEAMS_EVENTS, that Teams channel gets one "N new videos need review" message. An integration row subscribed tovideo.needs-reviewgets it too.VIDEOS_SOURCE=cms(rollout doc, section 26).Rollback
Revert this PR and redeploy. The tables stay but are unused.
Checks
CI green on #312 (CMS lint, typecheck, tests, types drift, build). Migration verified against Payload's own schema push with all earlier migrations applied in order. Playlist and Teams behaviour is covered by mocked tests only; no real YouTube or Teams call has been made.