A web-based single-player card game built with React, Go, and Redis.
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!
- 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.
- Frontend:
- React
- Redux (state management)
- Radix UI (component library)
- TailwindCSS (styling)
- Backend:
- Nodejs (Express)
- Database:
- Redis
- Node.js (v16 or higher)
- Redis (v6 or higher)
- Clone the repository
git clone https://github.com/SahilAli8808/Kitten-Game.git
cd Kitten-Game
- Install frontend dependencies
cd frontend
npm install
- Install backend dependencies
cd backend
go mod download
- 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
- Start Redis server
redis-server
- Start the backend server
cd backend
go run main.go
- Start the frontend development server
cd frontend
npm run dev
The game should now be running at http://localhost:5173
- Start the game by clicking the "Start Game" button
- Click on the deck to draw a card
- 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)
- Win by successfully drawing all 5 cards without losing to an exploding kitten