Guide

Add multiplayer to a Lovable, Bolt, Replit or v0 game

Updated 2026-11-23

Short answer: games made in AI app builders are web pages, so Joinable should work in them: the builder's AI adds one async script tag to the app's index.html and a few hooks, following getjoinable.com/AGENTS.md. Two things differ from building on your own computer. A builder's preview and published addresses are real websites, so you need a free key with those addresses added. And we haven't run our self-test inside these builders yet: check the browser console and the published page before you share it.

Being straight about what we've tested

We've tested Joinable on plain canvas, three.js and Phaser games, and three live games use it today on etheria.games: Turbo Rally, Sky Isle Karts and Firestorm. We have not yet run a game through Lovable, Bolt, Replit, v0 or similar tools end to end. What follows is what should work, based on how Joinable and the web work, and what may get in the way. If you try it, we'd like to hear how it went: hello@getjoinable.com.

What should work

1. Get a free key first. On your own computer Joinable needs no key, but a builder's preview runs on the builder's own web address, and so does the published app (often a subdomain such as yourapp.lovable.app, yourapp.replit.app or yourapp.vercel.app). Those count as real sites:

  1. Sign up at getjoinable.com/app and add your game.
  2. Add the published address to the game's sites. If you want online play in the preview too, add the preview's address as well (open the preview in its own tab to see it). Some builders change the preview address between sessions; the published one is the one that matters.
  3. Copy the key (pk_…). It's public, not a secret: the site list protects it.

2. Paste the prompt into the builder's chat, with your key added at the start:

Use the Joinable project key pk_YOUR_KEY in data-key.
Make this web game multiplayer using Joinable. Read
https://getjoinable.com/AGENTS.md first and follow it exactly: it says how
to pick the right pattern for this game's genre, what to change, and how to test
with two browser tabs. Start with the smallest change that works (usually one
script tag), test it with two tabs, and only go further if the doc's checks fail
for this game. Don't write any server code: Joinable's hosted relay does all of
that. When you're done, tell me which pattern you used, what you changed, and
anything that doesn't sync.

This is the usual prompt without the localhost and self-test lines, which don't apply inside a builder. If the builder's AI says it can't open web pages, open getjoinable.com/AGENTS.md yourself and paste the section for your kind of game (full rounds for racers and score games, Pattern A for board and puzzle games).

3. What should change in the app. The script tag goes in the app's index.html (in React and Vite projects, the one at the project root), loaded async:

<script async src="https://relay.getjoinable.com/sdk.js" data-key="pk_…" data-connect="invite"></script>

Then, for racers and score games, one Joinable.game({...}) call with the hooks start, go, local, remote and stop, and a window.Joinable?.finish(...) where the player finishes. In a React app, ask the builder to register it once, when the game screen first mounts, not on every render. Board and puzzle games may only need Joinable.sync(state) on a plain state object.

4. Check it on the published address. Publish, then open the published page in two browser windows side by side. Press Play online, invite, open the link in the second window, and Ready in both. Then try a phone on mobile data with a friend on wifi.

What may not work

npx getjoinable test http://localhost:5173/

You can also point the test at your published address. That's a live site, so the test's minutes count as live play, and on the free plan rooms hold 4.

Troubleshooting from the dock

The Joinable dock (top right of the game) says what's wrong:

Whatever happens, the game should still play solo. If it shows a blank page when Joinable can't load, the script tag lost its async.

Costs

Building is free. On a live site, the free Sandbox plan gives 100 player-hours a month in rooms of 4, with a small Joinable badge, and a daily cap of 50 player-hours. Starter is $9.99 a month for 3,000 player-hours and rooms of 8. A player-hour is one person playing online for an hour: two friends racing for 30 minutes is one. Pricing.

Where it stops working

Same as anywhere: web games only, no fighting games or competitive shooters yet, and scores come from players, so no prize leaderboards. If your builder exports a native mobile app, Joinable only works in the web version. More in the general guide.

FAQ

Can I add multiplayer to a Lovable, Bolt, Replit or v0 game?

It should work, because those games are web pages: the builder's AI adds Joinable's async script tag and hooks. We haven't tested inside these builders yet, so check the published page in two browser windows and the browser console before sharing.

Do I need a key in an app builder?

Yes. Keyless play only works on your own computer (localhost). Builder previews and published apps are real web addresses, so get a free key and add those addresses to your game's sites.

Why doesn't multiplayer work in the builder's preview?

The preview may block outside scripts (cross-origin isolation), or its address isn't on your game's sites. Check the browser console and the dock's message, and try the published address.

Does the builder need a backend or database for multiplayer?

No. Joinable's hosted relay runs the rooms, invites and matchmaking. Your app stays a front end.

Is it free?

Building is free. A live site on the free plan gets 100 player-hours a month in rooms of 4; paid plans start at $9.99 a month.

Copy the prompt for your coding agent or sign up free