diff --git a/.env.example b/.env.example index aa58bac..bea4eab 100644 --- a/.env.example +++ b/.env.example @@ -1,83 +1,22 @@ -# studspider Environment Configuration +# Brickset.com credentials - LEGO database for pricing, images, UPC codes +BRICKSET_USERNAME = "your_brickset_username" +BRICKSET_PASS = "your_brickset_password" +BRICKSET_API_KEY = "your_brickset_api_key" -# ============================================================================ -# Square API Configuration -# ============================================================================ +# Square environment - "sandbox" for testing, "production" for live store +SQUARE_ENV = "sandbox" # or "production" -# Environment: "production" or "sandbox" -SQUARE_ENV=sandbox +SQUARE_WEBHOOK_URL = "https://yourdomain.com/hook" -# Sandbox credentials -SANDBOX_SQUARE_APP_ID=your_sandbox_app_id -SANDBOX_SQUARE_TOKEN=your_sandbox_access_token +# Sandbox credentials - test environment (fake data, safe for development) +SANDBOX_SQUARE_APP_ID = "your_sandbox_app_id" +SANDBOX_SQUARE_TOKEN = "your_sandbox_access_token" +SANDBOX_SQUARE_WEBHOOK_INVENTORY_ID = "your_sandbox_webhook_signature_key" -# Production credentials -PROD_SQUARE_APP_ID=your_production_app_id -PROD_SQUARE_TOKEN=your_production_access_token +# Production credentials - live store (real inventory and sales) +PROD_SQUARE_APP_ID = "your_production_app_id" +PROD_SQUARE_TOKEN = "your_production_access_token" +PROD_SQUARE_WEBHOOK_INVENTORY_ID = "your_production_webhook_signature_key" -# Square LEGO category ID (find this in Square Dashboard) -SQUARE_LEGO_CAT_ID=your_lego_category_id - -# ============================================================================ -# Brickset API Configuration -# ============================================================================ - -BRICKSET_USERNAME=your_brickset_username -BRICKSET_PASS=your_brickset_password -BRICKSET_API_KEY=your_brickset_api_key - -# ============================================================================ -# SSL Certificate Configuration (Optional) -# ============================================================================ - -# NOTE: Only needed if running HTTPS directly in Python (not recommended) -# For production, use nginx reverse proxy with Let's Encrypt instead -# nginx handles SSL/TLS, your Python app runs HTTP internally - -# Path to SSL certificate in PEM format (if running HTTPS directly) -# SSL_CERT_PATH=/path/to/cert.pem - -# Path to SSL private key in PEM format (if running HTTPS directly) -# SSL_KEY_PATH=/path/to/key.pem - -# ============================================================================ -# Square Webhook Signature Verification -# ============================================================================ - -# CRITICAL: Get these from Square Developer Dashboard → Webhooks -# 1. Go to https://developer.squareup.com/apps -# 2. Select your application -# 3. Click "Webhooks" section -# 4. Create webhook subscription (Notification URL + Events) -# 5. Copy the Signature Key that Square displays - -# Signature key from Square Dashboard (a string like "asdf1234") -SQUARE_WEBHOOK_SIGNATURE_KEY=your_webhook_signature_key_from_square - -# Your webhook notification URL (must match EXACTLY what's in Square Dashboard) -# This should be your public HTTPS URL (through nginx) -# Example: https://yourdomain.com/hook -SQUARE_WEBHOOK_URL=https://yourdomain.com/hook - -# ============================================================================ -# Server Configuration (Optional) -# ============================================================================ - -# Default host and port (can override with command line args) -# SERVER_HOST=0.0.0.0 -# SERVER_PORT=7432 -# SERVER_HOOK_PORT=8080 - -# ============================================================================ -# Usage Examples -# ============================================================================ - -# Basic HTTP server (recommended with nginx): -# python src/test_server.py -# -# With SSL from .env: -# Set SSL_CERT_PATH and SSL_KEY_PATH above, then: -# python src/test_server.py --hook-port 8443 --hook-ssl-only -# -# Override SSL from command line: -# python src/test_server.py --ssl-cert /custom/cert.pem --ssl-key /custom/key.pem +# Category ID for LEGO items in Square catalog (find in Dashboard → Items → Categories) +SQUARE_LEGO_CAT_ID = "your_lego_category_id" \ No newline at end of file