How nayun1/reevely works
Reevely is a YouTube-channel comment monitoring and review service, with AI risk analysis, evidence archiving, notifications, and paid plans. Its scheduled comment job syncs channels and analyzes pending comments; users then review and manage findings in channel workspaces. Billing handles initial checkout and recurring charges separately. The tree documents admin and account areas, but most page implementations were not sampled, so their detailed wiring is not inferred. Edges below are limited to sampled calls or SOURCE INDEX import references.
Main entry points: route.ts Scheduled jobs · channels.ts Channel queries · schema.ts Application data model · subscriptions.ts Plan and subscription queries
Components 26
Collection and analysis
- YouTube comment sync
src/lib/youtube/sync-comments.ts - Pending comment analysis
src/lib/ai/analyze-pending-comments.ts - Comment risk analysis
src/lib/ai/analyze-comment.ts
Channel workspace
- Review queue
src/components/comments/review-queue-list.tsx - Review status action
src/components/comments/status-action-button.tsx - Risk indicator
src/components/dashboard/risk-badge.tsx - Author comment feed
src/components/authors/author-comment-feed.tsx - Comment actions API
src/app/api/comments/bulk-status/route.ts - Notification records
src/lib/db/queries/notifications.ts - Channel workspace pages
src/app/(app)/c/[channelId]
Accounts and billing
- YouTube channel linking
src/lib/youtube/connect-channel.ts - OAuth token exchange
src/lib/youtube/exchange-auth-code.ts - Subscription checkout
src/app/billing/success/route.ts - Recurring billing job
src/app/api/cron/process-billing/route.ts - Toss billing client
src/lib/billing/toss-client.ts - Plan and subscription queries
src/lib/db/queries/subscriptions.ts - Account and plan pages
src/app/(app)/mypage
Operations and administration
- Scheduled jobs
src/app/api/cron/process-comments/route.ts - Cron run records
src/lib/db/queries/cron-runs.ts - Admin dashboard
src/app/admin/(dashboard)
Persistence
- Channel queries
src/lib/db/queries/channels.ts - Comment queries
src/lib/db/queries/comments.ts - Application data model
src/lib/db/schema.ts
Other components
- Channel owner
- YouTube API
- Toss Payments
Connections 29
- Scheduled jobs → Channel queries: loads channels
src/app/api/cron/process-comments/route.ts - Scheduled jobs → Plan and subscription queries: checks plan interval
src/app/api/cron/process-comments/route.ts - Scheduled jobs → YouTube comment sync: syncs comments
src/app/api/cron/process-comments/route.ts - YouTube comment sync → YouTube API: fetches comments
- Scheduled jobs → Pending comment analysis: analyzes pending
src/app/api/cron/process-comments/route.ts - Scheduled jobs → Cron run records: records run
src/app/api/cron/process-comments/route.ts - Scheduled jobs → Notification records: sends alerts
src/app/api/cron/process-comments/route.ts - Pending comment analysis → Comment risk analysis: analyzes comments
src/lib/ai/analyze-pending-comments.ts - Review queue → Review status action: renders actions
src/components/comments/review-queue-list.tsx - Review queue → Risk indicator: renders risk
src/components/comments/review-queue-list.tsx - Author comment feed → Comment queries: loads feed data
src/components/authors/author-comment-feed.tsx - Comment actions API → Channel queries: checks channel
src/app/api/comments/bulk-status/route.ts - Comment actions API → Comment queries: updates statuses
src/app/api/comments/bulk-status/route.ts - Channel owner → Channel workspace pages: uses workspace
- Channel owner → Account and plan pages: manages account
- Channel owner → Admin dashboard: administers service
- OAuth token exchange → YouTube API: exchanges code
- Subscription checkout → Toss billing client: issues key, charges
src/app/billing/success/route.ts - Subscription checkout → Plan and subscription queries: creates subscription
src/app/billing/success/route.ts - Subscription checkout → Channel queries: reconciles locks
src/app/billing/success/route.ts - Recurring billing job → Toss billing client: charges renewal
src/app/api/cron/process-billing/route.ts - Recurring billing job → Plan and subscription queries: updates billing state
src/app/api/cron/process-billing/route.ts - Recurring billing job → Channel queries: reconciles locks
src/app/api/cron/process-billing/route.ts - Toss billing client → Toss Payments: calls billing API
src/lib/billing/toss-client.ts - Channel queries → Application data model: queries tables
src/lib/db/queries/channels.ts - Comment queries → Application data model: queries tables
src/lib/db/queries/comments.ts - Plan and subscription queries → Application data model: queries tables
src/lib/db/queries/subscriptions.ts - Notification records → Application data model: queries tables
src/lib/db/queries/notifications.ts - Cron run records → Application data model: queries tables
src/lib/db/queries/cron-runs.ts