How noushad970/youtube-video-uploading-agent-from-drive works
This repository implements a web-managed agent that catalogs videos in a selected Google Drive folder and uploads them to YouTube, optionally generating metadata with Ollama. Users connect Google, configure the folder and upload settings, then trigger or schedule runs; the agent validates readiness, syncs and selects a video, downloads it, prepares metadata, uploads it, and records the outcome. The frontend also exposes video, upload-history, account, settings, and log views. Some route and service wiring is inferred only where the sampled agent or application source supports it; unsampled details are omitted.
Main entry points: agent_service.py Agent orchestrator · google_auth_service.py Google credentials · App.tsx Dashboard app · main.py FastAPI application
Components 20
Web dashboard
- Dashboard app
frontend/src/App.tsx - API client
frontend/src/services/api.ts - Dashboard pages
frontend/src/pages
Backend API
- FastAPI application
backend/app/main.py - API routes
backend/app/api - Google auth route
backend/app/api/auth.py
Upload workflow
- Agent orchestrator
backend/app/services/agent_service.py - Background scheduler
backend/app/services/scheduler_service.py - Drive catalog and download
backend/app/services/drive_service.py - Video handling
backend/app/services/video_service.py - Metadata generation
backend/app/services/ai_service.py - YouTube publishing
backend/app/services/youtube_service.py - Upload records
backend/app/services/upload_service.py
External services and state
- Google credentials
backend/app/services/google_auth_service.py - Data repository
backend/app/database/repository.py - Application database
backend/app/database/database.py - Google Drive
- YouTube
- Ollama
Other components
- Operator
Connections 22
- Operator → Dashboard app: uses
- Dashboard app → Dashboard pages: renders
- Dashboard app → API client: requests
- API client → FastAPI application: calls API
- FastAPI application → API routes: mounts
- API routes → Agent orchestrator: dispatches runs
- Google auth route → Google credentials: handles OAuth
- FastAPI application → Background scheduler: starts and stops
- Background scheduler → Agent orchestrator: triggers runs
- Agent orchestrator → Google credentials: checks credentials
- Agent orchestrator → Drive catalog and download: syncs and downloads
- Drive catalog and download → Google credentials: gets credentials
- Drive catalog and download → Google Drive: lists and downloads
- Agent orchestrator → Video handling: handles video
- Agent orchestrator → Metadata generation: generates metadata
- Metadata generation → Ollama: requests generation
- Agent orchestrator → YouTube publishing: uploads video
- YouTube publishing → YouTube: publishes
- Agent orchestrator → Upload records: records upload
- Agent orchestrator → Data repository: reads and updates
- Google credentials → Data repository: stores credentials
- Data repository → Application database: reads and writes