Features: - Add useAuth composable with OAuth flow and token management - Add useStarter composable with API integration and dev mock fallback - Implement app auth initialization blocking navigation until ready - Complete StarterSelectionPage with 5 themed deck options Bug fixes: - Fix CORS by adding localhost:3001 to allowed origins - Fix OAuth URL to include redirect_uri parameter - Fix emoji rendering in nav components (use actual chars, not escapes) - Fix requireStarter guard timing by allowing navigation from /starter - Fix starter "already selected" detection for 400 status code Documentation: - Update dev-server skill to use `docker compose` (newer CLI syntax) - Update .env.example with port 3001 in CORS comment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
85 lines
3.2 KiB
Plaintext
85 lines
3.2 KiB
Plaintext
# Mantimon TCG Backend - Environment Configuration
|
|
# Copy this file to .env and customize for your environment
|
|
#
|
|
# Usage:
|
|
# cp .env.example .env
|
|
# # Edit .env with your values
|
|
|
|
# =============================================================================
|
|
# ENVIRONMENT
|
|
# =============================================================================
|
|
# Options: dev, staging, prod
|
|
ENVIRONMENT=dev
|
|
|
|
# Enable debug mode (auto-enabled in dev)
|
|
DEBUG=true
|
|
|
|
# =============================================================================
|
|
# DATABASE (PostgreSQL)
|
|
# =============================================================================
|
|
# Format: postgresql+asyncpg://user:password@host:port/database
|
|
# Note: Port 5433 to avoid conflicts with other Postgres instances
|
|
DATABASE_URL=postgresql+asyncpg://mantimon:mantimon@localhost:5433/mantimon
|
|
|
|
# Connection pool settings
|
|
DATABASE_POOL_SIZE=5
|
|
DATABASE_MAX_OVERFLOW=10
|
|
|
|
# Echo SQL statements (useful for debugging)
|
|
DATABASE_ECHO=false
|
|
|
|
# =============================================================================
|
|
# REDIS
|
|
# =============================================================================
|
|
# Format: redis://host:port/db
|
|
# Note: Port 6380 to avoid conflicts with other Redis instances
|
|
REDIS_URL=redis://localhost:6380/0
|
|
|
|
# Max connections in pool
|
|
REDIS_MAX_CONNECTIONS=10
|
|
|
|
# =============================================================================
|
|
# SECURITY
|
|
# =============================================================================
|
|
# IMPORTANT: Change this in production!
|
|
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
|
|
SECRET_KEY=dev-secret-key-change-in-production
|
|
|
|
# JWT settings
|
|
JWT_ALGORITHM=HS256
|
|
JWT_EXPIRE_MINUTES=30
|
|
JWT_REFRESH_EXPIRE_DAYS=7
|
|
|
|
# =============================================================================
|
|
# OAUTH - GOOGLE
|
|
# =============================================================================
|
|
# Get credentials from: https://console.cloud.google.com/apis/credentials
|
|
# GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
|
|
# GOOGLE_CLIENT_SECRET=your-client-secret
|
|
|
|
# =============================================================================
|
|
# OAUTH - DISCORD
|
|
# =============================================================================
|
|
# Get credentials from: https://discord.com/developers/applications
|
|
# DISCORD_CLIENT_ID=your-client-id
|
|
# DISCORD_CLIENT_SECRET=your-client-secret
|
|
|
|
# =============================================================================
|
|
# CORS
|
|
# =============================================================================
|
|
# Comma-separated list of allowed origins
|
|
# Default: http://localhost:3000,http://localhost:3001,http://localhost:5173
|
|
# CORS_ORIGINS=http://localhost:3000,http://localhost:3001,http://localhost:5173
|
|
|
|
# =============================================================================
|
|
# GAME SETTINGS
|
|
# =============================================================================
|
|
# Turn timeout in seconds (default: 120 = 2 minutes)
|
|
TURN_TIMEOUT_SECONDS=120
|
|
|
|
# =============================================================================
|
|
# CARD DATA
|
|
# =============================================================================
|
|
# Path to card JSON files (relative to backend/)
|
|
CARD_DATA_PATH=data/cards
|