How wjz-p/sona works
Sona is a Pengu Loader plugin that enhances the League of Legends client. Users open its panel to configure features, inspect match history and analysis, manage rewards and settings, and use tools; registered runtime features also modify client flows and UI. The architecture separates startup and feature dispatch, match intelligence and loadouts, client customization, and the React panel. Some capabilities are documented but their individual implementation files were not sampled, so those branches are linked only where the README supports them.
Main entry points: index.tsx Plugin startup · opgg-build-recommendation.ts OP.GG loadouts · App.tsx Panel application · lcu.ts LCU client
Components 24
Plugin runtime
- Plugin startup
src/index.tsx - Feature registry
src/lib/features.ts - DOM injections
src/lib/injections.ts - DOM observer
src/lib/InjectorManager.ts
Match intelligence
- Match features
src/lib/features - Match history
src/components/ui/MatchHistoryModal.tsx - Match details
src/components/ui/MatchDetailModal.tsx - Game analysis
src/components/ui/GameAnalysisModal.tsx - OP.GG loadouts
src/lib/features/opgg-build-recommendation.ts - Loadout panel
src/components/ui/OpggBuildRecommendationPanel.tsx
Client customization
- Beautification features
src/lib/features/beautify-client - Custom avatars
src/lib/features/beautify-client/custom-avatar.ts - Avatar status sync
src/lib/features/beautify-client/avatar-status-sync.ts
Sona panel
- Panel application
src/App.tsx - Tools page
src/components/pages/ToolsPage.tsx - Beautify page
src/components/pages/BeautifyPage.tsx - Rewards page
src/components/pages/RewardsPage.tsx
Client services
- LCU client
src/lib/lcu.ts - Persistent settings
src/lib/store.ts - OP.GG data API
src/lib/opgg-api.ts - ARAM.GG data API
src/lib/aramgg-api.ts - Game asset maps
src/lib/assets.ts
Other components
- Player
- Pengu Loader
Connections 32
- Player → Panel application: opens panel
README.md - Pengu Loader → Plugin startup: loads plugin
src/index.tsx - Plugin startup → Feature registry: initializes
src/index.tsx - Plugin startup → DOM injections: registers
src/index.tsx - Plugin startup → Panel application: mounts
src/index.tsx - DOM injections → DOM observer: uses
- Feature registry → Match features: initializes
src/lib/features.ts - Feature registry → Beautification features: initializes
src/lib/features.ts - Player → Match history: queries matches
README.md - Match history → Match details: opens details
src/components/ui/MatchHistoryModal.tsx - Player → Game analysis: requests analysis
README.md - Match features → Game analysis: opens analysis
- Match features → OP.GG loadouts: enables
- OP.GG loadouts → Loadout panel: renders
src/lib/features/opgg-build-recommendation.ts - OP.GG loadouts → OP.GG data API: fetches builds
src/lib/features/opgg-build-recommendation.ts - OP.GG loadouts → ARAM.GG data API: fetches mode data
src/lib/features/opgg-build-recommendation.ts - OP.GG loadouts → LCU client: reads client state
src/lib/features/opgg-build-recommendation.ts - OP.GG loadouts → Persistent settings: reads settings
src/lib/features/opgg-build-recommendation.ts - Loadout panel → Game asset maps: uses asset maps
src/components/ui/OpggBuildRecommendationPanel.tsx - Beautification features → Custom avatars: includes
src/lib/features/beautify-client/custom-avatar.ts - Custom avatars → Avatar status sync: decodes status
src/lib/features/beautify-client/custom-avatar.ts - Custom avatars → LCU client: updates client
src/lib/features/beautify-client/custom-avatar.ts - Player → Beautify page: customizes client
README.md - Beautify page → Persistent settings: reads settings
src/components/pages/BeautifyPage.tsx - Panel application → Tools page: routes to
src/App.tsx - Panel application → Beautify page: routes to
src/App.tsx - Panel application → Rewards page: routes to
src/App.tsx - Player → Rewards page: claims rewards
README.md - Tools page → Match history: opens history
src/components/pages/ToolsPage.tsx - Tools page → LCU client: uses client API
src/components/pages/ToolsPage.tsx - Plugin startup → LCU client: binds context
src/index.tsx - Plugin startup → Game asset maps: initializes maps
src/index.tsx