A modern multiplayer Blackjack game built with Next.js, Socket.IO, and TypeScript. Play against the dealer or with friends in real-time!
- ๐ฎ Single-player and multiplayer modes
- ๐ Real-time gameplay with WebSocket
- ๐ฌ In-game chat system
- ๐จ Multiple table themes
- ๐ Internationalization (English/French)
- ๐ฑ Responsive design (Mobile, Tablet, Desktop)
- ๐ฒ Realistic card dealing animations
- ๐ฐ Betting system with chips
- ๐ฏ Standard Blackjack rules implementation
- ๐ฅ Support for up to 7 players per table
-
Frontend:
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- shadcn/ui
- Socket.IO Client
- Zustand (State Management)
- Framer Motion (Animations)
-
Backend:
- Socket.IO
- Fastify
- TypeScript
apps/
โโโ socket/ # Socket.IO backend server
โโโ www/ # Next.js frontend application
packages/
โโโ game/ # Shared game logic and types
โโโ db/ # Database integration (Supabase) - Not used for now
- Clone the repository:
git clone https://github.com/Steellgold/blackjack.git
cd blackjack
- Install dependencies:
pnpm install
- Create a
.env
file in thepackages/www
directory:
NEXT_PUBLIC_SOCKET_URL="http://localhost:3001/"
- Start the development servers:
pnpm dev
- Open
http://localhost:3000
in your browser to play!
- Each player starts with a defined balance
- Players can bet using various chip denominations
- The goal is to beat the dealer's hand without going over 21
- Players can "Hit" (take another card) or "Stand" (keep current hand)
- Dealer must hit on 16 and stand on 17
- Blackjack (Ace + 10-value card) pays 2.5x the bet
- Regular wins pay 2x the bet
- Push (tie) returns the original bet
- Create private tables
- Join existing tables using table codes
- Watch other players' moves in real-time
- Synchronize game states across all players
- Real-time chat with other players at the table
- Unread message notifications
- Player name and timestamp for each message
- Multiple table themes (Classic, Sky, Modern, Neon, Darkness)
- Theme persistence across sessions
- Smooth theme transitions
- English and French language support
- Persistent language selection
- Complete translation coverage
- Multiple chip denominations
- Visual chip stacking
- Bet placement animations
- Balance management
- Optimized for mobile devices
- Tablet support
- Desktop-first experience
- Adaptive layouts
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.