How engrwardakhan-collab/youtube-ai-assistant-app works
The product is a human-in-the-loop YouTube comment assistant. Its main workflow fetches and deduplicates comments, triages them, drafts replies, saves them for review, and publishes only after approval. The CLI orchestrator and review UI are distinct entry points into that workflow; OAuth/token handling and runtime metrics are supporting layers. Several links come from the README or SOURCE INDEX because the relevant implementation excerpts are incomplete; optional or unverified links are dashed.
Main entry points: main.py Fetch and draft run · webapp.py Review web UI · comment_fetcher.py Comment fetcher · token_manager.py Token manager
Components 22
Comment workflow
- Fetch and draft run
main.py - Settings
app/config.py - Comment fetcher
app/youtube/comment_fetcher.py - YouTube client
app/youtube/youtube_client.py - Fetch checkpoint
app/youtube/checkpoint_store.py - Replied-comment state
app/youtube/replied_store.py
YouTube access
- Token manager
app/auth/token_manager.py - Google OAuth client
app/auth/google_oauth_client.py - Token store
app/auth/token_store.py
Review and state
- Draft runtime files
main.py - Review web UI
app/review/webapp.py - Review stores
app/review/stores.py - Reply poster
app/youtube/reply_poster.py - Runtime metrics
app/review/metrics.py
AI processing
- Triage routing
app/ai/triage.py - Triage engine
app/ai/triage_engine.py - Batch drafter
app/ai/batch_drafter.py - OpenAI client
app/ai/openai_client.py
Other components
- Channel operator
- OpenAI API
- Google OAuth endpoint
- YouTube Data API
Connections 25
- Channel operator → Fetch and draft run: runs refresh
README.md - Channel operator → Review web UI: reviews drafts
README.md - Fetch and draft run → Settings: loads settings
main.py - Fetch and draft run → Token manager: gets token
main.py - Fetch and draft run → Comment fetcher: fetches comments
main.py - Fetch and draft run → Triage routing: triages comments
main.py - Fetch and draft run → Batch drafter: drafts replies
main.py - Fetch and draft run → Draft runtime files: writes drafts
main.py - Comment fetcher → YouTube client: requests threads
app/youtube/comment_fetcher.py - Comment fetcher → Fetch checkpoint: reads and saves
app/youtube/comment_fetcher.py - Comment fetcher → Replied-comment state: checks IDs
app/youtube/comment_fetcher.py - YouTube client → Token manager: gets token
app/youtube/youtube_client.py - YouTube client → YouTube Data API: requests data
app/youtube/youtube_client.py - Token manager → Token store: loads and saves
app/auth/token_manager.py - Token manager → Google OAuth client: refreshes token
app/auth/token_manager.py - Google OAuth client → Google OAuth endpoint: requests refresh
app/auth/google_oauth_client.py - Triage routing → Triage engine: delegates triage
app/ai/triage.py - Batch drafter → OpenAI client: requests completion
- OpenAI client → OpenAI API: sends prompts
app/ai/openai_client.py - Review web UI → Fetch and draft run: runs refresh
app/review/webapp.py - Review web UI → Review stores: reads and updates
app/review/webapp.py - Review web UI → Reply poster: posts approval
app/review/webapp.py - Reply poster → YouTube Data API: publishes reply
- Review web UI → Runtime metrics: records metrics
app/review/webapp.py - Review web UI → Draft runtime files: reviews drafts
app/review/webapp.py