Study Buddy: Project Story
The Vision
Study Buddy was born from a simple observation: students spend countless hours reading online content but struggle to convert that information into effective study materials. While AI tools exist to help, they often come with privacy concerns, subscription fees, and the need to copy-paste content into external platforms.
What if learning materials could be generated instantly, privately, and for free, right in your browser?
The Solution
Study Buddy is a Chrome extension that transforms any webpage into comprehensive study materials using Chrome's built-in AI APIs. No data leaves your device, no API keys required, no subscriptions needed.
Core Features
1. Instant Summaries
- AI-generated overviews with key points
- Markdown-formatted for easy reading
- Extracts the most important information automatically
2. Smart Quiz Generation
- Creates 10+ multiple-choice questions from content
- Correct answers highlighted in the output
- Includes explanations for better understanding
3. Flashcard Creation
- Generates 15+ flashcards for spaced repetition learning
- Question-answer format for effective memorization
- Ready to review and test knowledge
4. Enhanced Examples
- Uses Chrome's Rewriter API to improve clarity
- Makes examples more educational and detailed
- Perfect for understanding complex concepts
The Technology
Study Buddy leverages Chrome's experimental Built-in AI APIs:
- Summarizer API: Extracts key points and creates structured summaries
- Language Model API: Generates intelligent quiz questions
- Rewriter API: Enhances examples for better educational value
All processing happens locally on your device using downloaded AI models. Your data never touches external servers.
The Journey
Phase 1: Initial Build
Started with basic content extraction and simple text processing. The goal was to prove the concept could work.
Phase 2: API Integration
Integrated Chrome's new AI APIs (self.ai.languageModel, self.ai.rewriter, self.Summarizer). This required careful error handling and fallbacks since these are experimental features.
Phase 3: User Experience
Added progress tracking, badges showing generation status, and beautiful HTML output. The extension now feels polished and professional.
Phase 4: Reliability
Implemented timeout protection, fallback content generation, and robust error handling. The extension works even when AI models are still downloading or fail.
Phase 5: Standalone Output
Replaced the web app dependency with a self-contained HTML generator. Results now open in a beautiful, print-ready page with embedded styling.
The Architecture
User clicks extension
|
v
Popup sends content to background script
|
v
Background script processes with AI APIs
|
v
Progress tracked in badge (0% -> 100%)
|
v
Results stored in chrome.storage.local
|
v
Beautiful HTML page generated and opened
|
v
Print-ready study materials ready to use
Technical Highlights
Smart Timeouts
Every AI call has timeout protection:
- 10 seconds for model creation
- 30 seconds for content generation
- 45 seconds overall per task
If timeouts occur, fallback methods ensure users always get results.
Fallback Strategies
When AI APIs fail or are unavailable:
- Summary: Extract first sentences as overview
- Quiz: Generate questions from content structure
- Flashcards: Split sentences intelligently
- Examples: Use original content with light processing
Standalone HTML Generation
The generateResultsHTML() function creates a complete webpage with:
- Embedded CSS (200+ lines of styling)
- Purple gradient theme
- Responsive grid layouts
- Print-friendly formatting
- Markdown rendering for rich content
- No external dependencies
Privacy by Design
- All processing happens on-device
- No external API calls
- No data collection
- No tracking
- No accounts needed
The Impact
Study Buddy makes AI-powered learning accessible to everyone:
For Students: Turn any article, documentation, or online resource into study materials in seconds.
For Researchers: Quickly extract key points and generate review questions from papers and articles.
For Lifelong Learners: Create personalized study aids from any content you find online.
For Everyone: Learn more effectively with AI assistance, completely free and private.
The Numbers
- 0 API Keys: No setup required
- 0 Subscriptions: Completely free to use
- 100% Private: All processing on-device
- 10+ Quiz Questions: Generated per page
- 15+ Flashcards: Created automatically
- 3-5 Enhanced Examples: With AI improvements
- 1 Click: To generate all materials
The Future
Study Buddy is just the beginning. Potential enhancements include:
- Spaced Repetition System: Track flashcard reviews and optimize learning
- Custom Quiz Difficulty: Easy, medium, hard question generation
- Multi-language Support: Generate materials in any language
- Export Options: PDF, Anki decks, Notion pages
- Study Sessions: Timed practice with progress tracking
- Collaborative Learning: Share generated materials with study groups
Getting Started
- Install Chrome 128+ with AI features enabled
- Enable the flags:
chrome://flags/#optimization-guide-on-device-modelchrome://flags/#prompt-api-for-gemini-nanochrome://flags/#summarization-api-for-gemini-nanochrome://flags/#rewriter-api-for-gemini-nano
- Load the extension in Developer Mode
- Visit any webpage and click the Study Buddy icon
- Generate materials and start learning
The Philosophy
Learning should be:
- Accessible: No barriers, no costs
- Private: Your data stays yours
- Effective: AI-enhanced for better retention
- Simple: One click to generate
- Beautiful: Professional, polished output
Study Buddy embodies these principles, making AI-powered education available to everyone with a Chrome browser.
Technical Stack
- Platform: Chrome Extension (Manifest V3)
- AI: Chrome Built-in AI APIs (Gemini Nano)
- Storage: chrome.storage.local
- UI: Vanilla JavaScript, CSS3
- Architecture: Service Worker + Content Scripts
- Output: Standalone HTML with embedded styles
Open Source
Study Buddy is built to be studied, modified, and improved. The codebase demonstrates:
- Modern Chrome extension architecture
- AI API integration patterns
- Error handling and fallbacks
- Progress tracking and user feedback
- Standalone HTML generation
- Privacy-first design
Credits
Built with Chrome's experimental Built-in AI APIs. Powered by Gemini Nano running locally on your device.
No external services, no cloud APIs, no data collection. Just pure, private, on-device AI helping you learn better.
Study Buddy: Transform any webpage into comprehensive study materials in seconds. Free, private, and powered by AI.
Log in or sign up for Devpost to join the conversation.