MOCK DATA REMOVED: - Removed ALL hardcoded auction data from auctions.py - Now uses real-time scraping from ExpiredDomains.net - Database stores scraped auctions (domain_auctions table) - Scraping runs hourly via scheduler (:30 each hour) AUCTION SCRAPER SERVICE: - Web scraping from ExpiredDomains.net (aggregator) - Rate limiting per platform (10 req/min) - Database caching to minimize requests - Cleanup of ended auctions (auto-deactivate) - Scrape logging for monitoring STRIPE INTEGRATION: - Full payment flow: Checkout → Webhook → Subscription update - Customer Portal for managing subscriptions - Price IDs configurable via env vars - Handles: checkout.completed, subscription.updated/deleted, payment.failed EMAIL SERVICE (SMTP): - Beautiful HTML email templates with pounce branding - Domain available alerts - Price change notifications - Subscription confirmations - Weekly digest emails - Configurable via SMTP_* env vars NEW SUBSCRIPTION TIERS: - Scout (Free): 5 domains, daily checks - Trader (€19/mo): 50 domains, hourly, portfolio, valuation - Tycoon (€49/mo): 500+ domains, realtime, API, bulk tools DATABASE CHANGES: - domain_auctions table for scraped data - auction_scrape_logs for monitoring - stripe_customer_id on users - stripe_subscription_id on subscriptions - portfolio_domain relationships fixed ENV VARS ADDED: - STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET - STRIPE_PRICE_TRADER, STRIPE_PRICE_TYCOON - SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD - SMTP_FROM_EMAIL, SMTP_FROM_NAME
91 lines
2.5 KiB
Plaintext
91 lines
2.5 KiB
Plaintext
# =================================
|
|
# pounce Backend Configuration
|
|
# =================================
|
|
# Copy this file to .env and update values
|
|
|
|
# =================================
|
|
# Database
|
|
# =================================
|
|
# SQLite (Development)
|
|
DATABASE_URL=sqlite+aiosqlite:///./domainwatch.db
|
|
|
|
# PostgreSQL (Production)
|
|
# DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/pounce
|
|
|
|
# =================================
|
|
# Security
|
|
# =================================
|
|
# IMPORTANT: Generate a secure random key for production!
|
|
# Use: python -c "import secrets; print(secrets.token_hex(32))"
|
|
SECRET_KEY=your-super-secret-key-change-this-in-production-min-32-characters
|
|
|
|
# JWT Settings
|
|
ACCESS_TOKEN_EXPIRE_MINUTES=10080
|
|
|
|
# CORS Origins (comma-separated)
|
|
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
|
|
|
|
# =================================
|
|
# Stripe Payments
|
|
# =================================
|
|
# Get these from https://dashboard.stripe.com/apikeys
|
|
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
|
|
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
|
|
|
|
# Price IDs from Stripe Dashboard (Products > Prices)
|
|
STRIPE_PRICE_TRADER=price_xxxxxxxxxxxxxx
|
|
STRIPE_PRICE_TYCOON=price_xxxxxxxxxxxxxx
|
|
|
|
# =================================
|
|
# SMTP Email Configuration
|
|
# =================================
|
|
# Gmail Example:
|
|
# SMTP_HOST=smtp.gmail.com
|
|
# SMTP_PORT=587
|
|
# SMTP_USER=your-email@gmail.com
|
|
# SMTP_PASSWORD=your-app-password (not your Gmail password!)
|
|
#
|
|
# Mailgun Example:
|
|
# SMTP_HOST=smtp.mailgun.org
|
|
# SMTP_PORT=587
|
|
# SMTP_USER=postmaster@your-domain.com
|
|
# SMTP_PASSWORD=your-mailgun-smtp-password
|
|
#
|
|
# AWS SES Example:
|
|
# SMTP_HOST=email-smtp.eu-central-1.amazonaws.com
|
|
# SMTP_PORT=587
|
|
# SMTP_USER=your-ses-smtp-user
|
|
# SMTP_PASSWORD=your-ses-smtp-password
|
|
|
|
SMTP_HOST=smtp.gmail.com
|
|
SMTP_PORT=587
|
|
SMTP_USER=your-email@gmail.com
|
|
SMTP_PASSWORD=your-app-password
|
|
SMTP_FROM_EMAIL=noreply@pounce.ch
|
|
SMTP_FROM_NAME=pounce
|
|
SMTP_USE_TLS=true
|
|
|
|
# =================================
|
|
# Scheduler Settings
|
|
# =================================
|
|
# Domain availability check interval (hours)
|
|
SCHEDULER_CHECK_INTERVAL_HOURS=24
|
|
|
|
# TLD price scraping interval (hours)
|
|
SCHEDULER_TLD_SCRAPE_INTERVAL_HOURS=24
|
|
|
|
# Auction scraping interval (hours)
|
|
SCHEDULER_AUCTION_SCRAPE_INTERVAL_HOURS=1
|
|
|
|
# =================================
|
|
# Application Settings
|
|
# =================================
|
|
# Environment: development, staging, production
|
|
ENVIRONMENT=development
|
|
|
|
# Debug mode (disable in production!)
|
|
DEBUG=true
|
|
|
|
# Site URL (for email links)
|
|
SITE_URL=http://localhost:3000
|