SharedTools.Scoreboard 0.0.19

There is a newer version of this package available.
See the version list below for details.
dotnet add package SharedTools.Scoreboard --version 0.0.19
                    
NuGet\Install-Package SharedTools.Scoreboard -Version 0.0.19
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharedTools.Scoreboard" Version="0.0.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharedTools.Scoreboard" Version="0.0.19" />
                    
Directory.Packages.props
<PackageReference Include="SharedTools.Scoreboard" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharedTools.Scoreboard --version 0.0.19
                    
#r "nuget: SharedTools.Scoreboard, 0.0.19"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharedTools.Scoreboard@0.0.19
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharedTools.Scoreboard&version=0.0.19
                    
Install as a Cake Addin
#tool nuget:?package=SharedTools.Scoreboard&version=0.0.19
                    
Install as a Cake Tool

Scoreboard

A dynamic web-based scoreboard application built as a SharedTools module for ASP.NET Core. This application provides real-time score tracking with persistent storage using Azure Blob Storage.

Scoreboard Application Screenshot

Overview

The Scoreboard application is built using a modular architecture that separates the scoreboard functionality into a loadable module (Scoreboard.App) and a lightweight host application (Scoreboard.Web). This design allows the scoreboard to be:

  • Dynamically loaded - The module can be loaded at runtime from NuGet packages
  • Self-contained - All assets, dependencies, and functionality are packaged together
  • Reusable - Can be easily integrated into other ASP.NET Core applications
  • Isolated - Module dependencies don't conflict with the host application

Features

  • Real-time Score Tracking - Keep track of scores for multiple players
  • Persistent Storage - Game history saved to Azure Blob Storage
  • Responsive Design - Works on desktop and mobile devices
  • Audio Feedback - Buzzer sounds for game events
  • Customizable Players - Add, remove, and manage player profiles
  • Full-screen Mode - Optimized display for presentations
  • Rate Limiting - Built-in protection against API abuse

Project Structure

Scoreboard/
└── src/
    ├── Scoreboard.App/          # The scoreboard module
    │   ├── ScoreboardModule.cs  # Module entry point implementing IApplicationPartModule
    │   ├── ScoreboardApiMethods.cs # API endpoints for the module
    │   └── wwwroot/            # Static assets (HTML, CSS, JS, audio)
    │       ├── index.html      # Main scoreboard UI
    │       ├── app.js          # Client-side JavaScript
    │       ├── styles.css      # Styling
    │       ├── audio/          # Sound effects
    │       └── icons/          # UI icons
    │
    └── Scoreboard.Web/         # The host application
        └── Program.cs          # Minimal host for loading modules

Quick Start

Prerequisites

  • .NET 10.0 SDK or later
  • Azure Storage Account (or use local development storage)
  • Visual Studio 2022 or VS Code (optional)

Running Locally

  1. Clone the repository

    git clone https://github.com/andrewboudreau/Scoreboard.git
    cd Scoreboard
    
  2. Configure Azure Storage (optional - for persistence)

    Update src/Scoreboard.Web/appsettings.json:

    {
      "BlobStorage": {
        "ConnectionString": "UseDevelopmentStorage=true",
        "ContainerName": "scoreboard-data"
      }
    }
    
  3. Build and run

    dotnet build
    cd src/Scoreboard.Web
    dotnet run
    
  4. Open in browser Navigate to http://localhost:5000/Scoreboard/

Development

Building the Module

The Scoreboard.App module is automatically packed to the local NuGet feed during Debug builds:

cd src/Scoreboard.App
dotnet pack -c Debug

This outputs the package to C:\LocalNuGet for local testing.

Module Architecture

The scoreboard is implemented as a SharedTools module following these patterns:

  1. Module Class (ScoreboardModule.cs)

    • Implements IApplicationPartModule
    • Registers services (Azure Blob Storage, Rate Limiting)
    • Maps API endpoints with /Scoreboard/ prefix
    • Configures middleware
  2. API Methods (ScoreboardApiMethods.cs)

    • Static methods for handling HTTP requests
    • Upload game history to blob storage
    • Test blob storage connectivity
  3. Static Assets (wwwroot/)

    • Served via /_content/Scoreboard/ path
    • Includes HTML, CSS, JavaScript, and audio files
    • Packaged as embedded resources in the module

Testing the Module

The Scoreboard.Web project serves as a test host:

// Program.cs - Minimal host application
await builder.AddApplicationPartModules(["ScoreboardModule"]);
app.UseApplicationPartModules();

Configuration

Azure Blob Storage

Configure blob storage in appsettings.json:

{
  "BlobStorage": {
    "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=...",
    "ContainerName": "scoreboard-data"
  }
}

For local development, use the Azure Storage Emulator:

{
  "BlobStorage": {
    "ConnectionString": "UseDevelopmentStorage=true",
    "ContainerName": "scoreboard-data"
  }
}

Rate Limiting

The module includes built-in rate limiting:

  • 6 requests per minute per IP address
  • Applied only to /Scoreboard/ endpoints
  • Returns HTTP 429 when limit exceeded

API Endpoints

  • GET /Scoreboard/ - Main scoreboard UI (redirects to index.html)
  • POST /Scoreboard/api/upload-history - Upload game history to blob storage
  • GET /Scoreboard/api/test-blob-connection - Test blob storage connectivity

Publishing

To Local NuGet Feed

cd src/Scoreboard.App
dotnet pack -c Debug

To NuGet.org

  1. Update version in Directory.Build.props
  2. Run the GitHub Actions workflow "Tag and Publish"
  3. Package will be published to NuGet.org

See MODULE_PUBLISH.md for detailed publishing instructions.

Integration

To use the Scoreboard module in another ASP.NET Core application:

  1. Add NuGet package

    dotnet add package Scoreboard.App
    
  2. Load the module

    await builder.AddApplicationPartModules(["ScoreboardModule"]);
    
  3. Activate modules

    app.UseApplicationPartModules();
    
  4. Configure blob storage in your host's appsettings.json

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.22 42 8/10/2025
0.0.21 163 8/7/2025
0.0.19 162 8/7/2025
0.0.16 163 8/7/2025