Skip to content

Latest commit

 

History

History
237 lines (160 loc) · 5.01 KB

File metadata and controls

237 lines (160 loc) · 5.01 KB

📋 Complete Setup Checklist for Users

This guide helps users get the URL Monitor Pro application fully set up.

Prerequisites

  • Node.js 18+ installed
  • A Solana wallet (Phantom recommended)
  • MongoDB Atlas account (for database)
  • Git (for cloning repository)

Phase 1: Basic Setup (Required)

Step 1: Clone & Install

git clone <your-repo-url>
cd url-monitor
npm install

Step 2: MongoDB Setup

  1. Go to MongoDB Atlas
  2. Create a free cluster
  3. Click "Connect" → "Drivers" → Copy connection string
  4. Create .env.local file in url-monitor/ directory
  5. Add:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/url-monitor
NODE_ENV=development

Step 3: Run Application

npm run dev

Visit: http://localhost:3000

You should see:

  • URL Monitor Pro header
  • "Connect Phantom" button
  • Setup notice banner

Phase 2: Connect Wallet (Required)

Step 1: Install Phantom Wallet

Step 2: Connect to App

  1. Click "🔐 Connect Phantom" button
  2. Approve in Phantom popup
  3. See wallet address displayed
  4. You're now authenticated!

Next: Start adding sites to monitor


Phase 3: Enable SOL Rewards (Optional)

Only if you want to enable user rewards!

See REWARDS_SETUP.md for complete instructions.

Quick Summary:

  1. Add environment variables to .env.local:
REWARD_WALLET_ADDRESS=your_wallet_address
REWARD_WALLET_PRIVATE_KEY=your_private_key
SOLANA_RPC_URL=https://api.devnet.solana.com
  1. Fund wallet with SOL
  2. Restart dev server
  3. Users can now earn SOL for reporting issues!

Phase 4: Deployment (When Ready)

Option 1: Deploy to Vercel (Recommended)

npm install -g vercel
vercel

Follow prompts, add environment variables in Vercel dashboard.

Option 2: Deploy to Railway

  1. Go to Railway.app
  2. Connect GitHub repo
  3. Add environment variables
  4. Deploy!

Option 3: Self-Hosted (Docker)

docker build -t url-monitor .
docker run -p 3000:3000 -e MONGODB_URI=... url-monitor

Configuration Reference

Required Variables

Variable Description Example
MONGODB_URI MongoDB connection mongodb+srv://...
NODE_ENV Environment development or production

Optional Variables (For Rewards)

Variable Description How to Get
REWARD_WALLET_ADDRESS SOL wallet sending rewards Phantom → Copy address
REWARD_WALLET_PRIVATE_KEY Wallet private key Phantom → Export key
SOLANA_RPC_URL Solana endpoint https://api.devnet.solana.com

⚠️ Never commit private keys to Git! Use .gitignore:

.env.local
.env.*.local
node_modules/
.next/

Testing the App

Test 1: Add a Site

  1. Connect wallet
  2. Enter URL: https://www.google.com
  3. Click "🚀 Monitor This Site"
  4. Should appear in "Monitored Sites" list

Test 2: Report Issue (If Rewards Enabled)

  1. Click "🚨 Report Issue & Earn SOL" on any site
  2. Describe problem (min 10 characters)
  3. Click "Submit Report"
  4. If site is DOWN → Earn SOL! 💰

Test 3: Multi-Wallet

  1. Connect second wallet via wallet manager dropdown
  2. Switch between wallets
  3. Each wallet shows only their sites

Troubleshooting

"Cannot connect to Phantom"

  • Install Phantom extension
  • Refresh page
  • Try different browser
  • Check Phantom is enabled

"MONGODB_URI not configured"

  • Check .env.local exists
  • Verify connection string is correct
  • Restart dev server after changes

"Invalid wallet address" error

  • Check if wallet is connected
  • Try disconnecting and reconnecting
  • Refresh page

Rewards not working

  • Check if REWARD_WALLET_ADDRESS in .env.local
  • Fund wallet with SOL
  • Restart server
  • Check browser console for errors

Build fails on deployment

  • Ensure all required environment variables are set
  • Check Node.js version: node --version (should be 18+)
  • Clear build cache: npm run build

Next Steps

  • ✅ Read REWARDS_SETUP.md to enable rewards
  • ✅ Deploy to production
  • ✅ Share with community
  • ✅ Monitor sites and earn SOL!

Security Checklist

  • .env.local is in .gitignore
  • Never committed private keys
  • Using https:// URLs only
  • MongoDB password is strong
  • Wallet private key stored securely
  • Reward wallet funded appropriately

Support & Resources


Ready to launch? 🚀 Start with Phase 1, then Phase 2, and optionally Phase 3!