A Stacker News-style social news platform built on Nostr and Bitcoin Lightning. Share links, discuss ideas, and earn sats.
https://zap-news.shakespeare.wtf
- Browse posts sorted by Hot, Recent, or Top (by zaps)
- Hot ranking algorithm inspired by Hacker News
- Infinite scroll with real-time updates
- Support for both link posts and text discussions
- Upvote posts by zapping with Bitcoin Lightning
- Real-time zap totals displayed on each post
- Pay-to-reply: Costs 10 sats to comment (like Stacker News)
- Supports WebLN wallets and Nostr Wallet Connect (NWC)
- NIP-22 compliant comment system
- Nested/threaded replies with collapse/expand
- Zap individual comments to show appreciation
- View user profiles with avatar, banner, and bio
- See all posts by a specific user
- Lightning address display for zappable users
- Browse posts by hashtag
- Tag filtering at relay level for efficiency
- Easy relay picker in header
- Preset popular relays (Damus, Primal, Nostr.band, etc.)
- Add custom relays
- Auto-refresh content when relays change
- Clean, minimal design inspired by Stacker News
- Light/dark mode toggle
- Fully responsive (mobile-friendly)
- PWA-ready
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- TailwindCSS - Styling
- shadcn/ui - UI components
- Nostrify - Nostr protocol integration
- TanStack Query - Data fetching & caching
- React Router - Client-side routing
- Kind 1 - Regular notes (posts)
- Kind 11 - Threads with titles (NIP-7D)
- Kind 1111 - Comments (NIP-22)
- Kind 9735 - Zap receipts (NIP-57)
- Kind 0 - User metadata
- Kind 10002 - Relay list (NIP-65)
- Only shows posts from zappable authors (with Lightning addresses)
- Filters out replies to show only top-level posts
- Counts both NIP-22 comments and NIP-10 replies
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/HeatherLarson/zapnews.git
cd zapnews
# Install dependencies
npm install
# Start development server
npm run devnpm run buildThe built files will be in the dist/ directory.
The app connects to these relays by default:
wss://bevo.nostr1.com(primary)wss://relay.damus.iowss://relay.primal.net
Users can change relays via the relay picker in the header.
The cost to post a reply is configured in src/pages/ThreadPage.tsx:
const REPLY_COST_SATS = 10;src/
├── components/ # React components
│ ├── auth/ # Authentication components
│ ├── comments/ # Comment system
│ ├── ui/ # shadcn/ui components
│ ├── Header.tsx # Main header with nav
│ ├── ThreadItem.tsx # Post item in feed
│ ├── ThreadList.tsx # Post feed
│ ├── RelayPicker.tsx # Relay selector
│ ├── ZapButton.tsx # Zap button
│ └── ZapDialog.tsx # Zap payment modal
├── hooks/ # Custom React hooks
│ ├── useThreads.ts # Post queries
│ ├── useZaps.ts # Zap functionality
│ ├── useAuthor.ts # User profiles
│ └── ...
├── pages/ # Route pages
│ ├── Index.tsx # Home feed
│ ├── ThreadPage.tsx # Post detail + comments
│ ├── ProfilePage.tsx # User profile
│ ├── TagPage.tsx # Posts by tag
│ └── SettingsPage.tsx # Relay settings
├── contexts/ # React contexts
├── lib/ # Utilities
└── App.tsx # App entry point
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
This project is open source.
- Inspired by Stacker News
- Built with Nostr protocol
- Powered by Bitcoin Lightning Network
- Vibed with Shakespeare
Made with ⚡ by the Nostr community