Major improvements: - Created startup orchestration system with health monitoring and graceful shutdown - Fixed user registration and login with simplified authentication flow - Rebuilt authentication forms from scratch with direct API integration - Implemented comprehensive debugging and error handling - Added Redis fallback functionality for disabled environments - Fixed CORS configuration for cross-origin frontend requests - Simplified password validation to 6+ characters (removed complexity requirements) - Added toast notifications at app level for better UX feedback - Created comprehensive startup/shutdown scripts with OODA methodology - Fixed database validation and connection issues - Implemented TokenService memory fallback when Redis is disabled Technical details: - New SimpleLoginForm.tsx and SimpleRegisterForm.tsx components - Enhanced CORS middleware with additional allowed origins - Simplified auth validators and removed strict password requirements - Added extensive logging and diagnostic capabilities - Fixed authentication middleware token validation - Implemented graceful Redis error handling throughout the stack - Created modular startup system with configurable health checks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
73 lines
No EOL
1.6 KiB
Text
73 lines
No EOL
1.6 KiB
Text
# Shattered Void MMO - Environment Configuration
|
|
|
|
# Environment
|
|
NODE_ENV=development
|
|
PORT=3000
|
|
LOG_LEVEL=debug
|
|
|
|
# Database Configuration
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_NAME=shattered_void_dev
|
|
DB_USER=postgres
|
|
DB_PASSWORD=s5d7dfs5e2q23
|
|
|
|
# Redis Configuration
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_PASSWORD=
|
|
REDIS_DB=0
|
|
|
|
# JWT Configuration
|
|
JWT_PLAYER_SECRET=player-secret-change-in-production
|
|
JWT_ADMIN_SECRET=admin-secret-change-in-production
|
|
JWT_REFRESH_SECRET=refresh-secret-change-in-production
|
|
JWT_PLAYER_EXPIRES_IN=24h
|
|
JWT_ADMIN_EXPIRES_IN=8h
|
|
JWT_REFRESH_EXPIRES_IN=7d
|
|
JWT_ISSUER=shattered-void-mmo
|
|
|
|
# Password Configuration
|
|
BCRYPT_SALT_ROUNDS=12
|
|
MIN_PASSWORD_LENGTH=8
|
|
MAX_PASSWORD_LENGTH=128
|
|
MIN_USERNAME_LENGTH=3
|
|
MAX_USERNAME_LENGTH=20
|
|
|
|
# Rate Limiting
|
|
RATE_LIMIT_WINDOW_MS=900000
|
|
RATE_LIMIT_MAX_REQUESTS=1000
|
|
DISABLE_RATE_LIMITING=false
|
|
|
|
# CORS Configuration
|
|
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001,http://127.0.0.1:3000,http://127.0.0.1:3001
|
|
CORS_CREDENTIALS=true
|
|
CORS_MAX_AGE=86400
|
|
|
|
# WebSocket Configuration
|
|
WEBSOCKET_CORS_ORIGIN=http://localhost:3000,http://localhost:3001
|
|
WEBSOCKET_PING_TIMEOUT=20000
|
|
WEBSOCKET_PING_INTERVAL=25000
|
|
WEBSOCKET_MAX_CONNECTIONS=1000
|
|
WEBSOCKET_MAX_BUFFER_SIZE=1000000
|
|
|
|
# Game Configuration
|
|
STARTING_RESOURCES_SCRAP=1000
|
|
STARTING_RESOURCES_ENERGY=500
|
|
MAX_COLONIES_PER_PLAYER=10
|
|
ENABLE_GAME_TICK=false
|
|
|
|
# Feature Flags
|
|
ENABLE_ADMIN_ROUTES=true
|
|
ENABLE_DEBUG_ENDPOINTS=true
|
|
BLOCK_DISPOSABLE_EMAILS=false
|
|
|
|
# Email Configuration (optional)
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM=noreply@shattered-void.com
|
|
|
|
# Request Configuration
|
|
REQUEST_SIZE_LIMIT=10mb |