How yusufmalikul/learn-from-youtube works
Project type and purpose
• This is a small full-stack “data-ingestion + static-view” application.
• Purpose: Every hour it fetches YouTube videos by topic, appends them to a JSON file, and exposes a simple browser view of the aggregated list.
File structure
• Top-level scripts and assets:
• app.py → the Python fetcher (and possible web server).
• index.html → static frontend that reads videos.json.
• videos.json → file-based data store.
• requirements.txt → Python dependencies (e.g., requests, Flask?).
• CI/automation:
• .github/workflows/run_app.yaml → scheduled GitHub Action that invokes app.py each hour.
• No external database or microservices—data is persisted as a flat JSON file.
README for additional insights
• Confirms hourly fetch of “hidden gems” on YouTube.
• No mention of a hosted backend server; implies a static-site deployment plus GitHub Actions for scheduling.
Main components
A. Scheduler Component
• GitHub Actions workflow (run_app.yaml) triggered via cron.
B. Data Ingestion Component
• app.py script.
• Connects to YouTube Data API over HTTPS.
• Parses and filters results by topic.
C. Data Storage
• videos.json local file (flat-file store).
D. Frontend Component
• index.html served by any static host (e.g., GitHub Pages).
• Client-side JS (if any) fetches videos.json and renders the list.
Relationships and data flow
1. Scheduler → invokes app.py hourly.
2. app.py → calls YouTube API → receives JSON response.
3. app.py → reads/writes videos.json (merges new entries).
4. User’s browser → requests index.html and videos.json from the web host.
5. index.html → displays aggregated video list.
Architectural patterns and design principles
• Batch ingestion via scheduled job.
• Flat-file data store (no RDBMS or NoSQL).
• Static front-end—no dynamic backend server at runtime.
• Separation of concerns: ingestion vs. presentation.
Key technologies/frameworks
• Python (app.py), requests or google-api-python client.
• GitHub Actions for scheduling.
• Static HTML/CSS/JS for frontend.
• YouTube Data API v3.
Final advice
• Four components and their interactions.
• Notes on timing (hourly) and technology (Python, GitHub Actions, static host).