Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack

Open source multiplayer blackjack table. Up to 6 players (human or computer) + dealer, casino rules, configurable-size shoe (6 decks default). Join a table via a shareable link; a computer player steps aside whenever a human takes its seat.

Built with .NET (API + game engine, orchestrated via .NET Aspire) and React (table UI).

Structure

src/
  Blackjack/                  Game engine — cards, shoe, hand evaluation, dealer play, payouts, bot strategy
  Blackjack.Api/              .NET API — REST endpoints + SignalR hub for live play
  web/                        React table UI
  Blackjack.AppHost/          .NET Aspire orchestration host for local dev
  Blackjack.ServiceDefaults/  Shared .NET Aspire service defaults (telemetry, health checks)
tests/
  api/Blackjack.Tests.Unit/       Engine unit tests
  api/Blackjack.Api.Tests.Unit/   API/coordinator unit tests
docs/
  plans/                     Implementation plans/output docs

Code in the API is organized by feature area (Game, Realtime) rather than by technical layer.

Prerequisites

  • .NET 10 SDK
  • Node.js 20+
  • Aspire CLI (dotnet tool install -g Aspire.Cli or dotnet tool restore if pinned in the repo)
  • Docker (Aspire uses it to run the Redis cache dependency)

Running locally

Blackjack.AppHost (.NET Aspire) orchestrates the API, table UI, and Redis cache for local development.

./dev-build.sh
aspire run --project src/Blackjack.AppHost

This opens the Aspire dashboard with links to the API (Scalar docs) and the web UI.

Running without Aspire

Start Redis yourself, then run the API and web app separately:

docker run -p 6379:6379 redis:7-alpine

Cache__ConnectionString=localhost:6379 dotnet run --project src/Blackjack.Api

npm --prefix src/web install
services__api__http__0=http://localhost:5000 npm --prefix src/web run dev

Testing

dotnet test
npm --prefix src/web test

License

MIT — see LICENSE.

About

Blackjack game, basic strategy rules and card counting trainer

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages