🎨 They Call It “Vibe” Coding

🎨 They Call It “Vibe” Coding

Sometimes, all it takes is a fun idea, a browser, and a spark of curiosity. “Two Truths & a Lie with AI” is a quirky, turn-based web game where you go head-to-head with an AI in a playful battle of bluffing and deduction.

🎯 The concept is simple:

You each take turns trying to trick each other with two truths and one lie. First to 5 points wins. But the journey is hilarious.

🔗 Play nowhttps://two-truths-and-a-lie-with-ai.vercel.app


🎭 How It Works

  • You enter 3 statements: two true, one false.
  • The AI guesses the lie (and explains why).
  • Then, the AI gives 3 statementsyou guess the lie.
  • Rinse. Repeat. Who’s the better bluffer?

The AI randomly chooses from fun topics like:

animals, space, history, technology, food, travel, music

🔐 A Stateless Game Engine

No database. No storage. No tracking. Instead, the game uses HMAC obfuscation to securely encode the lie’s position, validate guesses, and stay completely stateless.

This makes it trivially deployable, portable, and privacy-respecting.


⚠️ Known Limitations

The game uses OpenRouter’s free LLMs (llama-4-scout) — and there’s a request cap.

If you’ve been having fun and suddenly hit this:

❌ Error: 🤖 AI Error: Rate limit exceeded: free-models-per-day “Add 10 credits to unlock 1000 free model requests per day”

...don't worry — that’s normal. For now, it’s a free-tier experience.

🧭 Coming Soon: Local Mode

We’re (Me and ChatGpt) planning to support local AI via Ollama in the future — perfect for unlimited play on your own machine, no rate limits. Stay tuned! 🛠️


🧪 Dev Setup & Deployment

Vercel Serverless (default):

  • Each API route is a serverless function in /api/
  • Push to GitHub → Vercel builds both frontend & backend

Local Dev:

> bash
$ npm install 
$ npm run dev
or
$ vercel dev        


Then open http://localhost:3000 in your browser.

(Note: local AI support is coming in a future update)


🧠 Tech Stack

  • Frontend: Vanilla JS + HTML + CSS
  • Backend: Node.js (Express + Vercel Serverless)
  • AI: OpenRouter (Llama 4 Scout)
  • Security: HMAC-based lie index validation
  • Infra: Fully stateless, no database


🎯 Future Plans

  • 🎯 Categories and difficulty levels
  • 📈 Leaderboards
  • 💾 Save high scores locally
  • 💬 Chat-style interface for AI replies
  • 🧠 Offline/local Ollama AI support (in progress)


👨💻 Made With Love (and AI)

This was a weekend project turned rabbit hole. Shoutout to ChatGPT for being my rubber duck, code co-pilot, and occasional pun critic. Vibes over architecture. Curiosity over complexity.

Built with love, chaos, and npm run dev. — Indranil


💻 Open Source → https://github.com/dey-indranil/two-truths-and-a-lie-with-ai

MIT License. Remix. Play. Fork it and beat the AI at its own game.

To view or add a comment, sign in

More articles by Indranil Dey

Others also viewed

Explore content categories