An advanced full-stack application for generating dynamic prompt templates and curating educational content using AI and YouTube analytics.
- Dynamic Prompt Generation: Creates adaptive prompt templates for any learning topic
- AI-Powered Content Curation: Uses Gemini AI to generate educational content recommendations
- YouTube Analytics: Searches and analyzes up to 60 educational videos with advanced metrics
- API Quota Tracking: Real-time monitoring of API usage and limits
- Copy-to-Clipboard: Easy prompt sharing and usage
- Video difficulty distribution charts
- Top educational channels analysis
- Quality scoring algorithm
- Engagement rate calculations
- Comprehensive video metadata
- Responsive design for all devices
- Modern card-based interface
- Interactive charts and graphs
- Real-time updates and notifications
- Collapsible sections and tabbed navigation
- FastAPI backend with async operations
- RESTful API design
- Error handling and demo modes
- Modular service architecture
- Cross-browser compatibility
- Python 3.8 or higher
- Internet connection for API calls
- Clone or download this project
- Run the startup script:
# Windows start.bat - Open your browser to:
http://localhost:8000
The startup script will:
- Create a virtual environment
- Install all dependencies
- Create a template .env file
- Start the FastAPI server
For full functionality, add your API keys to .env:
GEMINI_API_KEY=your_gemini_api_key_here
YT_API_KEY=your_youtube_api_key_hereWithout API keys: The app works in demo mode with sample data.
- Enter any learning topic (e.g., "Machine Learning", "Web Development")
- Or click on quick topic suggestions
- Default demo: "Prompt Engineering"
- Click "Generate Prompt" to create a customized template
- View prompt metadata (word count, focus areas, etc.)
- Copy the prompt for use in AI tools
- Gemini Tab: See AI-generated content curation
- YouTube Tab: Analyze educational videos with metrics
- View video analytics charts
- Browse sortable/filterable video table
- Export or share findings
prompt/
βββ backend/
β βββ main.py # FastAPI application
β βββ services/
β βββ prompt_template.py # Dynamic prompt generation
β βββ gemini_service.py # Gemini AI integration
β βββ youtube_service.py # YouTube API integration
βββ frontend/
β βββ index.html # Main UI
β βββ styles.css # Responsive styling
β βββ app.js # Frontend logic
βββ requirements.txt # Python dependencies
βββ start.bat # Windows startup script
βββ .env # API keys (create this)
GET /- Serve frontendPOST /api/generate-prompt- Generate dynamic promptPOST /api/gemini/query- Query Gemini AIPOST /api/youtube/search- Search YouTube videosGET /api/quotas- Get API quota statusPOST /api/update-keys- Update API keysGET /api/topics/examples- Get example topics
- Backend: FastAPI, Python, AsyncIO
- Frontend: Vanilla JavaScript, HTML5, CSS3
- APIs: Google Gemini AI, YouTube Data API v3
- Charts: Chart.js for data visualization
- Styling: Modern CSS with custom properties
- Markdown: Marked.js for content rendering
Even without API keys, you can:
- Generate dynamic prompts for any topic
- See demo AI responses
- Explore sample YouTube analytics
- Test all UI features and interactions
The app applies the Pareto Principle (80/20 rule) to content curation:
- Identifies the top 20% of content that delivers 80% of learning value
- Focuses on practical, actionable educational resources
- Balances theory with real-world applications
- Includes quality metrics and difficulty levels
Edit the example topics in backend/main.py:
examples = [
"Your Custom Topic",
"Another Topic",
# ... more topics
]Customize the base template in backend/services/prompt_template.py
Update CSS variables in frontend/styles.css for easy theme customization
-
Port 8000 already in use:
# Change port in start.bat python -m uvicorn main:app --host 0.0.0.0 --port 8001 --reload -
Missing dependencies:
pip install -r requirements.txt
-
API quota exceeded:
- Check quota status in the app
- Wait for quota reset (daily)
- Or use your own API keys
This is an educational project. For issues:
- Check the browser console for errors
- Verify API keys are correct (if using)
- Ensure internet connection for API calls
This project can be deployed to various platforms including Railway, Render, DigitalOcean, Heroku, and more.
For Render free tier deployments, a GitHub Actions workflow is included (.github/workflows/keep-alive.yml) that automatically pings the service every 14 minutes to prevent it from sleeping.
See the Deployment Guide for detailed instructions.
Built for educational and demonstration purposes. Feel free to modify and extend!
Happy Learning! π