Application Architecture
Heimdinger.lol is built on Laravel 11 with a modern, maintainable MVC (Model-View-Controller) architecture. The application follows Laravel best practices and conventions to provide a clean separation of concerns.Technology Stack
- Framework: Laravel 11 (PHP 8.2+)
- Database: MySQL
- Frontend: Blade Templates, TailwindCSS, Vite
- Server: Laravel Octane (Swoole/RoadRunner)
- Caching: File-based cache with support for Redis
- Monitoring: Laravel Pulse
Directory Structure
The application follows Laravel’s standard directory structure with domain-specific organization:Key Directories
Controllers
Controllers
Controllers handle HTTP requests and coordinate between models and views. Each controller focuses on a specific resource:
ChampionController.php- Champion listing and detailsChampionSkinController.php- Skin browsing and filteringSummonerIconController.php- Summoner icon catalogPostsController.php- Blog posts from SheetsSaleController.php- Sale rotation data
Models
Models
Eloquent models represent database tables and relationships:
Champion- Champion data with skins, lanes, and streamersChampionSkin- Skin information and chromasChampionRoles- Champion lane dataSummonerIcon- Summoner icon assetsSummonerEmote- Emote assetsStreamer- Featured streamers per champion
Services
Services
Services encapsulate complex business logic:
BorisStaticDataClient- Fetches champion data from Boris API with Meraki Analytics fallback
View Components
View Components
Blade components for reusable UI elements organized by feature:
Champions/- Champion-related componentsSkins/- Skin display componentsIcons/- Icon grid componentsPosts/- Blog post componentshome/- Homepage components
MVC Pattern
Request Flow
Route Definition
Routes are defined in
routes/web.php using Laravel’s expressive routing:routes/web.php
Controller Processing
Controllers receive the request, interact with models, and return views:
app/Http/Controllers/ChampionController.php:28
Model Interaction
Eloquent models handle database queries and relationships:
app/Models/Champion.php:82
Data Flow
Champion Data Pipeline
Caching Strategy
The application uses aggressive caching to minimize database queries:Cache keys are scoped per resource to allow selective invalidation when data updates.
Model Relationships
The application uses Eloquent relationships to model data connections:Example: Loading Champion with Relationships
app/Http/Controllers/ChampionController.php:32
Route Model Binding
Laravel’s route model binding automatically resolves models using slugs:app/Models/Champion.php:77
/champion/aatrox instead of /champion/1.
Service Provider Pattern
TheAppServiceProvider bootstraps application services:
app/Providers/AppServiceProvider.php:38
Key Registrations
- Authorization: Pulse access control for admin users
- Rate Limiting: API throttling (60 requests/minute)
- Route Bindings: Custom model resolution for blog posts via Sheets
Next Steps
Data Sources
Learn how the app integrates with Riot API, DataDragon, and Meraki Analytics
Artisan Commands
Explore available CLI commands for maintenance and deployment