The Buildml leaderboard is a community ranking page that shows which builders have solved the most AI/ML problems on the platform. Rankings are driven entirely by accepted (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Praashh/buildml/llms.txt
Use this file to discover all available pages before exploring further.
PASS) submissions and update automatically as new solutions are judged by the executor.
Platform Stats
The leaderboard header surfaces three live community statistics:| Stat | Value |
|---|---|
| Builders | 80+ registered users |
| Problems | 20+ available challenges |
| Submissions | 500+ total code runs |
How Ranking Works
A user’s score is the count of distinct problems they have solved with at least onePASS submission. Multiple PASS submissions to the same problem count only once.
The user.getLeaderboard tRPC query (public procedure) implements this with a Prisma distinct select:
{ id, name, image, solvedCount } objects sorted in descending order by solvedCount.
Leaderboard Table
Each row in the table displays:- Rank position — zero-padded integer (e.g.,
01,02). The top three positions are highlighted in the primary accent colour. - Avatar — the user’s Google profile image (via NextAuth), with a fallback icon for users without an image.
- Name — the user’s display name. The currently signed-in user’s row is tinted and labelled You.
- Solved count — the number of unique problems solved with a
PASS.
Personal Rank
Signed-in users see a Personal Standing banner above the table showing their current 1-based rank position. This is fetched via theuser.getUserRank protected tRPC procedure, which runs the same ranking logic and returns the index of the current user in the sorted array:
getUserRank returns null only if the user is not found at all.
Authentication
The/leaderboard route is protected by Next.js middleware — unauthenticated visitors are redirected to /signin before they can view the rankings. Once signed in, the Personal Standing banner and the You badge on table rows are shown for the current user. The user.getUserRank query is a protectedProcedure and is only called when a session exists:
Server-Side Prefetching
The leaderboard page uses Next.js server components with tRPC’sHydrateClient pattern to prefetch data before the page is sent to the browser:
LeaderboardClient component hydrates from this cache and re-fetches in the background to keep rankings current.