Add comprehensive YouTube feature documentation covering 9 collections,
12 custom API endpoints, 3 cron jobs, admin views, services, hooks,
and access control across CLAUDE.md, CLAUDE_REFERENCE.md, and
API_ANLEITUNG.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Script extracts types from payload-types.ts, updates the
payload-contracts repo, builds to verify, and optionally pushes.
Usage: ./scripts/update-contracts.sh [--push]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redis requires authentication but IORedis connections were not passing a
password, causing immediate NOAUTH failures and a PM2 crash-loop (1900+
restarts). Additionally, the PM2 config used `npx` as the script entry
which caused instability.
- Add REDIS_PASSWORD support to queue-service.ts and redis.ts
- Change PM2 script from npx wrapper to direct tsx CLI entry point
- Add explicit exec_mode: 'fork' to prevent cluster mode issues
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes Next.js build failure caused by .js extensions in relative
imports within VideoMetricsSyncService and ChannelMetricsSyncService.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the Content Calendar view at /admin/content-calendar and
integrates it into the YouTube Dashboards nav group.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GET endpoint returns FullCalendar-compatible events with schedule
conflict detection. PATCH endpoint supports drag & drop rescheduling
with published-video protection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Detect scheduling conflicts in the content calendar including same-day
longform collisions, weekly frequency limit violations, and weekend
scheduling warnings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a capacity calculator utility and API endpoint that computes
workload utilization for team members with YouTube roles.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract detailed subsystem documentation into docs/CLAUDE_REFERENCE.md.
CLAUDE.md is loaded into every AI conversation - reducing it by 73% saves
~38KB of context window tokens per session while keeping all essential info.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automatically transitions YouTube content status when conditions are met
(e.g., upload_scheduled -> published when videoId is present) and sends
notifications to assigned users.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add analytics helper functions (calculateComparison, calculateTrends,
calculateROI) and extend the analytics API route with three new tabs
for video metric comparison, trend analysis, and ROI calculation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements a service that uploads videos to YouTube via the Data API v3.
Resolves OAuth credentials from social-accounts, reads media files from
disk, and handles scheduled publishes by setting privacyStatus to private
with a publishAt timestamp. Includes 12 unit tests covering successful
uploads, scheduled publishing, credential/media validation, and API errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add YOUTUBE_UPLOAD to QUEUE_NAMES and create the job definition
with enqueue and status functions. Uses 2 retry attempts instead
of the default 3 since uploads are resource-intensive.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add getCommentReplies method to YouTubeClient for fetching reply threads
via the YouTube comments.list API. Modify CommentsSyncService to import
reply threads during sync, storing them as type 'reply' with
parentInteraction relationship in community-interactions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add two cron endpoints for automated YouTube metrics syncing:
- /api/cron/youtube-metrics-sync (every 6 hours): syncs video performance
metrics (views, likes, comments) for all active channels
- /api/cron/youtube-channel-sync (daily at 04:00 UTC): syncs channel-level
statistics (subscribers, total views, video count)
Both endpoints follow the established cron pattern with CRON_SECRET auth,
concurrent execution guards, HEAD monitoring, and structured logging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Syncs video performance metrics (views, likes, comments) from YouTube
API to YouTubeContent.performance fields. Supports batch processing
with 50-video API limit, credential validation, and per-batch error
handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Syncs channel-level statistics (subscribers, views, video count) from
YouTube Data API to YouTubeChannels.currentMetrics fields for all active
channels. Follows the same credential-loading pattern as existing sync
services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add batch video statistics retrieval method that fetches view counts,
like counts, and comment counts for up to 50 videos per request.
Includes unit tests covering normal operation, empty input, missing
statistics defaults, null API response, and error propagation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add youtube.upload and yt-analytics.readonly scopes to enable video
uploading and analytics data retrieval in the YouTube Operations Hub.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
POST /api/youtube/thumbnails/bulk (Super-Admin only)
Supports ?dryRun=true for preview. Downloads sequentially with 500ms delay.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds channelThumbnailUrl field to store YouTube API URL.
afterChange hook downloads image to Payload Media when branding.logo is empty.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark Meta comment sync as completed, add CI/CD pipeline to completed
section, update changelog with 14.02.2026 entries, renumber next steps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The manual sync button in Community Inbox was only syncing YouTube comments
via the legacy syncAllComments service. Now uses UnifiedSyncService to sync
all platforms (YouTube, Facebook, Instagram). Also adds comprehensive
Community Management documentation to CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
API returns 401 without auth, which proves it's alive. Only 5xx
indicates a real server failure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/api returns 404 in Payload CMS (no root handler). Use /api/users
which returns 401 (valid response, proves API is running).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extend admin component overrides to cover all Payload admin views
(no-html-link-for-pages, no-img-element off for admin panel)
- Rename useGeneratedReply to applyGeneratedReply (not a hook)
- Fix useRealtimeUpdates: resolve circular dependency with connectRef,
wrap ref assignments in useEffect for React 19 compiler compliance
- Fix MetaBaseClient: let -> const for single-assignment variable
ESLint now passes with 0 errors (68 warnings only).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The GitHub environment 'production' was causing startup_failure on all
workflow_dispatch runs (0 jobs started). Remove the environment reference
to unblock deployments. Can be re-added once the root cause is identified.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all version references from Payload 3.69.0 → 3.76.1 and Next.js
15.5.9 → 16.2.0-canary.41. Replace .env.example (MongoDB → PostgreSQL)
and README.md (generic template → project-specific). Remove obsolete
BUG_REPORT_CUSTOM_VIEWS.md. Add YouTube Analytics Dashboard to URLs and
February 2026 changelog entry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tsx was a transitive dependency that disappeared after the package
upgrade, causing queue-worker to crash on production.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace custom BEM classes and SCSS with Payload's native nav-group CSS
classes for Community and YouTube dashboard nav links. Removes emojis,
adds collapsible toggle with chevron, matches the native sidebar UX.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>