first commit

This commit is contained in:
2025-11-24 23:10:55 -06:00
commit 8315fa51c9
279 changed files with 74600 additions and 0 deletions

64
api/.env.example Normal file
View File

@@ -0,0 +1,64 @@
# Flask Configuration
FLASK_ENV=development
FLASK_APP=app
SECRET_KEY=your-secret-key-here-change-in-production
# Application Configuration
APP_NAME=Code of Conquest
APP_VERSION=0.1.0
DEBUG=True
# Redis Configuration
REDIS_URL=redis://localhost:6379/0
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
# Appwrite Configuration
APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_PROJECT_ID=your-project-id-here
APPWRITE_API_KEY=your-api-key-here
APPWRITE_DATABASE_ID=main
# Required Appwrite Collections:
# - characters
# - game_sessions
# - ai_usage_logs (for usage tracking - Task 7.13)
# AI Configuration (Replicate API - all models)
# All AI models (Llama-3, Claude Haiku/Sonnet/Opus) are accessed via Replicate
REPLICATE_API_TOKEN=your-replicate-token-here
REPLICATE_MODEL=meta/meta-llama-3-8b-instruct
# Available models:
# - meta/meta-llama-3-8b-instruct (Free tier)
# - anthropic/claude-3-haiku (Basic tier)
# - anthropic/claude-3.5-sonnet (Premium tier)
# - anthropic/claude-3-opus (Elite tier)
# Logging Configuration
LOG_LEVEL=DEBUG
LOG_FORMAT=json
# Rate Limiting
RATE_LIMIT_ENABLED=True
RATE_LIMIT_STORAGE_URL=redis://localhost:6379/1
# CORS Configuration
CORS_ORIGINS=http://localhost:5000,http://127.0.0.1:5000
# Session Configuration
SESSION_TIMEOUT_MINUTES=30
AUTO_SAVE_INTERVAL=5
# AI Configuration
AI_DEFAULT_TIMEOUT=30
AI_MAX_RETRIES=3
AI_COST_ALERT_THRESHOLD=100.00
# Marketplace Configuration
MARKETPLACE_AUCTION_CHECK_INTERVAL=300
# Security
ALLOWED_HOSTS=localhost,127.0.0.1
# Testing (optional)
TESTING=False