# BizNode Pro -- Installation Guide

This guide walks you through installing BizNode(TM) Pro on Windows. Pro is an overlay on top of the Basic package -- you must install Basic first.

---

## Prerequisites

- Windows 10 or 11
- Python 3.10+
- Docker Desktop (for Qdrant)
- Ollama installed and running
- PostgreSQL (recommended) or SQLite
- **Basic package already installed and working**
- **USB license device** (shipped after purchase confirmation)

---

## Step 1: Install Basic First

If you have not already installed the Basic package, do so now:

```
python setup_wizard.py
```

Verify Basic is working before proceeding. Start services and confirm the dashboard loads at `http://localhost:7777`.

---

## Step 2: Copy Pro Files

Copy all files from the Pro package into your Basic installation folder. This will add new files and overwrite existing ones with Pro-enhanced versions.

```
xcopy /E /Y pro\* C:\path\to\your\biznode\
```

Replace `C:\path\to\your\biznode\` with your actual installation path.

---

## Step 3: Run Pro Setup Wizard

```
python setup_wizard.py
```

The wizard will detect Pro files and configure your node accordingly. It sets `NODE_TIER=pro` in your `.env` file and enables all 24 features.

---

## Step 4: Insert USB License Device

Plug in your USB license device. The Ed25519 hardware-bound license supports up to 5 bots per node. The system will validate the device on startup.

To verify the license manually:

```
python services/license_validator.py --check
```

---

## Step 5: Configure .env

Open your `.env` file and add the following Pro-specific settings:

```
# Pro tier
NODE_TIER=pro

# Crypto wallet (Polygon network)
POLYGON_WALLET=0xYourWalletAddress
POLYGON_RPC_URL=https://polygon-rpc.com

# Stripe payments
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# BizChannel
BIZNODE_GROUP_ID=-100xxxxxxxxxx
OWNER_EMAIL=you@example.com
```

---

## Step 6: Start Services

```
python service_manager.py start
```

This starts the bot, dashboard, Qdrant, and all Pro services. Confirm everything is running:

```
python service_manager.py status
```

---

## Step 7: Configure BizChannel

Set the following in your `.env` file:

- `BIZNODE_GROUP_ID` -- Your Telegram group ID for BizChannel proposals
- `OWNER_EMAIL` -- Your email for receiving proposals and quotes
- `POLYGON_WALLET` -- Your wallet address for BZeUSD/MATIC payments

See [BIZCHANNEL.md](BIZCHANNEL.md) for the full BizChannel guide.

---

## Optional: Crypto Wallet Setup

To accept crypto payments via BZeUSD on Polygon:

1. Create or import a Polygon-compatible wallet.
2. Set `POLYGON_WALLET` in `.env` to your wallet address.
3. Set `POLYGON_RPC_URL` to a Polygon RPC endpoint.
4. Ensure your wallet has a small amount of MATIC for gas fees.

---

## Optional: Stripe Payment Processing

1. Create a Stripe account at https://stripe.com.
2. Get your secret key and webhook secret from the Stripe dashboard.
3. Set `STRIPE_SECRET_KEY` and `STRIPE_WEBHOOK_SECRET` in `.env`.
4. Configure your webhook endpoint in Stripe to point to your node.

---

## Optional: Affiliate Links

Set up your affiliate referral system via the bot:

```
/affiliate
```

This generates your unique referral link. Referral tracking and commissions are handled automatically.

---

## Verifying the Installation

After starting services, confirm Pro features are active:

```
python services/tier_manager.py --status
```

All 24 features should show as enabled. If any Pro features show as disabled, check that your USB license device is connected.

---

## Next Steps

- Read [BIZCHANNEL.md](BIZCHANNEL.md) to start using the ad marketplace.
- Read [TROUBLESHOOTING.md](TROUBLESHOOTING.md) if you run into issues.
- Contact biznodesupport@1bz.biz for priority support.
