A modern, multiplayer online blackjack game where you can play with friends or other players from around the world. Built with Flask and Socket.IO for real-time gameplay.
- Live Multiplayer Games: Join tables with other players in real-time
- User Accounts: Create accounts to track your progress and earnings
- Guest Play: Join quickly as a guest with no registration required
- Realistic Gameplay: Authentic blackjack rules and mechanics
- Leaderboards: Compete to be the top player
- Responsive Design: Play on desktop or mobile devices
Visit www.blackjackgame.site to start playing!
- Python 3.9 or higher
- MySQL database
- Virtual environment (recommended)
-
Clone the repository:
git clone https://github.com/ChristianJStarr/web-blackjack.git cd web-blackjack -
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the root directory:FLASK_APP=run.py FLASK_ENV=development SECRET_KEY=your-secure-secret-key DATABASE_URL=mysql+mysqlconnector://user:password@localhost/blackjack -
Run the application:
python run.py
-
Open your browser and navigate to
http://localhost:5000
web-blackjack/
├── blackjack/ # Main package
│ ├── __init__.py # Application factory
│ ├── models/ # Database models
│ ├── game/ # Game logic
│ ├── api/ # API routes
│ ├── web/ # Web routes
│ ├── auth/ # Authentication
│ ├── templates/ # Templates
│ └── static/ # Static files
├── config.py # Configuration
├── requirements.txt # Dependencies
└── run.py # Application runner
Run the test suite with:
python -m pytestAPI documentation is available at /api/v1/doc when the application is running.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Card images from OpenGameArt
- Sound effects from FreeSound
- Special thanks to the Flask and Socket.IO communities
