Skip to main content

STALLYONS TECHNOLOGIES

Innovating the future of digital with AI, design, and technology. From AI to Web — Stallyons transforms your ideas into digital reality. Building smarter digital experiences through AI, innovation, and technology. Innovating the future of digital with AI, design, and technology. From AI to Web — Stallyons transforms your ideas into digital reality. Building smarter digital experiences through AI, innovation, and technology.
EN
background

Blog

Player Compare: HubSpot
Esports Stats Site

Player Compare: HubSpot Esports Stats Site

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 Starting Point: Comparison Is the Whole Point

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.

  • One comparison, not two profiles. Fans wanted two players next to each other with a clear winner per stat, instead of reading separate pages and comparing in their heads.
  • Stats that live in an external API. Every figure comes from the Riot Games API, spread across several endpoints, and some numbers have to be calculated rather than read straight off.
  • A key that must stay secret. An API key placed in browser code can be copied and misused, so it could never reach the visitor’s browser.
  • A key that expires daily. Riot development keys stop working after 24 hours, so renewing one had to be a quick, one-place task rather than a code change.
  • Mock-ups, not a site. The HTML pages needed to become a polished, linked website with member sign-up, login, and live data.

The Build: Mock-ups Into a Live, Secure Site

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:

  1. The visitor signs up or logs in through HubSpot memberships.
  2. They search for a player by name and region and see that player’s profile with rank and recent performance.
  3. They search for a second player, and the request goes to a HubSpot serverless function rather than straight to Riot.
  4. The function adds the secret API key, calls the Riot endpoints, calculates any figures the API does not return directly, and sends back only the data the page needs.
  5. Both players appear side by side, with a green or red arrow on each stat showing who is ahead.
  6. From there the visitor can read the esports history timeline and the explainer on how the data is collected and shown.

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.

Technical Architecture

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.

  • Templates and modules. HubL, CSS3, and JavaScript render the home, search, compare, history, and login pages, all editable in the HubSpot editor.
  • Riot API proxy. HubSpot serverless functions look up a player, then fetch league and match data, and return only what the page needs.
  • Compare engine. Each stat is weighed value by value, with figures such as KDA worked out from raw match data, and a green or red arrow set per player.
  • Memberships. HubSpot memberships handle sign-up, login, and member pages.
  • Secrets. The API key lives as a HubSpot secret in one place, hidden from the browser and renewable in a single update.
  • Content and hosting. HubDB and custom modules hold the timeline, facts, and figure captions, and HubSpot hosts the site on the client’s own domain with SSL.

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.

Challenges Solved

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 Result

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.

Frequently Asked Questions

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.

Leave a Reply