⚑ Nostr Web Archive Extension

PRODUCTION BUILD v2.0 - Multi-Tiered Viewing

✨ 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)

  1. Download all files below or copy them to your project
  2. Run these commands:
    npm install
    npm run build
    # Extension ready in /dist folder!
  3. Load in Chrome: Extensions β†’ Developer mode β†’ Load unpacked β†’ Select /dist folder
  4. Configure: Click extension β†’ Settings tab β†’ Add your Nostr private key (nsec)
  5. 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:

Deployment Options:

  1. GitHub Pages - Free hosting, just push to gh-pages branch
  2. Vercel/Netlify - One-click deploy with custom domain
  3. Your own server - Simple static file hosting
  4. 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

  1. Create a new folder: nostr-archive-extension
  2. Copy all the files above into their respective paths
  3. 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

  1. Open Chrome and navigate to chrome://extensions
  2. Enable "Developer mode" (toggle in top right)
  3. Click "Load unpacked"
  4. Select the dist/ folder
  5. The extension icon will appear in your toolbar

Step 5: Configure Extension

  1. Click the extension icon
  2. Go to Settings tab
  3. Enter your Nostr private key (nsec)
  4. Add relay URLs (default ones are pre-filled)
  5. Add Blossom server URLs (defaults provided)
  6. Click Save Settings

Step 6: Start Archiving!

  1. Navigate to any website
  2. Click the extension icon
  3. Select archive mode (Forensic/Verified/Personal)
  4. Click "Archive This Page"
  5. 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

βœ… What You Get - Complete Feature List