RankForge 🏆
Hackathon: H0 Hackathon — Track 3: Million-Scale Global App
Live Demo: rankforge-chi.vercel.app
Repo: github.com/kyisaiah47/rankforge
Inspiration
Every multiplayer game needs a leaderboard. But building one that's actually production-ready — handles millions of concurrent players, updates in real time, and works across any game — is a serious infrastructure problem most indie devs and small studios don't have time to solve.
I wanted to build the thing I wish existed: a dead-simple leaderboard API you drop into any game in minutes, backed by infrastructure that scales without you touching it.
What It Does
Register a game, get an API key, submit scores. That's the entire integration surface.
- Score Submission — one POST call from any language, any platform
- Real-Time Leaderboard — rankings update live via Server-Sent Events, no polling, no refresh
- Time-Window Rankings — all-time, daily, weekly, and monthly boards out of the box
- Multi-Game Dashboard — manage all your games and API keys in one place
- Player History — per-player rank tracking across any time window
How I Built It
Architecture
Next.js 16 Frontend (Vercel) │ Server-Sent Events ▼ Vercel Serverless Functions (API layer) │ ▼ AWS DynamoDB (score storage + ranking) ├── scores — partitioned by gameId + period ├── games — metadata + API keys └── players — per-player best scores
Score writes go directly to DynamoDB. The SSE stream endpoint polls DynamoDB every 5 seconds and pushes ranked results to all connected clients. When a new score lands, the leaderboard re-ranks and flashes the updated row live — no websockets, no pub/sub infrastructure needed.
Tech Stack
| Layer | Technology |
|---|---|
| Database | AWS DynamoDB |
| Frontend | Next.js 16, Tailwind CSS, shadcn/ui |
| API | Next.js Route Handlers (Vercel Serverless) |
| Streaming | Server-Sent Events (SSE) |
| Hosting | Vercel |
| Auth | API key per game (hashed, stored in DynamoDB) |
DynamoDB Integration
DynamoDB is the entire data layer — no secondary database, no cache layer needed:
- scores table partitioned by
gameId#periodwith score as the sort key — range queries for leaderboard reads are single-digit milliseconds - games table stores game metadata and hashed API keys for auth
- players table tracks each player's all-time best per game for instant rank lookups
- Write throughput scales horizontally with DynamoDB's on-demand capacity — no provisioning, no ceiling
- TTL attributes on daily/weekly/monthly entries expire automatically — no cleanup jobs
The combination of partition key design and DynamoDB's native sort makes leaderboard queries $O(1)$ per period without any external ranking service.
Challenges
- Real-time without websockets: Vercel's serverless functions don't support persistent connections. SSE with a 5-second poll interval gave the real-time feel within the constraints of the platform.
- Time-window ranking: Keeping daily/weekly/monthly boards consistent under concurrent writes required careful partition key design — writes fan out to multiple period keys atomically.
- API key auth at the edge: Hashing and validating API keys inside serverless functions with no shared session state meant every request is fully self-contained — fast but required tight key design.
What's Next
- Webhooks — notify your backend when a player hits a new rank milestone
- Embeddable widget — drop a live leaderboard iframe into any web page
- Analytics dashboard — score distribution, player retention, peak activity windows
- SDK packages for Unity, Unreal, and web
Team
Built solo by @kyisaiah47 for the H0 Hackathon, Track 3: Million-Scale Global App.
Built With
- aws-dynamodb
- next.js
- server-sent
- shadcn/ui
- tailwind-css
- typescript
- vercel

Log in or sign up for Devpost to join the conversation.