This is a proof of concept to show what it could be like to have a fully multiplayer version of WebSim (a browser where an LLM generates the webpages).
How is it multiplayer?
This is demoware / a proof of concept. I wrote this over a weekend and decided that I don't want to flesh it out, but it is architecturally interesting so it is worth sharing.
Create a .env.local file with the following:
OPENAI_API_KEY={Your Key}
WEBAPP_URL=http://localhost:3000
NEXT_PUBLIC_PARTY_KIT_HOST=localhost:1999
NEXT_PUBLIC_PARTY_KIT_URL=http://localhost:1999
bun i
bun devThere isn't any long term persistence of the pages or account management. Right now there is only a single hardcoded room as well. If you want to actually scale this you will need to be able to shard people into different servers. You really want the concept of a "party" or a "universe" where people can all jam on things together.
I started working on this because it would be a fun proof of concept. Once I proved to myself that I knew how to build it I stopped because I don't really want to build out a full fledged websim competitor.