Skip to content

ChadFarrow/BoostBot-Starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ BoostBot-Starter

Automatically share your Podcasting 2.0 support on Nostr

Note: This is the simplified starter version of BoostBot. For the full version with advanced features, see the main repository.

πŸ€” What is BoostBot-Starter?

BoostBot-Starter automatically shares your Podcasting 2.0 Boost to Nostr whenever you send Boosts to podcasters or musicians.

Example: You boost "My Awesome Podcast" with 1000 sats β†’ BoostBot posts:

πŸŽ™οΈ Boosted "My Awesome Podcast" with 1000 sats
From: @alice
Message: "Great episode! Love the insights on Bitcoin."
#Podcast2 #Value4Value #Lightning #Nostr

🎯 Perfect for:

  • Podcast listeners who boost shows with Bitcoin
  • Nostr users wanting to share their podcast discovery
  • Supporting the Value4Value podcasting movement

πŸ—οΈ How It Works

Your Podcast App β†’ Lightning Payment β†’ Helipad β†’ BoostBot-Starter β†’ Nostr Post
       πŸ“±               ⚑           🚁           πŸ€–            πŸ“±
  1. You boost a podcast in a compatible app (like Podverse, CurioCaster)
  2. Helipad captures it on your Lightning node
  3. BoostBot-Starter receives a webhook from Helipad
  4. Your boost gets posted to your Nostr feed

πŸ“‹ Prerequisites

Required Infrastructure:

What You Need:

⚠️ Security Note: Create a NEW Nostr key pair for this bot - don't use your personal keys!

πŸ” Current Limitation: Only sent boosts are posted to Nostr (not received boosts or streams)

πŸš€ Quick Setup

Step 1: Get Your Nostr Keys

πŸ”‘ You need Nostr keys for the bot to post. This takes 2 minutes:

  1. Visit nostr.com
  2. Click "Join Nostr"
  3. Save both keys somewhere safe:
    • nsec1... (private key) ← You'll need this for Step 5
    • npub1... (public key) ← Your bot's Nostr identity
    • Make sure to click Download Keys so you have them backed up.
  4. Optional: Follow your bot's npub from your main Nostr account

Step 2: Download & Install

# Clone the repository
git clone https://github.com/ChadFarrow/BoostBot-Starter.git

# Navigate to directory
cd BoostBot-Starter

# Install dependencies
npm install

Step 3: Configure Your Bot

# Copy the example environment file
cp env.example .env

Edit the .env file:

πŸ“ How to edit .env file (click to expand)

The .env file is hidden by default. Here's how to edit it:

🍎 Mac:

  • Finder: Press Cmd + Shift + . to show hidden files, then double-click .env
  • Terminal: open -a "TextEdit" .env or nano .env

πŸͺŸ Windows:

  • File Explorer: View tab β†’ Check "Hidden items", then right-click .env β†’ Open with Notepad
  • Command Prompt: notepad .env

🐧 Linux:

  • Terminal: nano .env or gedit .env

Add your Nostr key (this is the only required setting):

# REQUIRED: Your Nostr private key from Step 1
NOSTR_BOOST_BOT_NSEC=nsec1your_actual_private_key_here

# Optional settings (defaults work fine):
# PORT=3333
# LOG_LEVEL=INFO
# TEST_MODE=false

Step 4: Test Your Setup

# Start the bot
npm start

In a new terminal, test it:

# Send a test post to Nostr
npm test

βœ… Success looks like:

  • Terminal shows: βœ… Test boost posted to Nostr successfully!
  • You see the test post in your Nostr client

❌ If it fails:

  • Check your NOSTR_BOOST_BOT_NSEC is correct
  • Verify the nsec format (starts with nsec1)

Step 5: Connect Helipad

🚁 Tell Helipad to send webhook notifications to your bot:

  1. Open Helipad in your browser

  2. Click the gear icon βš™οΈ (top-right corner)

  3. Go to "Webhooks" tab

  4. Click "Add Webhook"

  5. Fill out the form:

    URL: http://YOUR_LOCAL_IP:3333/helipad-webhook
    Trigger on amount: Any amount
    Trigger on: βœ… New boosts, βœ… New streams, βœ… New sent boosts  
    Enabled: βœ… Checked
    
  6. Find YOUR_LOCAL_IP:

🌐 How to find your local IP address (click to expand)

🍎 Mac: ipconfig getifaddr en0
πŸͺŸ Windows: ipconfig (look for IPv4 Address)
🐧 Linux: hostname -I

Example: If your IP is 192.168.1.42, use:

http://192.168.1.42:3333/helipad-webhook
  1. Click "Save changes"

Step 6: Test the Full Flow

  1. Send a boost from your podcast app (even 1 sat works)
  2. Check your bot logs for: πŸ“© Received boost webhook...
  3. Check Nostr for your boost post!

πŸŽ‰ You're done! Your boosts will now automatically appear on Nostr.

🩺 Troubleshooting

🚫 "Bot not posting to Nostr"

Check your Nostr key:

# Your .env should look like this:
NOSTR_BOOST_BOT_NSEC=nsec1abc123...very_long_string...xyz789

Common issues:

  • ❌ Missing nsec1 prefix
  • ❌ Key has spaces or line breaks
  • ❌ Using npub instead of nsec

🚫 "Webhook not working"

  1. Verify BoostBot-Starter is running:

    curl http://localhost:3333/health
    # Should return: {"status":"ok"}
  2. Check Helipad webhook URL:

    • Make sure it's http://YOUR_IP:3333/helipad-webhook
    • Use your actual local IP address
    • Port 3333 should be open
  3. Test with curl:

    curl -X POST http://localhost:3333/helipad-webhook \
      -H "Content-Type: application/json" \
      -d '{"action":2,"value_msat_total":1000,"podcast":"Test"}'

🚫 "I sent a boost but nothing happened"

Check the boost conditions:

  • Must be a sent boost (not received)
  • Must have value_msat_total > 0
  • Must have action: 2 (boost action)

Check your logs:

# Look for these messages:
πŸ“© Received boost webhook...
βœ… Posted boost to Nostr successfully

🚫 "Can't find .env file"

The .env file is hidden by default:

  • Make sure you ran cp env.example .env
  • Enable hidden file visibility (see Step 3 above)
  • Check you're in the BoostBot-Starter directory

πŸ“‹ Viewing Logs

If running locally:

npm start
# Logs appear directly in terminal

πŸ”¬ Webhook Format

BoostBot-Starter expects this JSON from Helipad:

{
  "index": 123,
  "time": 1234567890,
  "value_msat": 1000000,
  "value_msat_total": 1000000,
  "action": 2,
  "sender": "user123", 
  "app": "helipad",
  "message": "Great episode!",
  "podcast": "My Podcast",
  "episode": "Episode 1",
  "tlv": "..."
}

Posts to Nostr when:

  • action is 2 (Boost)
  • value_msat_total > 0

πŸ› οΈ Development

# Install dependencies
npm install

# Start development server
npm start

# Test the webhook endpoint
npm test

# Check code style (if you add linting)
npm run lint

πŸ“ Project Structure

boostbot-starter/
β”œβ”€β”€ πŸ“„ README.md              # This guide
β”œβ”€β”€ πŸ“„ env.example            # Environment template  
β”œβ”€β”€ πŸ“„ package.json           # Dependencies & scripts
β”œβ”€β”€ πŸ“„ .gitignore             # Git ignore rules
β”œβ”€β”€ πŸ§ͺ test-webhook.js        # Test script
β”œβ”€β”€ πŸ€– helipad-webhook.js     # Main webhook handler
└── πŸ“ lib/                   # Core logic
    β”œβ”€β”€ πŸ“„ logger.js          # Emoji logging
    └── πŸ“„ nostr-bot.js       # Nostr posting

🀝 Support

  • πŸ› Found a bug? Open an issue
  • ❓ Need help? Check the troubleshooting section above
  • πŸ’¬ Community: Find us on Nostr or in Value4Value spaces
  • πŸ‘¨β€πŸ’» Creator: Follow @ChadFarrow on Nostr - npub177fz5zkm87jdmf0we2nz7mm7uc2e7l64uzqrv6rvdrsg8qkrg7yqx0aaq7

πŸ“„ License

MIT License - Feel free to modify and distribute!


πŸŽ‰ Happy boosting! Share those sats and spread the word about great podcasts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •