Files
vynl/backend/app/core/config.py
root b97955d004 Add Stripe subscription billing integration
- Add stripe_customer_id and stripe_subscription_id fields to User model
- Add Stripe config settings (secret key, publishable key, price ID, webhook secret)
- Create billing API endpoints: checkout session, webhook handler, portal, status
- Add frontend Billing page with upgrade/manage subscription UI
- Add billing route and Pro nav link
- Add stripe dependency to requirements
2026-03-30 21:38:40 -05:00

42 lines
1.0 KiB
Python

from pydantic_settings import BaseSettings
class Settings(BaseSettings):
APP_NAME: str = "Vynl"
DEBUG: bool = False
SECRET_KEY: str = "change-me-in-production"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 7 days
# Database
DATABASE_URL: str = "postgresql+asyncpg://vynl:vynl@localhost:5432/vynl"
DATABASE_URL_SYNC: str = "postgresql://vynl:vynl@localhost:5432/vynl"
# Redis
REDIS_URL: str = "redis://localhost:6379/0"
# Spotify
SPOTIFY_CLIENT_ID: str = ""
SPOTIFY_CLIENT_SECRET: str = ""
SPOTIFY_REDIRECT_URI: str = "http://localhost:5173/auth/spotify/callback"
# Claude API
ANTHROPIC_API_KEY: str = ""
# Stripe
STRIPE_SECRET_KEY: str = ""
STRIPE_PUBLISHABLE_KEY: str = ""
STRIPE_PRICE_ID: str = ""
STRIPE_WEBHOOK_SECRET: str = ""
# Frontend
FRONTEND_URL: str = "http://localhost:5173"
# Rate limits (free tier)
FREE_DAILY_RECOMMENDATIONS: int = 10
FREE_MAX_PLAYLISTS: int = 1
model_config = {"env_file": ".env", "extra": "ignore"}
settings = Settings()