Inspiration
Twitch communities create something together every stream: inside jokes, shared memories, and a sense of belonging. I wanted to give that community a place it could actually build.
Chatlands turns chat participation into a shared 3D city, where viewers become residents and their contributions leave a lasting mark.
What it does
Streamers connect their Twitch account and create a city for their community. Viewers play directly through Twitch chat, using commands to join, earn virtual coins, claim land, build homes, and add floors.
The shared city updates as viewers build, while a bot confirms their actions in chat. Ownership and progress persist between sessions, giving the community a world to return to and grow together.
How I built it
I built Chatlands as a solo developer, using OpenAI Codex as a coding partner to develop the interface, gameplay systems, Twitch integration, database models, and automated tests.
The frontend uses React, with Three.js and React Three Fiber rendering the city. A Node.js and Fastify backend validates commands and processes gameplay.
Twitch OAuth connects the streamer’s account, EventSub WebSockets receive chat commands, and the Twitch Send Chat Message API delivers responses. Supabase PostgreSQL stores cities, residents, balances, and buildings through Prisma. I also prepared a Render deployment setup for the frontend and backend.
Challenges I ran into
One challenge was making fast-moving chat work reliably with persistent game state. Repeated commands, simultaneous purchases, and interrupted connections all needed careful handling. I used database transactions, command receipts, and cooldowns to protect balances and ownership.
Another challenge was translating game rules into a readable 3D world. Buildings needed to fit their plots, reflect upgrades, and remain easy to explore as the city grew taller.
Connecting Twitch also meant handling authorization, token storage, reconnections, and reply limits alongside the game itself.
Accomplishments that I'm proud of
I built a connected gameplay loop: a viewer can join through chat, earn coins, claim a plot, and build a home that appears in the shared city.
I’m especially proud of persistent ownership, growing buildings, and the connection between a simple chat command and a visible change in the world. I also added automated tests for gameplay, authentication, and Twitch message handling.
What I learned
I learned that a chat-controlled game needs clear feedback as much as engaging mechanics. Viewers need to understand what happened, what they own, and what they can do next without leaving the conversation.
I also learned how much work sits behind a shared world: reliable database updates, connection recovery, and consistent rules are essential to making participation feel meaningful.
Working with Codex helped me move quickly while reinforcing the importance of testing and reviewing the systems I built.
What's next for Chatlands
I want to expand building styles, customization, and shared landmarks so each community’s city develops its own identity.
I also plan to add richer streamer controls, moderation and undo tools, more Twitch participation events, and a dedicated OBS view. My next priority is testing with real communities to refine the economy, command experience, and performance as cities grow.
Built With
- css
- fastify
- html
- javascript
- lucide
- node.js
- openai-codex
- postgresql
- prisma
- react
- react-three-drei
- react-three-fiber
- supabase
- three.js
- twitch
- twitch-eventsub
- twitch-oauth
- typescript
- vite
- zod
