Skip to content

Refactor dashboard around source-aware YouTube channels#8

Merged
mhaadiabu merged 3 commits into
mainfrom
feature/youtube-two-track-model
Mar 14, 2026
Merged

Refactor dashboard around source-aware YouTube channels#8
mhaadiabu merged 3 commits into
mainfrom
feature/youtube-two-track-model

Conversation

@mhaadiabu

@mhaadiabu mhaadiabu commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • split the Convex model so public channel data, manual financial inputs, OAuth connections, analytics syncs, and tax estimates have distinct sources
  • reshape the dashboard, channel lookup, reports, and channel management flows around public imports versus optional connected analytics
  • tighten product copy so the UI consistently presents a YouTube-only workflow with explicit source boundaries

Notes

  • local edits in `PLAN.md` and `README.md` are intentionally left out of this PR
  • I did not run dev/build scripts, and Convex codegen still needs to be rerun locally before merge

Summary by CodeRabbit

Release Notes

New Features

  • YouTube account connection integration for authorized analytics access
  • Multi-source revenue tracking (public data, manual inputs, connected analytics)
  • Enhanced tax estimation and compliance monitoring for channels
  • Source-aware reporting system with compliance and readiness insights

Updates

  • Rebranded platform to YouTube Creator Tax Dashboard
  • Renamed "Influencers" to "Channels" throughout dashboard
  • Updated settings with connections management tab
  • Improved analytics dashboard with revenue source visibility

Bug Fixes

  • Fixed monthly revenue and tax calculation aggregation

@vercel

vercel Bot commented Mar 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
graitld Ready Ready Preview, Comment Mar 14, 2026 2:21pm

@coderabbitai

coderabbitai Bot commented Mar 14, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR restructures the application from an influencer-centric to a channel-centric architecture, introducing comprehensive schema tables for OAuth connections, analytics syncs, manual financials, and tax assessments. Updated backend APIs now derive metrics from channel summaries, while frontend components adapt terminology and data bindings to reflect the new channel-focused model.

Changes

Cohort / File(s) Summary
Database Schema & Channel Data Model
convex/schema.ts, convex/channelData.ts
Introduced new tables (channels, oauthConnections, analyticsSyncs, manualFinancials, taxEstimates, taxAssessments); added ChannelSummary type with comprehensive revenue/tax/compliance fields; exported utilities for loading and building enriched channel data from multiple sources.
Backend Analytics & Influencers APIs
convex/analytics.ts, convex/influencers.ts
Rewrote dashboard metrics endpoints to derive from channels instead of influencers; added getDashboardMetrics per-channel metrics, refactored getComplianceBreakdown and getTopInfluencers; implemented createChannel, updateChannel, upsertChannel, deleteChannel mutations with financial snapshot and tax estimate upserting; added channel-focused query getChannels as alias to getInfluencers.
Authentication & OAuth
convex/auth.ts
Added conditional Google OAuth provider configuration when GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are present, enabling YouTube analytics access.
Dashboard & Core Pages
src/app/(dashboard)/page.tsx, src/app/(dashboard)/analytics/page.tsx, src/app/(dashboard)/reports/page.tsx
Updated metric labels, data sources, and chart configurations to use channel data; replaced influencer-centric metrics with channel-centric ones (Tracked Channels, Estimated Tax Output, Action Required); refactored report types from influencer-list/revenue-analysis to channel-registry/source-readiness.
Channel Management & Lookup
src/app/(dashboard)/influencers/page.tsx, src/app/(dashboard)/channel-lookup/page.tsx
Converted influencers page to channels page with channel-centric form fields and mutations; updated channel lookup to use upsertChannel mutation; adjusted UI labels and descriptions to reflect manual/connected data sources.
Settings & UI Components
src/app/(dashboard)/settings/page.tsx, src/components/..., src/app/layout.tsx
Added Connections tab with Google OAuth flow integration; updated navigation labels and descriptions from influencer to channel terminology; introduced branding constants and product-wide formatting utilities.
Product Configuration & Utilities
src/lib/product.ts
New module exporting PRODUCT_NAME, PRODUCT_DESCRIPTION, currencyConfig, and formatting helpers (formatCurrency, formatCompactNumber, formatDate, formatRevenueSource, formatAnalyticsStatus) for consistent UI presentation.
Branding & Static Content
src/app/(auth)/sign-in/page.tsx, src/components/app-sidebar.tsx, src/components/command-search.tsx, src/components/dashboard-header.tsx
Updated branding from influencer-focused to YouTube creator focus; renamed sidebar/navigation items; adjusted page descriptions and metric labels across authentication and dashboard interfaces.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • PR #6: Modifies analytics endpoint (getTopInfluencers) and channel-lookup import flow, directly touching the same code paths restructured in this PR.
  • PR #5: Implements YouTube channel lookup utilities and API routes that are integrated into the channel-centric model and upsert workflows in this PR.

Poem

🐰 Hoppity-hop, the channels now shine,
No more influencers—just data so fine!
From YouTube to taxes, analytics flow,
A rabbit's delight watching tax databases grow! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Refactor dashboard around source-aware YouTube channels' is clear, concise, and directly summarizes the main change: restructuring the system to be YouTube-focused with explicit source tracking (public imports vs. connected analytics).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/youtube-two-track-model
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

@mhaadiabu mhaadiabu merged commit cf5c191 into main Mar 14, 2026
3 of 4 checks passed
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