Overview
The Olis Chrome Extension provides seamless browser integration, allowing users to access Olis features directly from their browser while browsing the web.Technology Stack
Manifest V3
Latest Chrome extension API
TypeScript
Type-safe extension development
Webpack
Module bundling and optimization
React
UI components for popup and options
Project Structure
Development Setup
1
Navigate to the extension directory
2
Install dependencies
3
Build the extension
dist/ directory.For development with hot reload:4
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable “Developer mode” (toggle in top right)
- Click “Load unpacked”
- Select the
apps/chrome-extension/distdirectory
Features
Context Menu Integration
Right-click on selected text to:- Ask Olis about the selection
- Search with Olis
- Add to knowledge base
- Summarize content
Page Content Extraction
Automatically extract relevant content from web pages:- Article text
- Page metadata
- Links and references
- Code snippets
Quick Access Popup
Search
Quick search interface accessible via browser action
Chat
Mini chat window for quick questions
History
Recent queries and results
Settings
Extension configuration
Manifest Configuration
Communication Architecture
Message Passing
Storage Management
Use Chrome’s storage API for persistence:Building for Production
1
Build the extension
2
Test the build
- Load the extension from
dist/directory - Test all features thoroughly
- Check console for errors
- Verify on different websites
3
Create a package
4
Prepare for submission
- Create promotional images (1280x800, 640x400)
- Write detailed description
- Prepare privacy policy
- Create demo video (optional)
Publishing to Chrome Web Store
1
Register as a developer
Visit Chrome Web Store Developer Dashboard and pay the $5 registration fee.
2
Upload your extension
- Click “New Item”
- Upload the ZIP file
- Fill in store listing details
- Add screenshots and promotional images
3
Submit for review
Review can take a few days to a week. You’ll be notified via email.
Best Practices
Performance
- Minimize content script impact
- Use event-driven architecture
- Lazy load resources
- Cache API responses
Security
- Validate all input
- Use HTTPS for API calls
- Follow CSP guidelines
- Handle sensitive data carefully
UX
- Fast, responsive UI
- Clear error messages
- Intuitive interactions
- Keyboard shortcuts
Compatibility
- Test on multiple websites
- Handle edge cases
- Graceful degradation
- Cross-browser support
Troubleshooting
Extension Not Loading
Extension Not Loading
Problem: Extension doesn’t appear in ChromeSolution:
- Check manifest.json for errors
- Verify all files referenced exist
- Look for errors in chrome://extensions/
- Reload the extension
Content Script Not Injecting
Content Script Not Injecting
Problem: Content script doesn’t run on pagesSolution:
API Calls Failing
API Calls Failing
Problem: Cannot reach API serverSolution:
- Check host_permissions in manifest:
- Verify CORS is configured on server
- Check network tab in DevTools
- Test API endpoint directly
Build Errors
Build Errors
Problem: Webpack build failsSolution:
Testing
Manual Testing
1
Load the extension
Load unpacked extension from
dist/ directory2
Test on various websites
- News articles
- Documentation sites
- Social media
- Web apps
3
Test all features
- Context menu items
- Popup functionality
- Content extraction
- API communication
4
Check console
Look for errors in:
- Extension popup console
- Background service worker console
- Page console (for content scripts)
Automated Testing
Next Steps
Desktop Client
Explore the desktop application
API Server
Learn about the backend API