Blog
Two League of Legends fans argue about which player is better. One opens a big stats site, the other opens another, and now they are reading two separate profiles and trying to hold a dozen numbers in their heads. The comparison, the thing they actually wanted, is the one view neither site gives them directly.
Player Compare is an esports website that answers that question in one screen. A visitor searches for a player by name and region, sees their rank and recent performance, then searches for a second player and both line up side by side in a single table: kills, deaths, assists, KDA, win rate, rank, and the rest. Next to every stat, a green arrow marks the player who is ahead and a red arrow the one behind. Around the comparison sit a home page that explains the scene, an esports history timeline, and a short note on how the data is gathered and shown. The site went live on the client’s own domain in April 2023.
Put simply, you type two names, the live stats appear next to each other, and the arrows tell you at a glance who leads on what.
The client came with basic HTML mock-ups and a clear picture of the comparison table. Turning those pages into a secure, live site meant working around how the Riot Games data behaves, not just styling screens. The requirements were specific.
We built the whole thing on HubSpot CMS Hub, with custom templates and modules shaped from the client’s mock-ups. Choosing HubSpot CMS development gave the owner editable pages and hosting in one place, while a small set of serverless functions acts as a secure backend for the Riot API. A visitor’s path runs in order:
Members and their accounts matter here beyond login: the client sees logged-in users as the base for future premium features, so the membership layer was built as the groundwork for a product, not just a gate. Treating that roadmap as early SaaS development is what keeps the door open to paid tiers later without rebuilding the site.
The site runs on HubSpot CMS Hub, with HubL templates and modules built from the mock-ups, memberships for login, and serverless functions as a small backend for the Riot API. The hard part was not the pages. It was finding which endpoints hold each stat, calculating the figures the API does not give directly, keeping the key secret, and handling a key that expires every day. Each layer does one job.
The part worth engineering with care is the join between a search and a safe answer. Routing every call through a serverless function means the key never reaches the browser, the daily key change is a one-field update rather than a redeploy, and the page only ever receives the stats it is meant to show.
Finding the right data was the first real problem. The stats the client wanted were spread across several Riot endpoints, and some were not provided directly. The summoner, league, and match endpoints were combined, and figures like KDA are calculated from the raw match data. The expiring key was the second: Riot development keys stop working after 24 hours, so the key is stored once as a HubSpot secret, which turns renewing it into a quick task, and applying to Riot for a long-term production key was recommended for permanent use.
Content for the home page arrived after the design was approved, but because the sections are modules, the new text, figures, and captions were added without rebuilding pages. Late in the support period, feedback showed some text was hard to read on a large screen, so fonts were made brighter and larger, contrast was increased, and the logo area was adjusted so the whole logo shows. A short follow-up job kept the live comparison working through a key demo day.
The site delivers on its one promise: a visitor searches two players and immediately sees who is ahead on each stat, with live data from the Riot Games API and arrows that do the reading for them. The owner manages members, renews the key, and edits the home page, timeline, and facts from the HubSpot editor, publishing changes without touching code. The site went live on the client’s own domain in April 2023, every milestone was paid, and the follow-up job kept the data running for an important demo.
If you are building a data-driven site that leans on an external API, you can hire front-end developers who have shipped HubSpot templates backed by serverless functions, or tell us where your data lives and what you want to compare and we will map it into a secure, editable site. It suits any consumer product or startup building a member base toward paid features.
What is Player Compare?
It is an esports website for League of Legends fans, built on HubSpot CMS. Visitors search for a player, see their stats, and put two players side by side in one table, where a green or red arrow on each stat shows who is ahead, using live data from the Riot Games API.
How is the Riot API key kept secret?
Every search goes to a HubSpot serverless function, which adds the key, calls the Riot API, and returns only the data the page needs. The key is stored as a HubSpot secret, so it never appears in browser code where it could be copied and misused.
Why does the key need renewing so often?
Riot development keys expire every 24 hours. Because the key is held in one place as a HubSpot secret, renewing it is a single update rather than a code change. For permanent use, applying to Riot for a long-term production key was recommended.
Where do the comparison stats come from?
They come from the Riot Games API, across the summoner, league, and match endpoints. Some figures, such as KDA, are not provided directly and are calculated from the raw match data, then compared value by value so each stat gets its arrow.
Can the site owner edit content without a developer?
Yes. The home page sections, esports timeline, facts, and figure captions are HubSpot modules, so text and images are changed in the editor. The owner also manages members and renews the API key from the same account, publishing changes without code.