#!/usr/bin/env python3 """ QR Code Manager - Main Application Entry Point A modern Flask web application for generating and managing QR codes with authentication. Features include: - Multiple QR code types (text, URL, WiFi, email, SMS, vCard) - Dynamic link pages for managing collections of links - URL shortener functionality with custom domains - Admin authentication with bcrypt password hashing - Docker deployment ready - Modern responsive web interface """ import os from dotenv import load_dotenv from app import create_app # Load environment variables from .env file load_dotenv() # Create Flask application app = create_app() if __name__ == '__main__': # Production vs Development configuration is_production = os.environ.get('FLASK_ENV') == 'production' app_domain = os.environ.get('APP_DOMAIN', 'localhost:5000') if is_production: print("🚀 QR Code Manager - Production Mode") print("â„šī¸ This should be run with Gunicorn in production!") print("īŋŊ Use: gunicorn -c gunicorn.conf.py main:app") print(f"🌐 Domain configured: {app_domain}") print("🔗 URL shortener available at: /s/") # In production, this file is used by Gunicorn as WSGI application # The Flask dev server should NOT be started in production else: print("đŸ› ī¸ Starting QR Code Manager in DEVELOPMENT mode") print("🔐 Admin user: admin") print("🔑 Default password: admin123") print(f"🌐 Domain configured: {app_domain}") print("🔗 URL shortener available at: /s/") app.run(host='0.0.0.0', port=5000, debug=True)