# config.py # Fichier de configuration pour le backend ErnestMind 2.5 import os # --- Configuration Baserow (Nouveau) --- # Clés à définir dans les secrets d'environnement Hugging Face Space BASEROW_DATABASE_ID = os.environ.get("BASEROW_DATABASE_ID") PRIMARY_USERS_TABLE_ID = os.environ.get("PRIMARY_USERS_TABLE_ID") END_USERS_TABLE_ID = os.environ.get("END_USERS_TABLE_ID") # Le token d'accès API BASEROW_API_TOKEN = os.environ.get("BASEROW_API_TOKEN") # --- Configuration Stripe (Paiement) --- # Clés à définir dans les secrets d'environnement Hugging Face Space STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY") STRIPE_WEBHOOK_SECRET = os.environ.get("STRIPE_WEBHOOK_SECRET") # Clé Publique (utilisée par le Frontend, mais stockée ici pour référence) STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY") # --- Dictionnaire de Prix Central (Phase 1) --- # Contient toutes les informations nécessaires pour le Frontend et le Backend. # Les 'price_id' doivent correspondre aux IDs créés dans Stripe. PLANS_CONFIG = { # Plan Gratuit "free": { "title": "Gratuit", "baserow_value": "Free", # <--- NOUVEAU: Mettre la valeur EXACTE attendue par Baserow (ex: GRATUIT, Free, etc.) "description": "Idéal pour les tests et les petits projets.", "limit": 500, "price_monthly": 0.0, "price_annual": 0.0, "price_id_monthly": None, "price_id_annual": None, "currency": "EUR" }, # Plan Standard - Mensuel "standard_monthly": { "title": "Standard (Mensuel)", "description": "Pour les utilisateurs réguliers. Paiement mensuel.", "limit": 1000, "price_monthly": 19.99, "price_annual": 0.0, "price_id_monthly": "price_1OvXXXXXXX", # REMPLACER PAR VOTRE VRAI ID STRIPE "price_id_annual": None, "currency": "EUR" }, # Plan Standard - Annuel "standard_annual": { "title": "Standard (Annuel)", "description": "Pour les utilisateurs réguliers. Économisez 20% en payant à l'année.", "limit": 1000, "price_monthly": 0.0, "price_annual": 199.90, "price_id_monthly": None, "price_id_annual": "price_1OwYYYYYYY", # REMPLACER PAR VOTRE VRAI ID STRIPE "currency": "EUR" }, # Plan Pro - Mensuel "pro_monthly": { "title": "Pro (Mensuel)", "description": "Pour les professionnels et les projets importants. Paiement mensuel.", "limit": 2000, "price_monthly": 49.99, "price_annual": 0.0, "price_id_monthly": "price_1OxZZZZZZZ", # REMPLACER PAR VOTRE VRAI ID STRIPE "price_id_annual": None, "currency": "EUR" }, # Plan Pro - Annuel "pro_annual": { "title": "Pro (Annuel)", "description": "Pour les professionnels et les projets importants. Économisez 20% en payant à l'année.", "limit": 2000, "price_monthly": 0.0, "price_annual": 499.90, "price_id_monthly": None, "price_id_annual": "price_1OyAAAAAAA", # REMPLACER PAR VOTRE VRAI ID STRIPE "currency": "EUR" }, # Plan Illimité - Mensuel "illimited_monthly": { "title": "Illimité (Mensuel)", "description": "Sans aucune restriction, pour les grandes entreprises. Paiement mensuel.", "limit": float('inf'), "price_monthly": 99.99, "price_annual": 0.0, "price_id_monthly": "price_1OzBBBBBBB", # REMPLACER PAR VOTRE VRAI ID STRIPE "price_id_annual": None, "currency": "EUR" }, # Plan Illimité - Annuel "illimited_annual": { "title": "Illimité (Annuel)", "description": "Sans aucune restriction, pour les grandes entreprises. Économisez 20% en payant à l'année.", "limit": float('inf'), "price_monthly": 0.0, "price_annual": 999.90, "price_id_monthly": None, "price_id_annual": "price_1OzAACCCCC", # REMPLACER PAR VOTRE VRAI ID STRIPE "currency": "EUR" }, # Plan Spécial pour les End-users (pas listé sur la page de prix) "end_user": { "title": "End-User", "description": "Compte utilisateur créé par un client.", "limit": 0, "price_monthly": 0.0, "price_annual": 0.0, "price_id_monthly": None, "price_id_annual": None, "currency": "EUR" }, }