Overview
Built with Wxt (Web eXTension framework), the browser extension provides seamless integration with Chrome, Firefox, and other Chromium-based browsers.Technology Stack
- Wxt 0.20 framework
- React 19 for UI
- Better Auth integration
- Convex for real-time sync
Browsers
- Chrome/Chromium
- Firefox
- Edge
- Brave
Key Features
Multiple Save Methods
Context Menu
Context Menu
Popup Interface
Popup Interface
Click the extension icon to:
- Quick save current page
- View save status
- Access recent saves
- Manage authentication
Social Media Integration
Social Media Integration
Auto-Save URLs
Auto-Save URLs
Automatically detects and saves URLs from:
- Address bar changes
- Tab switches
- Bookmarks (optional)
Social Platform Features
The extension integrates seamlessly with social media platforms:- Instagram
- X (Twitter)
- Pinterest
- Save posts from feed
- Extract post permalinks
- Save images and captions
- Handle carousels
Authentication
Seamless authentication using Better Auth:- Cookie-based session sharing with web app
- Automatic session detection
- Secure credential storage
- One-click sign in from popup
Installation
From Web Stores
Chrome Web Store
Install from the Chrome Web Store (coming soon)
Firefox Add-ons
Install from Firefox Add-ons (coming soon)
Manual Installation (Developer Mode)
Load in Chrome
- Open
chrome://extensions/ - Enable “Developer mode”
- Click “Load unpacked”
- Select
.output/chrome-mv3directory
Development
Setup
Configuration
The extension is configured viawxt.config.ts:
wxt.config.ts
Architecture
Extension Structure
Message Passing
The extension uses Chrome’s messaging API for communication:Content Scripts
Content scripts inject save buttons into social media pages:entrypoints/content.ts
Background Service Worker
Handles context menu, authentication, and save operations:entrypoints/background.ts
Features in Detail
Context Menu Integration
Two context menu items are available:Save Page
Right-click anywhere on a page to save the current URL with metadata extraction
Save Text
Select text and right-click to save it as a text card
Popup Interface
The popup provides quick access to:- Current page save status
- Recent saves
- Authentication status
- Extension settings
popup/App.tsx
Social Media Extractors
Platform-specific content extractors:entrypoints/content/platforms/
- Post/tweet/pin detection
- Permalink extraction
- Metadata parsing
- Media URL extraction
Auto-Save Functionality
Optional automatic saving of URLs:hooks/useAutoSaveUrl.ts
Permissions
The extension requires the following permissions:storage
storage
Store extension settings and cached data
activeTab
activeTab
Access the currently active tab for saving content
tabs
tabs
Manage tabs and detect URL changes
contextMenus
contextMenus
scripting
scripting
Inject content scripts for social media integration
cookies
cookies
host_permissions: <all_urls>
host_permissions: <all_urls>
Access all websites for content extraction (required for social media integration)
Privacy & Security
Privacy First
- No analytics or tracking
- No data collection beyond what you save
- Session data stored locally only
- Secure communication with Convex backend
- Open source for transparency
Cookie Access
The extension reads cookies fromteakvault.com to maintain authentication:
utils/getSessionFromCookies.ts
Testing
The extension includes comprehensive tests:Publishing
Chrome Web Store
Prepare Assets
- Screenshots (1280x800 or 640x400)
- Promotional images
- Icon (128x128)
- Description and privacy policy
Submit
- Go to Chrome Web Store Developer Dashboard
- Upload
.output/chrome-mv3.zip - Fill in store listing
- Submit for review
Firefox Add-ons
Submit
- Go to Firefox Add-on Developer Hub
- Upload
.output/firefox-mv3.zip - Submit for review
Troubleshooting
Extension Not Loading
Extension Not Loading
- Verify manifest.json is valid
- Check browser console for errors
- Ensure all dependencies are built
- Try reloading the extension
Authentication Issues
Authentication Issues
- Ensure you’re logged in to the web app
- Check cookie permissions
- Clear extension storage and re-authenticate
- Verify domain matches (teakvault.com)
Save Failures
Save Failures
- Check network connection
- Verify Convex backend is accessible
- Check browser console for errors
- Ensure content is not from restricted URL (chrome://, file://, etc.)
Social Media Buttons Not Appearing
Social Media Buttons Not Appearing
Browser Compatibility
- Chrome
- Firefox
- Edge
- Brave
- Chrome 88+
- Manifest V3
- Full feature support
Learn More
Backend
Learn about the Convex backend integration
API Reference
Explore the Teak API
Wxt
Official Wxt framework documentation
Chrome Extensions
Chrome extension development guide