Skip to main content

Leaderboards

Overview

The leaderboard ranks members by their points balance. Multiple leaderboard types are available: seasonal RP, all-time КТ, and community car ratings. Results are cached for 10 minutes and evicted nightly after rank recalculation.


Leaderboard Types

TypeSorted ByResets
RP_SEASONALCurrent season RPAnnually (January 1st)
KT_ALLTIMEAll-time КТ totalNever
CAR_RATINGAverage car star ratingNever
SEASON_ARCHIVERP from past seasonsHistorical view

Workflow


Step-by-Step: View the Leaderboard

  1. Navigate to Leaderboard (/leaderboard).
  2. Select the leaderboard type from the tabs: Seasonal RP / All-time КТ / Car Ratings.
  3. The top 50 members are shown with rank badge, name, and score.
  4. If you are logged in, your position is shown even if you are outside the top 50.
  5. For past seasons, select Season Archive and choose the year.

Seasonal Reset

Every January 1st at 00:05 UTC, the SeasonResetService runs:

  1. Archives each member's current RP to SeasonArchiveEntity (one row per user per year).
  2. Resets all RP balances to 0.
  3. A reminder notification is sent December 25th at 12:00 UTC: "The season ends in 7 days — earn more points before the reset!".

Application Properties

SchedulerScheduleLockDescription
RankCalculationServiceDaily 02:00 UTCrank-recalculationEvicts leaderboard cache after rank updates
SeasonResetServiceJan 1 00:05 UTCseason-resetArchives RP + resets seasonal scores
SeasonResetReminderJobDec 25 12:00 UTCseason-reset-reminderNotifies members of upcoming season end

Security Notes

  • Leaderboards are public — no login required to view the top 50.
  • Authenticated users see their own position (even if outside top 50).
  • Results are cached to prevent leaderboard queries from being used as a DoS vector.
  • Car leaderboard shows aggregate ratings only — no individual rating breakdown.

QA Checklist

  • View leaderboard without login → top 50 shown, no personal position
  • View leaderboard while logged in → personal position shown below top 50 if not in it
  • Switch between leaderboard types → correct data for each type
  • View seasonal archive for past year → historical rankings shown
  • January 1st → RP balances reset, archived data accessible via season archive