A webhook receiver that connects Helipad payments to a Nostr bot for automatic posting of boost events.
- Webhook Receiver: Listens for Helipad payment events on port 3333
- Nostr Integration: Automatically posts boost events to multiple Nostr relays
- BlockClock Mini Integration: Displays boost notifications on BlockClock Mini device
- Daily/Weekly Summaries: Posts automated summaries of boost activity
- Music Show Support: Special handling for music shows and artist boosts
- Comprehensive Monitoring: Full suite of monitoring and management tools
- Auto-Restart: Automatic recovery from failures
- Health Checks: Built-in health monitoring endpoints
- Docker Support: Containerized deployment for production
- Persistent Operation: macOS launch agent for 24/7 operation
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.envfile with:NSEC=REPLACE_WITH_YOUR_ACTUAL_NOSTR_PRIVATE_KEY HELIPAD_WEBHOOK_TOKEN=optional_auth_token PORT=3333 -
Start the bot:
npm start
npm run dev # Development with auto-restart on file changesKeep your bot running 24/7, even when your Mac is locked or sleeping:
./setup-persistent-bot.sh # Quick setupOr manually:
npm run install-service # Install launch agent
npm run service-status # Check if running
npm run service-logs # View logs
npm run uninstall-service # Remove serviceFor production environments:
# Build and run with Docker Compose
docker-compose up -d
# Or build manually
docker build -t boostbot .
docker run -d --name boostbot -p 4444:4444 --env-file .env boostbotSee MIGRATION-TO-UBUNTU.md for detailed Ubuntu server setup instructions.
npm run status # Detailed status information
npm run health # Quick health check
npm run dashboard # Beautiful dashboard overview
npm run stop # Stop the bot
npm run restart # Restart the bot
npm run logs # View detailed logsnpm run monitor # One-time status check
npm run watch # Continuous monitoring (30s intervals)
npm run auto-restart # Auto-restart on failure (recommended)Access the dashboard at http://localhost:3333 for:
- Real-time status monitoring
- Live logs viewing
- Quick action buttons
- System resource usage
- POST
/helipad-webhook- Main webhook endpoint for Helipad events - GET
/health- Health check endpoint - GET
/test-daily-summary- Test daily summary posting - GET
/test-weekly-summary- Test weekly summary posting - GET
/test-music-show- Test music show functionality - GET
/test-blockclock?message=TEXT- Test BlockClock Mini display - GET
/test-blockclock?amount=NUMBER- Test BlockClock Mini with number
NSEC: Your Nostr private key (required)HELIPAD_WEBHOOK_TOKEN: Optional authentication tokenPORT: Webhook server port (default: 3333)TEST_MODE: Set to 'true' for test mode (no actual Nostr posting)
The bot automatically sends boost notifications to a BlockClock Mini device:
- Default IP: 192.168.0.182 (configurable in
helipad-webhook.ts) - API Rate Limit: ~1 request per minute (handled automatically)
- Display Format: Shows boost amounts or "BOOST" text
- Test: Use the "Test BlockClock" button in the web dashboard
Default relays (configurable in lib/nostr-bot.ts):
- wss://relay.damus.io
- wss://relay.nostr.band
- wss://relay.primal.net
- wss://7srr7chyc6vlhzpc2hl6lyungvluohzrmt76kbs4kmydhrxoakkbquad.local/
- wss://chadf.nostr1.com/
- Check if port 3333 is in use:
lsof -i :3333 - Kill existing processes:
npm run stop - Check
.envfile configuration - Verify dependencies are installed
- Check logs:
npm run logs - Use auto-restart:
npm run auto-restart - Check system resources
- Review error messages
- Verify bot is running:
npm run status - Test health endpoint:
npm run health - Check webhook URL:
http://localhost:3333/helipad-webhook - Verify authentication token
BoostBot/
├── lib/
│ ├── nostr-bot.ts # Main Nostr bot implementation
│ ├── karma-system.ts # Karma tracking system
│ ├── music-show-bot.ts # Music show specific logic
│ └── logger.js # Logging utilities
├── scripts/
│ ├── status.js # Status checking
│ ├── stop.js # Process management
│ ├── restart.js # Process restart
│ ├── logs.js # Log viewing
│ ├── auto-restart.js # Auto-restart monitor
│ ├── dashboard.js # Dashboard overview
│ ├── karma-manager.js # Karma system management
│ └── manage-webhooks.js # Webhook management
├── public/
│ └── index.html # Web dashboard
├── helipad-webhook.js # Main webhook server
├── monitor.js # Status monitoring
├── docker-compose.yml # Docker configuration
├── Dockerfile # Docker build instructions
└── package.json # Dependencies and scripts
- MONITORING.md - Detailed monitoring guide
- DOCKER.md - Docker deployment instructions
- MIGRATION-TO-UBUNTU.md - Ubuntu server setup
- MUSIC-SHOW-FEATURE.md - Music show functionality
- WEBHOOK-MANAGEMENT.md - Webhook configuration
MIT