Skip to content

A web-based single-player card game built with React, Nodejs, and Redis.

Notifications You must be signed in to change notification settings

SahilAli8808/Kitten-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exploding Kittens Game 🐱💣

A web-based single-player card game built with React, Go, and Redis.

🎮 Game Description

Exploding Kittens is an exciting card game where players draw cards from a deck of 5 cards. The objective is to draw all cards without drawing an exploding kitten, unless you have a defuse card!

📸 Screenshots

Gameplay

📦 Features

  • Real-time update of points on the leaderboard for all the users if they are playing simultaneously.
  • Automatically save the game for a user at every stage so the user can continue from where he left off last time.

🛠️ Tech Stack

  • Frontend:
    • React
    • Redux (state management)
    • Radix UI (component library)
    • TailwindCSS (styling)
  • Backend:
    • Nodejs (Express)
  • Database:
    • Redis

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Redis (v6 or higher)

Installation

  1. Clone the repository
git clone https://github.com/SahilAli8808/Kitten-Game.git
cd Kitten-Game
  1. Install frontend dependencies
cd frontend
npm install
  1. Install backend dependencies
cd backend
go mod download
  1. Set up environment variables
# Frontend (.env file in frontend directory)
REACT_APP_API_URL=http://localhost:8080

# Backend (.env file in backend directory)
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password
PORT=5000

Running the Application

  1. Start Redis server
redis-server
  1. Start the backend server
cd backend
go run main.go
  1. Start the frontend development server
cd frontend
npm run dev

The game should now be running at http://localhost:5173

🎯 Game Rules

  1. Start the game by clicking the "Start Game" button
  2. Click on the deck to draw a card
  3. Different cards have different effects:
    • Cat card: Safely removed from deck
    • Defuse card: Collected and can be used to defuse one bomb
    • Shuffle card: Restarts the game with 5 new cards
    • Exploding kitten card: Game over (unless you have a defuse card)
  4. Win by successfully drawing all 5 cards without losing to an exploding kitten

Lets Play!

About

A web-based single-player card game built with React, Nodejs, and Redis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published