Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cursor/rules/environment-configuration.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

46 changes: 46 additions & 0 deletions .env.development.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Development Environment Configuration
# Copy this file to .env.development and modify as needed

# Application Settings
APP_NAME=MyApp
APP_ENV=development
APP_DEBUG=true
APP_PORT=8000
APP_SECRET_KEY=dev_secret_key_replace_in_real_file

# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_dev_db
DB_USER=dev_user
DB_PASSWORD=dev_password
DB_SSL=false
DB_MAX_CONNECTIONS=10

# API Keys and External Services
# Use development/test keys for external services
OPENAI_API_KEY=your_dev_openai_api_key
ANTHROPIC_API_KEY=your_dev_anthropic_api_key
EXTERNAL_SERVICE_URL=https://dev-api.example.com

# Logging and Monitoring
LOG_LEVEL=debug
LOG_FILE=logs/dev-app.log
ENABLE_METRICS=true
METRICS_PORT=9090

# Security Settings
SSL_CERT_PATH=
SSL_KEY_PATH=
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ORIGINS=http://localhost:3000

# Feature Flags
ENABLE_FEATURE_X=true
ENABLE_FEATURE_Y=true

# Cache Settings
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=1
CACHE_TTL=60
43 changes: 42 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
OPENAI_API_KEY=your_openai_api_key_here
# Application Settings
APP_NAME=MyApp
APP_ENV=development
APP_DEBUG=true
APP_PORT=8000
APP_SECRET_KEY=replace_with_secure_random_key

# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_db
DB_USER=db_user
DB_PASSWORD=db_password
DB_SSL=false
DB_MAX_CONNECTIONS=10

# API Keys and External Services
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
EXTERNAL_SERVICE_URL=https://api.example.com

# Logging and Monitoring
LOG_LEVEL=info
LOG_FILE=logs/app.log
ENABLE_METRICS=false
METRICS_PORT=9090

# Security Settings
SSL_CERT_PATH=
SSL_KEY_PATH=
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ORIGINS=http://localhost:3000

# Feature Flags
ENABLE_FEATURE_X=false
ENABLE_FEATURE_Y=true

# Cache Settings
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
CACHE_TTL=3600
52 changes: 52 additions & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Production Environment Configuration
# Copy this file to .env.production and modify as needed

# Application Settings
APP_NAME=MyApp
APP_ENV=production
APP_DEBUG=false
APP_PORT=8000
APP_SECRET_KEY=prod_secret_key_replace_with_secure_value

# Database Configuration
DB_HOST=db.production.example.com
DB_PORT=5432
DB_NAME=myapp_prod_db
DB_USER=prod_user
DB_PASSWORD=prod_password_replace_with_secure_value
DB_SSL=true
DB_MAX_CONNECTIONS=100

# API Keys and External Services
# Use production keys for external services
OPENAI_API_KEY=your_prod_openai_api_key
ANTHROPIC_API_KEY=your_prod_anthropic_api_key
EXTERNAL_SERVICE_URL=https://api.example.com

# Logging and Monitoring
LOG_LEVEL=warning
LOG_FILE=/var/log/myapp/app.log
ENABLE_METRICS=true
METRICS_PORT=9090

# Security Settings
SSL_CERT_PATH=/etc/ssl/certs/myapp.crt
SSL_KEY_PATH=/etc/ssl/private/myapp.key
ALLOWED_HOSTS=myapp.example.com,api.myapp.example.com
CORS_ORIGINS=https://myapp.example.com

# Feature Flags
ENABLE_FEATURE_X=true
ENABLE_FEATURE_Y=true

# Cache Settings
REDIS_HOST=redis.production.example.com
REDIS_PORT=6379
REDIS_DB=0
CACHE_TTL=3600

# Production-specific Settings
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_PERIOD=60
ENABLE_REQUEST_LOGGING=true
51 changes: 51 additions & 0 deletions .env.test.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Test Environment Configuration
# Copy this file to .env.test and modify as needed

# Application Settings
APP_NAME=MyApp
APP_ENV=test
APP_DEBUG=true
APP_PORT=8001
APP_SECRET_KEY=test_secret_key_replace_in_real_file

# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_test_db
DB_USER=test_user
DB_PASSWORD=test_password
DB_SSL=false
DB_MAX_CONNECTIONS=5

# API Keys and External Services
# Use mock services or test keys for external services
OPENAI_API_KEY=your_test_openai_api_key
ANTHROPIC_API_KEY=your_test_anthropic_api_key
EXTERNAL_SERVICE_URL=https://test-api.example.com

# Logging and Monitoring
LOG_LEVEL=error
LOG_FILE=logs/test-app.log
ENABLE_METRICS=false
METRICS_PORT=9091

# Security Settings
SSL_CERT_PATH=
SSL_KEY_PATH=
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ORIGINS=http://localhost:3000

# Feature Flags
ENABLE_FEATURE_X=true
ENABLE_FEATURE_Y=true

# Cache Settings
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=2
CACHE_TTL=10

# Test-specific Settings
TEST_TIMEOUT=30
MOCK_EXTERNAL_SERVICES=true
SKIP_SLOW_TESTS=false
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,33 @@ session_*.json
!.cursor/snippets/
!.cursor/metrics/
!.cursor/README.md

# Environment files
.env.development
.env.test
.env.production
.env.backup.*

# Keep example files
!.env.example
!.env.*.example

# Logs
logs/

# Virtual Environment
venv/
.venv/
ENV/

# IDE files
.idea/
.vscode/
*.swp
*.swo
.DS_Store

# Temporary files
.commit_msg
.pr_body
.temp_*
Loading
Loading