BBScoreboard is a cross-platform ASP.NET Core app for live basketball scoring, gameplay sync, and stats.
- .NET 10 (
net10.0) - ASP.NET Core Razor Pages + API controllers
- EF Core 10 with dual database support:
- PostgreSQL (default)
- SQL Server (supported)
- ASP.NET Core Identity (role-based auth)
- xUnit test suite + CI matrix
src/BBScoreboard.Web- web UI + APIsrc/BBScoreboard.Application- use cases and gameplay servicessrc/BBScoreboard.Domain- entities, enums, constantssrc/BBScoreboard.Infrastructure- EF Core, Identity, migrationssrc/BBScoreboard.Tests- unit/API/RBAC/provider testsdocs/- migration and validation checklist
- .NET 10 SDK
- Docker Desktop (optional, for compose-based runtime checks)
- Copy
.env.exampleto.envand set real secrets. - Restore tools and packages:
dotnet tool restoredotnet restore src/BBScoreboard.slnx
- Build and test:
dotnet build src/BBScoreboard.slnx -c Releasedotnet test src/BBScoreboard.slnx -c Release
- Run locally (PostgreSQL default):
- Set env vars:
Database__Provider=postgresConnectionStrings__Postgres=<your-connection-string>BootstrapAdmin__Email=<admin-email>BootstrapAdmin__Password=<admin-password>
- Start app:
dotnet run --project src/BBScoreboard.Web
- Set env vars:
After signing in as an admin:
- Open
/Admin/Setup. - Click
Create Demo Game Setup. - Click
Open Managerto start and play the seeded demo game.
The demo flow creates:
- one demo season
- two demo teams
- eight players per team
- one ready-to-start game
Migrations are maintained separately per provider:
src/BBScoreboard.Infrastructure/Migrations/Postgressrc/BBScoreboard.Infrastructure/Migrations/SqlServer
Apply migrations manually:
- PostgreSQL:
Database__Provider=postgres ConnectionStrings__Postgres="<conn>" dotnet tool run dotnet-ef database update --project src/BBScoreboard.Infrastructure --startup-project src/BBScoreboard.Web --context PostgresBbScoreboardDbContext
- SQL Server:
Database__Provider=sqlserver ConnectionStrings__SqlServer="<conn>" dotnet tool run dotnet-ef database update --project src/BBScoreboard.Infrastructure --startup-project src/BBScoreboard.Web --context SqlServerBbScoreboardDbContext
- Default (PostgreSQL):
docker compose up -d --build web
- SQL Server profile:
docker compose --profile sqlserver up -d --build web-sqlserver
Make sure these are set in .env: POSTGRES_PASSWORD, BOOTSTRAP_ADMIN_EMAIL, BOOTSTRAP_ADMIN_PASSWORD, and for SQL Server profile MSSQL_SA_PASSWORD.
GitHub Actions workflow runs:
- cross-platform build/test (Linux/macOS/Windows)
- runtime smoke checks
- PostgreSQL and SQL Server integration tests
- Docker compose profile smoke checks
See: .github/workflows/ci.yml
- No plaintext runtime passwords are committed in active app config.
- Bootstrap admin is created/updated only when credentials are provided.
- On startup, the bootstrap admin password is synced to
BootstrapAdmin__Passwordfor reliable local sign-in. - Change bootstrap credentials immediately after first login.
MIT
