Add a leaderboard to your AI-made HTML game without a server
Quick answer
A one-file HTML game can have a shared leaderboard without a server: ask your AI to save scores with Claude's window.storage API and shared: true, then publish it on Convika. Convika keeps shared values per page, so every player sees the same board, on every plan. Players have no accounts, so names aren't verified.
Free plan: no credit card. Shared storage is included on every plan.
On this page
A leaderboard is the part of a small game that makes people play one more round. It is also the part that usually needs a server: somewhere every player's score goes, and every player reads back. The maker of 文字ブレード, a word game that went viral in Japan in October 2026, switched off its online play on day 3 because of what the server would cost.
A one-file HTML game on Convika doesn't need that server. The game saves its scores with the storage API Claude's artifacts use, and Convika keeps the shared values for each page.
How it works
Claude's artifacts have a storage API, window.storage, with two kinds of values. Personal values belong to one player. Shared values, saved with shared: true, are the same for everyone. Claude's help center puts it this way: "In a game leaderboard, everyone sees the same scores."
Outside claude.ai, that API doesn't exist, so a game copied out of Claude stops saving. On a Convika page whose HTML uses window.storage, Convika adds a small script that provides it, with the same methods, arguments, and results. Shared values go to Convika, kept per page. Personal values stay in the player's browser. A page that doesn't use the API gets no script.
The API is plain enough for any AI to write against, so a game made in ChatGPT or Gemini can use it too.
Personal (shared left out) | Shared (shared: true) | |
|---|---|---|
| Kept in | The player's browser | Convika, per page |
| Who sees it | That player | Everyone who opens the page |
| Good for | Best score, "continue", settings | Leaderboard, counters, a guestbook |
| Free plan | Up to the browser's space | 1 MB and 1,000 keys a page |
| Pro | Up to the browser's space | 10 MB and 10,000 keys a page |
Ask your AI for the leaderboard
In the conversation that made the game, send this. It describes the API, so it works with ChatGPT, Claude, or Gemini:
Add a top-20 leaderboard to my game. Use this storage API, which the page
where I host the game provides:
- await window.storage.get(key, true) returns {key, value}; it throws if the key doesn't exist.
- await window.storage.set(key, value, true) saves a text value for everyone.
- Values are text, so use JSON.stringify and JSON.parse.
Keep the whole board in one key named "leaderboard": a list of at most 20
{name, score} entries, highest first. When a round ends, ask for a name of up to
12 characters, read the board again right before saving, add the score, keep the
top 20, and save. If loading or saving fails, show a short message and let the
player keep playing.
Give me the complete game as one HTML file, from <!DOCTYPE html> to </html>.
Keeping the board in one key means one read shows it, and reading again right before saving makes it rare for two players' scores to overwrite each other.
Add the leaderboard in 4 steps
1. Get the game as one HTML file
Download the file from your AI, or copy the code from start to end. If the game is a React artifact in Claude, ask Claude for it as one HTML file first.
2. Upload it to Convika
Sign up at app.convika.com and upload the file or paste the code. If the game is already on Convika, upload it to the same page as a new version instead, so the link stays the same (update your game at the same link).
3. Play the preview, knowing what it saves
The private preview keeps shared values in that browser tab only, and they end with the tab. Test scores never reach the live board. Check that the board shows and that saving works.
4. Publish and play from two devices
Publish the page, then open the live link on your phone and on a computer. Play a round on one, then reload the other: the score is on both. On a board that refreshes by itself, other players' scores appear after a short delay.
Limits, and what happens past them
| Limit | Figure |
|---|---|
| One shared value | 1 MB, on every plan |
| A page's shared values (Free) | 1 MB, 1,000 keys |
| A page's shared values (Pro) | 10 MB, 10,000 keys |
| All pages in a Free workspace together | 10 MB |
A save past a limit is refused and returns an error to the game. Values already saved stay. There is also a per-minute limit on how often one visitor, and one page in total, can save, so a crowd saving at once may see some saves refused for a minute. The prompt above already asks the game to keep going when that happens.
Reading and saving scores don't count as page views. To see or delete what the page saved, open the page's Page settings, then Advanced settings, and find Data shared by all visitors. You can delete one key or all of them.
What it can't do
- Players have no accounts. A name on the board is whatever the player typed. Convika doesn't check who typed it.
- Anyone who opens the page can change the board. A player who reads your game's code can write any score. Don't run a contest with prizes on it.
- The last save wins. If two players save the same key at the same moment, the earlier save is lost. Reading again right before saving makes this rare, not impossible.
- No real-time multiplayer. Shared values are for saving and reading, not for moving two players in the same game at once. Claude's
window.claude.use("room")doesn't work on a Convika page. - No calls to other sites on Free. A script's fetch and XHR requests on a Free page reach only the page's own address, so a separate leaderboard service or an AI API can't be reached from the game. Pro adds the analytics tools Convika supports and the hosts you list for your own ad network.
Frequently asked questions
Can I add a global leaderboard to an HTML game without a backend?
Yes, on a host that provides shared storage. On Convika, a game that saves with window.storage and shared: true gets one board per page, read and written by every player, with no server or database of your own.
Does the leaderboard work on the Free plan?
Yes. Shared storage works on every plan. Free holds 1 MB and 1,000 keys a page, which is far more than a top-20 board needs.
Does the leaderboard reset when I update the game?
No. Shared values belong to the page, not to one version. Publish the new version on the same page and keep the key name, such as leaderboard, the same.
Can players cheat on the leaderboard?
Yes, they can. There are no player accounts, and anyone who opens the page can write to its shared values. Treat the board as fun, not as proof, and clear it in Data shared by all visitors if it fills with fake scores.
Does this work with a game made in ChatGPT?
Yes. What matters is that the HTML uses window.storage. Give ChatGPT the prompt above, which describes the API, and it writes the game against it.
Sources
- What are artifacts and how do I use them? (Claude Help Center), read on October 27, 2026
Next step
How to password protect an HTML page without code, on your own domain
JavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.
Related articles
- How to publish a game you made with ChatGPT so friends can play itPut a one-file HTML game from ChatGPT online for free and send friends a link. itch.io, GitHub Pages, Netlify Drop, CodePen, and Convika compared, with steps.
- Made level 2 or fixed a bug? Update your AI game at the same linkUpload the new game file as the next version of the page you shared. Players open it at the same link, and their saves and the shared scoreboard stay.
- Earn from a game you made with AI: what works todayPlayers rarely pay for a free web game. What earns: a support button, a link to your own payment page, a sponsor slot, and ads on your own domain.
- Make a game with AI for free, no coding, and send friends a link they can playNo game-maker app needed: ask ChatGPT, Claude, or Gemini for a one-file HTML game, test it on your phone, and publish it free as a link friends can play.
- How to share a Claude artifact as a link, or deploy it to a real web addressClaude's share link needs a Claude account to open. Paste the artifact's code into Convika and publish it: a real web address anyone can open, free.
- Fix an AI-made HTML game that works on a computer but not a phoneFix touch controls, offset taps, unwanted scrolling, and silent audio in an AI-made HTML game. Includes repair prompts, code, and a phone test checklist.