feat: first back recording and display (#12)
All checks were successful
pipeline / lint-and-format (push) Successful in 4m35s
pipeline / build-and-push-images (push) Successful in 1m39s

Record first backs, group them by item sets and show the most popular ones, with gold and %, in the frontend.
This commit is contained in:
2026-04-28 20:10:20 +02:00
parent 7712abe3f0
commit db2ca353c5
6 changed files with 452 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ declare global {
suppItems: Array<{ count: number; data: number }>
startItems: Array<{ count: number; data: number }>
pickrate: number
firstBacks?: FirstBackGroup[]
}
/**
@@ -56,6 +57,32 @@ declare global {
championAlias: string
}
/**
* Represents an item in a first back item set
*/
interface FirstBackItemSetEntry {
itemId: number
count: number
}
/**
* Represents an item set (combination of items)
*/
interface ItemSet {
items: FirstBackItemSetEntry[]
totalGold: number
}
/**
* Represents a grouped first back by item set
*/
interface FirstBackGroup {
itemSet: ItemSet
count: number
pickrate: number
avgTimestamp: number
}
/**
* Represents lane-specific champion data
*/