Environment Configuration
Heimerdingeris configured through environment variables stored in the.env file. This file is created by copying .env.example during installation.
Core Application Settings
Configure basic application behavior:.env
Application name displayed in the UI and emails (.env.example:1)
Environment type:
local, staging, or production (.env.example:2)Encryption key generated by
php artisan key:generate (.env.example:3)Used for encrypting sessions, cookies, and other sensitive data.Enable detailed error messages (.env.example:4)
Application timezone for timestamp storage and display (.env.example:5)
Base URL of your application (.env.example:6)Used for generating absolute URLs, email links, and asset paths.
Locale Settings
.env
Primary application language (.env.example:10)
Fallback language when translations are missing (.env.example:11)
Database Configuration
Configure MySQL database connection:.env
Database driver (currently only MySQL supported) (.env.example:48)
Database server hostname or IP address (.env.example:49)
MySQL server port (.env.example:50)
Database name (.env.example:51)Ensure this database exists and uses
utf8mb4 character set (config/database.php:24).Database username (.env.example:52)
Database password (.env.example:53)
Database Configuration Details
The database connection is configured inconfig/database.php:15-35 with the following settings:
- Character Set:
utf8mb4for full Unicode support including emojis - Collation:
utf8mb4_unicode_cifor case-insensitive comparisons - Connection Timeout: 15 seconds (config/database.php:31)
- Strict Mode: Enabled for data integrity (config/database.php:28)
Riot Games API Configuration
Configure integration with Riot Games services:.env
Your Riot Games API key (.env.example:28)Obtain from the Riot Developer Portal. Development keys expire after 24 hours; apply for a production key for permanent access.
User agent string for API requests (.env.example:32)Should identify your application to Riot’s servers as per their API guidelines.
Riot Games API has rate limits. Development keys allow 20 requests every 1 second and 100 requests every 2 minutes. Monitor your usage to avoid rate limiting.
External Service APIs
Configure additional data sources:.env
LMI (LeagueMeta Insights) API key (.env.example:19)Used for additional champion statistics (config/services.php:12-14).
Boris service endpoint URL (.env.example:20)
Authentication key for Boris service (.env.example:21)Boris provides additional League of Legends data (config/services.php:16-19).
Meraki Analytics secret key (.env.example:29)
Laravel Octane Configuration
Boost performance with Laravel Octane:.env
Octane server type (.env.example:25)Options:
swoole or roadrunner. Swoole recommended for best performance.Enable HTTPS for Octane server (.env.example:26)Set to
true if serving over HTTPS directly (typically handled by reverse proxy).Octane requires the Swoole PHP extension:
pecl install swoole. See Laravel Octane Documentation for installation details.Cloudflare Integration
Configure Cloudflare CDN and R2 storage:Zone Configuration
.env
Cloudflare Zone ID for cache purging (.env.example:34)Found in Cloudflare Dashboard > Overview > Zone ID (config/cloudflare.php:15)
Cloudflare API Bearer token (.env.example:35)Generate in Cloudflare Dashboard > API Tokens (config/cloudflare.php:16)
R2 Storage Configuration
.env
Default filesystem disk (.env.example:57)Options:
local, s3 (for R2), or other configured disksR2 access key ID (.env.example:65)
R2 secret access key (.env.example:66)
R2 bucket name (.env.example:67)
R2 API endpoint (.env.example:68)
Public URL for accessing R2 assets (.env.example:69)
Cloudflare R2 is used for storing champion images, skin splash arts, and other static assets. It’s S3-compatible and uses the
league/flysystem-aws-s3-v3 package (composer.json:23).Security Configuration
hCaptcha Setup
Protect forms from bots with hCaptcha:.env
hCaptcha secret key (.env.example:40)Get from hCaptcha Dashboard
hCaptcha site key (.env.example:41)Public key embedded in forms
Honeypot Configuration
.env
Honeypot field name for spam prevention (.env.example:38)Uses
spatie/laravel-honeypot (composer.json:29) to detect spam bots.Authentication Route
.env
Custom login route path (.env.example:31)Obscure the login URL for additional security.
Logging and Monitoring
Log Configuration
.env
Primary logging channel (.env.example:43)
Stack channels for multi-channel logging (.env.example:44)Logs to both file and Discord webhook
Minimum log level (.env.example:46)Options:
emergency, alert, critical, error, warning, notice, info, debugSet to
error or warning in production to reduce log noise.Discord webhook for error notifications (.env.example:8)Powered by
marvinlabs/laravel-discord-logger (composer.json:24)Discord Alerts
.env
Webhook for application alerts (.env.example:37)Uses
spatie/laravel-discord-alerts (composer.json:28) for important notifications.Feature Flags
.env
Enable staging mode (.env.example:23)Shows staging indicators in the UI.
Enable sale rotation fetching (.env.example:95)Set to
true to fetch live sale data from external APIs. When false, shows maintenance message.Session Configuration
.env
Session storage driver (.env.example:59)Options:
file, cookie, database, redis, memcachedSession lifetime in minutes (.env.example:60)
Encrypt session data (.env.example:61)
Cache Configuration
.env
Cache driver (.env.example:56)Options:
file, redis, memcached, databaseFor production, Redis is recommended for better performance. Install Redis and set
CACHE_STORE=redis.Queue Configuration
.env
Queue driver (.env.example:58)Options:
sync, database, redis, sqsUse
sync for development (processes immediately). For production, use database or redis with queue workers.Mail Configuration
.env
Mail transport driver (.env.example:77)
SMTP server hostname (.env.example:78)Mailpit is a local mail testing tool for development.
Default sender email address (.env.example:83)
Analytics Configuration
.env
Google Analytics 4 Measurement ID (.env.example:36)Track website analytics and user behavior.
Configuration Caching
For production deployments, cache your configuration:Environment-Specific Configuration
Local Development
.env
Staging
.env
Production
.env
Configuration Files Reference
Key configuration files inconfig/ directory:
config/app.php
config/app.php
Core application settings including timezone, locale, and service providers
config/database.php
config/database.php
Database connections and migration settings (config/database.php:1)
config/services.php
config/services.php
Third-party service credentials including LMI and Boris APIs (config/services.php:1)
config/cloudflare.php
config/cloudflare.php
Cloudflare zone and cache purging configuration (config/cloudflare.php:1)
config/octane.php
config/octane.php
Laravel Octane server configuration
config/HCaptcha.php
config/HCaptcha.php
hCaptcha integration settings
config/honeypot.php
config/honeypot.php
Spam prevention honeypot configuration
Validation
Verify your configuration:Troubleshooting
Configuration not updating
Configuration not updating
Clear the config cache:
Database connection failed
Database connection failed
Verify credentials and ensure MySQL is running:Check that the database exists:
API rate limiting errors
API rate limiting errors
Monitor your Riot API usage and consider:
- Implementing caching for API responses
- Requesting a production API key for higher rate limits
- Adding delays between requests
Next Steps
Installation Guide
Return to installation steps if you need to set up the application
Contributing
Learn how to contribute to Heimerdinger.lol