A Chrome Manifest V3 extension that lets you publish deterministic link posts with tags to your Pubky homeserver, browse what your follows have shared about the current page, and keep quick local bookmarks.
- Initiate the Ring flow from the Sign-in button
- Scan the QR code on mobile to sign in
- Create a session with your homeserver
- Display a chronological sidebar feed
- See all Pubky App posts containing the current URL
- From users you follow
- Bookmark the current URL
- Uses Pubky App schema
- Stored on your homeserver
- Pubky App specs-compatible tagging
- Tag any URL with custom labels
- Discoverable by your network
- Comprehensive error logging
- Export logs for troubleshooting
- Real-time log viewer in popup
- Node.js 18+ and npm
- Chrome/Chromium browser
- Pubky Ring mobile app (for authentication)
- Install dependencies:
npm install- Build the extension:
npm run build- Load in Chrome:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
distfolder from this project
- Open Chrome and go to
To build and watch for changes:
npm run devThen reload the extension in Chrome after changes.
- Click the extension icon in your Chrome toolbar
- Click "Sign In with Pubky Ring"
- Scan the QR code with your Pubky Ring mobile app
- Approve the authentication on your mobile device
- Wait for the session to be established
- Navigate to any webpage
- Click the extension icon
- Click "Bookmark This Page"
- The bookmark will be saved to your homeserver
- Navigate to any webpage
- Click the extension icon
- Enter tags in the input field (comma or space separated)
- Click "Add Tags"
- Tags will be published to your homeserver
- Navigate to any webpage
- Click the extension icon
- Click "View Feed for This URL"
- The side panel will open showing posts from your network about this page
- Click the "π§ Debug" button in the popup header
- View real-time logs of all extension activity
- Filter logs by level (DEBUG, INFO, WARN, ERROR)
- Export logs to JSON for troubleshooting
- Clear logs when needed
pubky-extension-test/
βββ manifest.json # Chrome extension manifest
βββ package.json # Node dependencies
βββ vite.config.ts # Vite build configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ src/
β βββ background/ # Background service worker
β β βββ background.ts
β βββ popup/ # Extension popup
β β βββ App.tsx
β β βββ main.tsx
β β βββ components/
β β βββ AuthView.tsx # QR code authentication
β β βββ MainView.tsx # Main popup interface
β β βββ DebugPanel.tsx # Debug log viewer
β βββ sidepanel/ # Side panel feed
β β βββ App.tsx
β β βββ main.tsx
β β βββ components/
β β βββ PostCard.tsx # Post display component
β β βββ EmptyState.tsx # Empty state UI
β βββ utils/ # Utility modules
β β βββ auth.ts # Authentication logic
β β βββ crypto.ts # Cryptographic utilities
β β βββ logger.ts # Debug logging system
β β βββ storage.ts # Chrome storage wrapper
β β βββ pubky-api.ts # Pubky API client
β βββ styles/
β βββ globals.css # Global styles with Tailwind
βββ icons/ # Extension icons
βββ dist/ # Build output (generated)
- React 18 - UI framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- Vite - Build tool
- Chrome Extension APIs - Browser integration
- Pubky Protocol - Decentralized authentication and storage
- Generate client secret (32 random bytes)
- Calculate channel ID by hashing the secret
- Create
pubkyauth://URL with relay and capabilities - Display QR code for scanning
- Poll HTTP relay for encrypted auth token
- Decrypt token with client secret
- Parse token to extract pubky and capabilities
- Create session with homeserver
{
uri: string, // URL being bookmarked
created_at: number // Unix timestamp
}{
uri: string, // URL being tagged
label: string, // Tag label (lowercase, max 20 chars)
created_at: number // Unix timestamp
}{
content: string, // Post content
kind: 'link', // Post type
parent: null, // For replies
embed: null, // For reposts
attachments: [string] // URLs
}- Make sure you ran
npm run build - Check that you selected the
distfolder in Chrome - Look for errors in
chrome://extensions/page
- Ensure you have the Pubky Ring mobile app installed
- Check network connectivity
- Open debug panel to see detailed logs
- Try generating a new QR code
- Verify you're signed in
- Check that you're following users who have posted about the URL
- Note: Demo implementation may not connect to real Nexus API
All extension activity is logged. To view:
- Open the extension popup
- Click "π§ Debug" button
- Filter and export logs as needed
Common log contexts:
Auth- Authentication flowStorage- Data persistencePubkyAPI- API interactionsCrypto- Cryptographic operationsApp- UI component lifecycle
- Vite compiles TypeScript and React
- Tailwind processes CSS
- Output goes to
dist/folder - Manifest and icons are copied automatically
- Make code changes
- Run
npm run dev(auto-rebuilds on changes) - Go to
chrome://extensions/ - Click reload icon on the extension
- Test your changes
- New UI components:
src/popup/components/orsrc/sidepanel/components/ - New utilities:
src/utils/ - API changes:
src/utils/pubky-api.ts - Authentication changes:
src/utils/auth.ts
- Demo Homeserver: Currently uses placeholder homeserver URLs
- Nexus API: Not fully integrated with production Nexus API
- DHT Lookup: Homeserver resolution uses placeholder logic
- Session Management: Sessions don't persist across browser restarts (by design for security)
- Real Nexus API integration
- DHT-based homeserver resolution
- Post creation with link posts
- Rich post preview
- Notification system
- Export/import bookmarks and tags
- Search and filter capabilities
- Multiple account support
MIT
Contributions welcome! Please open an issue or PR.
For issues or questions:
- Check the debug logs first
- Export logs and include them in bug reports
- Open an issue with detailed reproduction steps