Boxty.SharedBase 1.0.2

dotnet add package Boxty.SharedBase --version 1.0.2
                    
NuGet\Install-Package Boxty.SharedBase -Version 1.0.2
                    
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="Boxty.SharedBase" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Boxty.SharedBase" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Boxty.SharedBase" />
                    
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 Boxty.SharedBase --version 1.0.2
                    
#r "nuget: Boxty.SharedBase, 1.0.2"
                    
#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 Boxty.SharedBase@1.0.2
                    
#: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=Boxty.SharedBase&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Boxty.SharedBase&version=1.0.2
                    
Install as a Cake Tool

Boxty

A comprehensive .NET framework providing base components for building multi-tenant applications with Blazor and ASP.NET Core.

Packages

Boxty.ClientBase

Client-side Blazor components and services including:

  • Reusable UI components (CrudGrid, CrudForm, DocumentBrowser, etc.)
  • Authentication helpers and message handlers
  • Document upload services
  • Global state management
  • Frontend generic CRUD services

Boxty.ServerBase

Server-side infrastructure for building APIs with:

  • Multi-tenant and subject-based authorization with OAuth2
  • CRUD command and query patterns
  • Keycloak integration
  • Document handling endpoints
  • Entity base classes with tenant isolation
  • JWT authentication helpers
  • Database context abstractions

Boxty.SharedBase

Shared models, DTOs, and interfaces used by both client and server:

  • Data Transfer Objects (DTOs)
  • Validation attributes
  • Shared enums and helpers
  • Common interfaces

Features

  • Multi-tenancy Support: Built-in tenant isolation at the entity and authorization level
  • Authentication & Authorization: Integration with Keycloak for JWT-based auth
  • CRUD Operations: Generic commands and queries for standard operations
  • Document Management: Upload, storage, and retrieval of documents
  • Blazor Components: Ready-to-use UI components for common scenarios
  • Type-safe: Strongly typed throughout with C# generics

Installation

Install the packages in the relevant inheriting projects (Client, Server, and Shared) via NuGet:

dotnet add package Boxty.ClientBase
dotnet add package Boxty.ServerBase
dotnet add package Boxty.SharedBase

Usage

Server Setup

Click here for a demo repository

// Register your modules
var moduleTypes = new List<Type>
{
    typeof(AuthModule),
    typeof(UserManagementModule)
};

// Register your modules
...
var builder = WebApplication.CreateBuilder(args);

builder.Services.RegisterServices(builder.Configuration, ref moduleTypes, out var registeredModules);

var app = builder.Build();

app.ConfigureServicesAndMapEndpoints(builder.Environment.IsDevelopment() || builder.Environment.IsStaging(), registeredModules);
...

Client Setup

// Add your client services
builder.Services.AddScoped<ILazyLookupService<TenantDto>, LazyLookupService<TenantDto>>();
builder.Services.AddScoped<ILazyLookupService<SubjectDto>, LazyLookupService<SubjectDto>>();
builder.Services.AddScoped<ILazyLookupService<TenantDocumentDto>, LazyLookupService<TenantDocumentDto>>();
builder.Services.AddScoped<ILazyLookupService<SubjectDocumentDto>, LazyLookupService<SubjectDocumentDto>>();
builder.Services.AddScoped<ILazyLookupService<TenantNoteDto>, LazyLookupService<TenantNoteDto>>();
builder.Services.AddScoped<ILazyLookupService<SubjectNoteDto>, LazyLookupService<SubjectNoteDto>>();
builder.Services.AddScoped<IDocumentUploadService, DocumentUploadService>();
builder.Services.AddScoped<IAuthHelperService, AuthHelperService>();
builder.Services.AddScoped<ILocalBackupService, LocalBackupService>();
builder.Services.AddScoped<GlobalStateService>();

Requirements

  • .NET 8.0 or higher
  • ASP.NET Core for server components
  • Blazor for client components

License

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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Mike Samy (mike@boxty.org)

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (2)

Showing the top 2 NuGet packages that depend on Boxty.SharedBase:

Package Downloads
Boxty.ServerBase

Server-side infrastructure for building multi-tenant APIs with Keycloak authentication

Boxty.ClientBase

Client-side Blazor components and services for building multi-tenant applications

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 37 1/17/2026
1.0.1 35 1/17/2026
1.0.0 32 1/17/2026