Peeko - Instant Webpage Previews
Peeko is a Chrome extension that provides instant previews of webpage content when users interact with links. It fetches and summarizes webpage data in real-time and displays a concise preview without requiring users to navigate away from the current page.
Features
- Instant Previews: See what’s on a linked page without clicking through
- Smart Summarization: Get concise summaries of webpage content
- OpenAI Integration: Optional AI-powered summaries for better quality previews
- Customizable Settings: Adjust preview delay, summary length, and theme
- Domain Exclusions: Exclude specific domains from showing previews
- Cross-Device Support: Works on desktop and mobile devices with touch support
- Performance Optimized: Uses caching and throttling to minimize resource usage
Architecture
Peeko consists of two main components:
- Browser Extension: The frontend that users interact with
- Backend Server: Handles API requests to OpenAI and content extraction
Browser Extension
The extension is built with vanilla JavaScript and includes:
- Content Script: Injects the preview functionality into web pages
- Background Script: Manages API requests and caching
- Popup UI: Provides settings and configuration options
Backend Server
The Node.js backend server handles:
- OpenAI API integration for generating summaries
- Content extraction from webpages
- API key validation
- Rate limiting to prevent abuse
Installation
From Chrome Web Store (Coming Soon)
- Visit the Chrome Web Store
- Search for “Peeko” or use the direct link (TBD)
- Click “Add to Chrome”
Manual Installation (Developer Mode)
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable “Developer mode” in the top-right corner
- Click “Load unpacked” and select the Peeko directory
- The extension should now be installed and active
Backend Server
- Clone this repository
- Navigate to the
backend
directory
- Install dependencies:
npm install
- Create a
.env
file with your OpenAI API key (see backend/.env.example
)
- Start the server:
npm start
Usage Guide
Basic Usage
- Hover Previews: Simply hover over any link to see a preview
- Touch Devices: Long-press on a link to see the preview
- Keyboard Navigation: Focus on a link using Tab key to see the preview
Advanced Features
- Customizable Settings:
- Click the Peeko icon in your browser toolbar
- Adjust preview delay (default: 500ms)
- Choose summary length (short, medium, long)
- Select theme (light, dark, or auto)
- Configure domain exclusions
- Set Shift key requirement
- OpenAI Integration:
- Enable in settings
- Enter your OpenAI API key
- Get AI-powered summaries
- Performance Tips:
- Use domain exclusions for sites you don’t need previews for
- Adjust preview delay to balance responsiveness and resource usage
- Enable Shift key requirement to prevent accidental previews
Privacy Policy
Data Collection
- Peeko does not collect or store any personal information
- No browsing history is stored
- No user data is transmitted to third parties except:
- OpenAI API (when enabled)
- Backend server for content extraction
Data Processing
- All data processing occurs locally or through secured HTTPS API calls
- API keys are stored securely in your browser’s storage
- Cached data is stored locally and expires after 7 days
- No tracking or analytics are implemented
Your Rights
- You can clear all cached data at any time through settings
- You can disable the extension completely
- You can opt out of OpenAI integration
- You can exclude specific domains from previews
Terms of Service
Usage Terms
- Acceptable Use:
- Use the extension for personal browsing
- Respect website terms of service
- Do not use for automated scraping
- Do not exceed rate limits
- API Usage:
- OpenAI API usage is subject to OpenAI’s terms
- Users are responsible for their own API costs
- Rate limiting is enforced to prevent abuse
- Limitations:
- No guarantee of preview availability
- Some websites may block previews
- Performance depends on network conditions
- AI summaries may not be 100% accurate
Disclaimer
- Peeko is provided “as is” without warranties
- We are not responsible for:
- Content accuracy
- Website availability
- API costs
- Third-party service issues
API Documentation
Backend API Endpoints
- Content Extraction:
POST /api/extract
Body: { url: string }
Response: { success: boolean, content: string, title: string }
- Summary Generation:
POST /api/summarize
Body: { url: string, content: string, title: string, apiKey: string }
Response: { success: boolean, summary: string }
- Status Check:
GET /api/status
Response: { success: boolean, timestamp: string }
Rate Limits
- 100 requests per minute per URL
- 1000 requests per hour per user
- OpenAI API limits apply when enabled
Error Codes
RATE_LIMIT_EXCEEDED
: Too many requests
INVALID_API_KEY
: OpenAI API key is invalid
EXTRACTION_FAILED
: Content extraction failed
SUMMARIZATION_FAILED
: Summary generation failed
Support
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Development
Project Structure
peeko/
├── manifest.json # Extension metadata & permissions
├── background.js # Service worker for API requests & messaging
├── content.js # Detects user interactions and triggers fetches
├── popup.js # Manages settings UI and user configurations
├── styles.css # Styling for the popup and preview tooltip
├── icons/ # Extension icons
├── services/
│ └── summarizationService.js # Webpage content fetching & summarization
└── README.md # This file
Building from Source
- Clone the repository
- Make your changes
- Load the extension in developer mode as described in the installation section
To set up the development environment:
- Clone the repository
- Install backend dependencies:
cd backend && npm install
- Start the backend server:
npm run dev
- Load the extension in Chrome:
- Go to
chrome://extensions/
- Enable “Developer mode”
- Click “Load unpacked” and select the extension directory
Privacy & Security
- Peeko only requests permissions necessary for its functionality
- No personal data is collected or stored
- All data processing occurs locally or through secured HTTPS API calls
- API keys are managed securely and stored only in your browser
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request