Skip to content

nelonmelons/krackle

 
 

Repository files navigation

🎮 Krackle.co - Don't Smile, Don't Lose

image

Built during a hackathon in Bangkok, Thailand 🇹🇭 while on our research exchange program

🚀 The Problem

Online games are boring. Video calls are awkward. Party games lack real-time emotion tracking. We wanted to create something that combines the thrill of competition with the joy of making people laugh.

💡 The Solution

Krackle is a real-time multiplayer game where players try to make each other laugh using AI-powered emotion detection. Think "Don't laugh challenge" meets modern web technology.

How It Works (30-second explanation):

  1. Join/Create a lobby with friends
  2. Camera tracks your face in real-time using computer vision
  3. AI detects when you smile/laugh
  4. First person to crack loses the round
  5. Compete across multiple rounds for ultimate bragging rights

🛠️ Tech Stack

Frontend:

  • Next.js 14 with TypeScript
  • Tailwind CSS + Shadcn/ui components
  • Real-time WebSocket connections

Backend:

  • Python FastAPI server
  • Socket.IO for real-time communication
  • OpenCV + TensorFlow for computer vision
  • Custom CNN model for emotion detection

AI/ML:

  • 7-emotion classification model (Happy, Sad, Angry, etc.)
  • Real-time face detection using Haar Cascades
  • Custom emotion history tracking algorithm

🎯 Key Features

  • Real-time emotion detection - AI tracks facial expressions with 90%+ accuracy
  • Multiplayer lobbies - Support for up to 8 players per game
  • Customizable game settings - Adjust rounds, timers, and player limits
  • Responsive design - Works on desktop and mobile browsers
  • Zero downloads - Completely web-based, no app installation required

🏗️ Project Structure

krackle/
├── frontendupdated/          # Next.js frontend application
│   ├── app/                  # App router pages
│   ├── components/           # Reusable UI components
│   └── hooks/               # Custom React hooks
├── newBackend/              # Python emotion detection service
│   ├── model.h5            # Pre-trained emotion recognition model
│   └── emotion.py          # Core ML inference logic
├── app.py                  # Main FastAPI server with Socket.IO
└── serverBackend/          # Django API (additional backend services)

🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Python 3.8+ with pip
  • Webcam access

Installation

  1. Clone the repository
git clone https://github.com/nelonmelons/krackle.git
cd krackle
  1. Set up the frontend
cd frontendupdated
npm install
npm run dev
  1. Set up the backend
pip install -r requirements.txt
python app.py
  1. Open your browser
    • Frontend: http://localhost:3000
    • Backend API: http://localhost:8000

🎮 How to Play

  1. Create a lobby or join with a 6-digit code
  2. Allow camera access when prompted
  3. Wait for admin to start the game
  4. Keep a straight face while others try to make you laugh
  5. AI detects smiles/laughter - first to crack loses!
  6. Play multiple rounds and crown the ultimate poker face champion

🌟 What Makes It Special

  • Real-time AI emotion detection - No manual voting or cheating
  • Social gaming reimagined - Combines video calls with competitive gaming
  • Hackathon innovation - Built in 48 hours during our Bangkok research exchange
  • Scalable architecture - WebSocket-based for smooth multiplayer experience
  • Mobile-friendly - Responsive design works on any device with a camera

👥 The Team

Built with ❤️ by three computer science students during our research exchange program in Bangkok:

  • Hayson - AI/ML Engineer
  • Nelson - Full-Stack Developer
  • Boya - Frontend Developer

🏆 Hackathon Achievement

This project was conceptualized and built during a 48-hour hackathon in Bangkok, Thailand, while we were participating in a research exchange program. The challenge was to create an innovative application that combines AI with social interaction - and Krackle was born!

🔮 Future Vision

  • Global leaderboards and tournaments
  • Custom game modes (team battles, speed rounds)
  • Enhanced AI models for better emotion detection
  • Mobile app for iOS/Android
  • Integration with streaming platforms for content creators

📄 License

This project is open source and available under the MIT License.


Ready to test your poker face? Visit Krackle.co and see if you can keep from laughing! 😂

Made with AI, powered by laughter, built for fun.

About

Try not to laugh.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 39.6%
  • TypeScript 33.0%
  • Python 15.8%
  • HTML 7.9%
  • CSS 3.7%