β¨ COMPLETE FEATURE SET v2.0
β° NIP-03 OpenTimestamps
- Creates OTS proofs for all archives
- Submits to calendar servers
- Adds ['ots', proof] tag to Nostr events
- Background service upgrades to Bitcoin
- Full NIP-03 compliance
πΈ Blossom Media Storage
- Extracts images and media from pages
- Uploads to multiple Blossom servers
- Content-addressed deduplication
- Fallback server support
- ['imeta'] tags for media references
π Truth Detection Engine
- Price discrimination detection
- A/B testing exposure
- Shadow ban proving
- Manipulation scoring
- Explainability analysis
ποΈ Multi-Tiered Viewing
- Quick View in popup (last 5)
- Full browser with search
- Reconstructed view with media
- Public explorer for any npub
- PDF/HTML export options
β‘ Nostr Integration
- Publishes to multiple relays
- Kind 30041 events
- NIP-19 encoding support
- WebSocket connection pooling
- Automatic reconnection
π Cryptographic Security
- SHA256 content hashing
- Multiple hash layers
- Gzip compression
- Signature verification
- Integrity checking
π Quick Start (3 minutes to running extension)
- Download all files below or copy them to your project
- Run these commands:
npm install
npm run build
# Extension ready in /dist folder!
- Load in Chrome: Extensions β Developer mode β Load unpacked β Select /dist folder
- Configure: Click extension β Settings tab β Add your Nostr private key (nsec)
- Archive: Navigate to any website β Click extension β Select mode β Archive!
ποΈ TECHNICAL ARCHITECTURE
π Core Architecture Components
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β POPUP UI (popup.js) β
β β’ Mode selection (Forensic/Verified/Personal) β
β β’ Settings management β
β β’ Quick View (last 5 archives) β
β β’ Stats display β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β Chrome Messages
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β BACKGROUND SERVICE WORKER β
β (background.js) β
β β’ Message routing & orchestration β
β β’ OpenTimestamps proof management β
β β’ Blossom media uploads β
β β’ Nostr event publishing β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Core Modules β
ββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββ€
β NostrClient β Verification β Archive β Blossom β
β β Engine β Manager β Client β
ββββββββββββββββΌβββββββββββββββΌβββββββββββββββΌβββββββββββββ€
β β’ WebSocket β β’ Compare β β’ Create β β’ Upload β
β β’ Sign β β’ Analyze β β’ Store β β’ Verify β
β β’ Publish β β’ Detect β β’ Retrieve β β’ Retrieve β
ββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββ
β Content Scripts
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β CONTENT.JS (Page Context) β
β β’ Captures DOM β
β β’ Detects modifications β
β β’ Shows notifications β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Viewing System
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VIEWING LAYERS β
ββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββ€
β Quick View β Archive β Viewer β Public β
β (Popup) β Browser β (Iframe) β Explorer β
ββββββββββββββΌβββββββββββββββΌβββββββββββββββΌββββββββββββββββ€
β β’ Last 5 β β’ All local β β’ Full page β β’ Any npub β
β β’ Compact β β’ Search β β’ Media β β’ No extensionβ
β β’ Fast β β’ Filter β β’ Export β β’ Web app β
ββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββ
ποΈ MULTI-TIERED VIEWING SYSTEM
π± Quick View (Popup)
Instant access to your last 5 archives right in the extension popup
- One-click access
- Visual status badges
- Relative timestamps
- Direct link to full viewer
π Archive Browser
Full management interface for all your local archives
- Search and filter
- Sort by date/status
- Bulk operations
- Statistics dashboard
π Archive Viewer
Full reconstruction with Blossom media and verification display
- Sandboxed iframe display
- Media reconstruction
- Verification details
- Export options
π Public Explorer
Browse any npub's archives without the extension
- Standalone web app
- Real-time relay fetch
- Advanced filtering
- Share via URL
π PDF Export
Professional reports for legal or research purposes
- Court-admissible format
- All hashes included
- OTS proof details
- Metadata preserved
π Direct Linking
Share archives with direct URLs
- viewer.html?id=...
- explorer.html?npub=...
- Deep linking support
- Social media ready
π Complete Project Structure
nostr-archive-extension/
βββ package.json
βββ webpack.config.js
βββ manifest.json
βββ src/
β βββ background.js
β βββ content.js
β βββ popup.js
β βββ popup.html
β βββ archives.html (Archive Browser)
β βββ archives.js
β βββ viewer.html (Archive Viewer)
β βββ viewer.js
β βββ explorer.html (Public Explorer)
β βββ explorer.js
β βββ lib/
β β βββ nostr-client.js
β β βββ verification-engine.js
β β βββ archive-manager.js
β β βββ blossom.js
β β βββ opentimestamps.js
β β βββ utils.js
β βββ styles/
β βββ popup.css
β βββ archives.css
β βββ viewer.css
βββ dist/ (generated)
π PUBLIC EXPLORER - Standalone Web App
The Public Explorer is a standalone web application that allows anyone to browse Nostr archives from any public key without needing the extension installed.
Features:
- Browse archives from any Nostr npub/hex public key
- Real-time fetching from multiple Nostr relays
- Advanced filtering by mode, verification status, time period
- URL search functionality
- Direct links to Nostr events
- Archive reconstruction with Blossom media
- Share via URL: explorer.html?npub=...
Deployment Options:
- GitHub Pages - Free hosting, just push to gh-pages branch
- Vercel/Netlify - One-click deploy with custom domain
- Your own server - Simple static file hosting
- IPFS - Decentralized hosting option
Note: The explorer files (explorer.html and explorer.js) are included in the extension build but can also be deployed separately as a standalone web app. This allows you to share a public URL where anyone can explore archives without installing the extension.
π¨ Complete Build Instructions
Step 1: Setup Project
- Create a new folder:
nostr-archive-extension
- Copy all the files above into their respective paths
- Create the folder structure as shown
Step 2: Install Dependencies
cd nostr-archive-extension
npm install
Step 3: Build Extension
npm run build
This creates the dist/
folder with the compiled extension
Step 4: Load in Chrome
- Open Chrome and navigate to
chrome://extensions
- Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
dist/
folder
- The extension icon will appear in your toolbar
Step 5: Configure Extension
- Click the extension icon
- Go to Settings tab
- Enter your Nostr private key (nsec)
- Add relay URLs (default ones are pre-filled)
- Add Blossom server URLs (defaults provided)
- Click Save Settings
Step 6: Start Archiving!
- Navigate to any website
- Click the extension icon
- Select archive mode (Forensic/Verified/Personal)
- Click "Archive This Page"
- View your archives in the Recent tab or full Archive Browser
Optional: Deploy Public Explorer
To make the Public Explorer available to others:
# Copy explorer files to separate folder
cp dist/explorer.* ../nostr-archive-explorer/
# Deploy to GitHub Pages
git init
git add .
git commit -m "Deploy Nostr Archive Explorer"
git push -u origin gh-pages
# Access at: https://yourusername.github.io/nostr-archive-explorer/
β οΈ Important Notes - Please Read
- CORS Reality: Server fetch is blocked by CORS on ~90% of websites. This is a browser security feature, not a bug.
- Personal Mode: Always works - captures exactly what you see in your browser
- Verified Mode: Falls back gracefully when CORS blocks server fetch
- Forensic Mode: Only works on CORS-enabled sites (rare). For full forensic capabilities, set up a proxy server.
- Nostr Key: Get a key at nostrgenerator.com or any Nostr client
- Storage Limit: Extension stores last 100 archives locally
β
What You Get - Complete Feature List
- β
Real Nostr publishing to multiple relays
- β
NIP-03 OpenTimestamps with Bitcoin anchoring
- β
Blossom media storage and reconstruction
- β
Truth detection (price discrimination, A/B testing)
- β
Three archive modes (Forensic/Verified/Personal)
- β
SHA256 multi-layer hashing
- β
Gzip compression
- β
Quick View in popup (last 5 archives)
- β
Full Archive Browser with search/filter
- β
Archive Viewer with media reconstruction
- β
Public Explorer web app (no extension needed)
- β
PDF export for legal documentation
- β
HTML export for offline viewing
- β
Statistics tracking
- β
CORS fallback handling
- β
WebSocket connection pooling
- β
Automatic reconnection
- β
Extension modification detection
- β
Authentication state detection
- β
Clean, modern UI