I wanted to play Samba, the rummy‑style card game that sits somewhere between Canasta and Rummy 500. It’s fast, strategic, and perfect with friends. The problem was… every online version I found was clunky, outdated, or missing the features I cared about.
So I built my own.
What started as a weekend prototype turned into a production‑ready, scalable, monetized web app with:
- Real‑time multiplayer
- Bots
- Server‑authoritative game logic
- Authentication
- Payments
- SEO‑friendly routing
- A polished UI
- A free‑tier‑friendly architecture
Here’s how it happened — and what I learned along the way.
🎯 Why Build a Samba Game?
I wanted:
- A clean, modern UI
- Multiplayer that didn’t feel duct‑taped together
- Rules that matched how real people play
- Something I could share instantly with friends
- An excuse to push myself into new tools and architectures
And honestly? I wanted to see how far I could go using Google Antigravity and Gemini Flash in a real production project.
⚡ The First Prototype: React + PeerJS
The earliest version was intentionally scrappy:
- React front‑end
- PeerJS for peer‑to‑peer networking
- 100% client‑side
- No backend
- No persistence
- No security
It worked well enough to prove the idea and get the rules playable.
But the real turning point came from something I didn’t expect…
🧪 Test Driven Development Rocks In An LLM World
Before iterating on the rules, I wrote a test suite inside a free v0.app account. I used v0 as I was confident with its capability - it's way more than a one-shot front-end tool.
This turned out to be the smartest decision of the entire project.
Samba has a lot of edge cases:
- When you can pick up the discard pile
- Valid vs invalid melds
- Detecting sambas and canastas
- Wildcard behavior
- Multi‑player turn sequencing
- What happens when someone goes out mid‑meld
Every time logic changed, the tests caught regressions instantly.
Without that safety net, the rules engine would have collapsed under its own complexity.
With tests in place, I had:
- Fully working Samba rules
- Multiplayer that actually functioned
- A UI that was ugly but usable
Now it was time to turn this into a real product.
🚀 Moving Into Antigravity: Agent‑First Development That Actually Works
Once the basics were in place, I moved the entire project into Google Antigravity, paired with Gemini Flash.
This was the moment everything accelerated.
My Antigravity Workflow
I settled into a loop that became shockingly effective:
- Explain the requirement
- Point Antigravity to the test suite
- Ask for a plan (with verification + test updates)
- Review the plan (one comment to refine if needed)
- Approve the plan
- Antigravity executes, verifies, fixes regressions, and returns a walkthrough artifact
- When helpful to verify, it will even open Chrome and provide visual confirmation
This workflow handled:
- The full refactor from client‑side → server‑authoritative Durable Objects
- The front‑end refactor
- The routing overhaul
- UI cleanup
- Multiplayer reliability improvements
- Production hardening
It felt like pairing with a senior engineer who never gets tired and always remembers the test suite. But acts like a junior engineer if you aren't explicit enough.
🏗️ Production Architecture: Fast, Cheap, and Server‑Authoritative
To ship a real multiplayer game, I needed:
- Security
- Persistence
- Anti‑cheat
- Reconnection logic
- Scalable multiplayer
- Predictable costs
I chose a stack that gives me all of that while staying almost free:
Backend
- Cloudflare Workers
- Cloudflare Durable Objects (authoritative game rooms)
- Firebase Auth
- Firestore (profiles + game history)
Frontend
- Next.js on Vercel
This gives me:
- Global low‑latency
- Persistent rooms
- Server‑authoritative logic
- Free‑tier headroom
- A clean separation between UI and game state
- A path to scale without rewriting anything
💸 Monetization: Protecting Myself From My Own Success
I had to confront a real fear:
What if lots of people play and I end up paying for all the servers?
I settled on:
- Free forever: single‑player vs bot
- 1‑month trial: full multiplayer, no credit card
- Paid tier: ongoing multiplayer access
Stripe integration was smooth, and the model feels fair:
- Casual players pay nothing
- Regular players support the project
- I don’t get bankrupted by my own hobby
🎨 Designing the Website With Antigravity
I asked Antigravity for design concepts and got six options.
One minimalist design stood out.
Getting it implemented took some wrestling, but the final result is clean, modern, and fast.
Minimalism came with a catch…
🔍 SEO Challenges: Modals Everywhere
The landing page was intentionally simple.
Almost all content lived behind buttons that opened modals.
Great for UX.
Terrible for SEO.
Gemini Flash came up with an elegant solution:
- Real routes
- Intercepted by modals
- Full content available to crawlers
- Smooth UX preserved for humans
This solved the SEO problem without compromising the design.
😬 The Fear of Success
I’ll admit it:
I’m a little scared that bucket‑loads of people will start playing, and I’ll be the one paying for all the servers.
Right now, apart from my Google AI subscription, the entire project has cost me $10.46 USD to buy playsambaonline.com.
It’s the cheapest expensive hobby I’ve ever had.
🧠 Lessons Learned
1. Tests are the backbone of AI‑assisted development
Without the test suite, none of the Antigravity workflows would have been safe.
2. LLMs shine when given constraints, structure, and verification
Antigravity + Flash + tests was a game‑changer.
3. Server‑authoritative architecture is worth it
Durable Objects solved cheating, reconnections, and consistency in one stroke.
4. Free‑tier‑friendly architecture is a superpower
Cloudflare + Firebase + Vercel let me ship a real multiplayer game for almost nothing.
5. Minimalist design is harder than maximalist design
Especially when SEO enters the picture.
6. Monetization forces clarity
It made me think deeply about fairness, sustainability, and server costs.
7. Fear of success is real
But it’s also motivating.
🧰 Tech Stack Summary
Frontend
- Next.js
- Vercel
- TailwindCSS
- Modal‑intercepted routing
- Client‑side UI state
Backend
- Cloudflare Workers
- Cloudflare Durable Objects
- Firebase Auth
- Firestore
- Stripe
AI Tools
- Gemini Flash
- Google Antigravity
- v0.app (early test suite)
DevOps & Tooling
- GitHub
- Vercel + Cloudflare CI/CD
- Automated test suite
Architecture Highlights
- Server‑authoritative multiplayer
- Durable, persistent game rooms
- Free‑tier‑friendly infrastructure (scale to paid as needed)
- SEO‑friendly static routes
- Clean separation of concerns
- Scalable to thousands of concurrent rooms
🎉 Today: A Production‑Ready Web App
PlaySambaOnline.com isn’t an MVP anymore.
It’s a real, production‑ready, scalable, monetized web app with:
- Multiplayer
- Bots
- Authentication
- Payments
- SEO‑friendly routing
- A polished UI
- A modern backend
- A sustainable business model
And it all started because I couldn’t find a Samba game I liked.
Top comments (0)