SmartAdmin.Generator 0.1.0

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

SmartAdmin Generator

SmartAdmin Generator is a .NET 8 command-line tool for scaffolding a clean-architecture admin API solution and generating CRUD module code from a SQL Server schema.

The current release target is an open-source MVP focused on reliable scaffolding, repeatable generation, clear templates, and safe regeneration behavior.

Install

Install from NuGet after the package is published:

dotnet tool install --global SmartAdmin.CLI
smartadmin --help

Install from a local package while developing:

dotnet pack src/SmartAdmin.CLI -c Release -o ./nupkg
dotnet tool install --global --add-source ./nupkg SmartAdmin.CLI
smartadmin --help

If an older local build is installed:

dotnet tool update --global --add-source ./nupkg SmartAdmin.CLI

Quick Start

mkdir MyAdmin
cd MyAdmin
smartadmin new . --name MyAdmin

Configure SQL Server and JWT settings in src/MyAdmin.API/appsettings.json, then create the database:

dotnet tool install --global dotnet-ef
dotnet ef migrations add InitialCreate --project src/MyAdmin.Infrastructure --startup-project src/MyAdmin.API
dotnet ef database update --project src/MyAdmin.Infrastructure --startup-project src/MyAdmin.API

Generate modules from your database:

smartadmin generate
dotnet run --project src/MyAdmin.API

Commands

Create a solution:

smartadmin new ./MyAdmin --name MyAdmin
smartadmin new . --name MyAdmin --architecture clean-architecture
smartadmin new --list-architectures

Generate modules:

smartadmin generate
smartadmin generate --tables dbo.Products,dbo.Orders
smartadmin generate --exclude dbo.AuditLogs --mode Incremental
smartadmin generate --templates ./templates --config ./smartadmin.json
smartadmin generate --mode Preview

Existing files are skipped by default. Use --mode Incremental to update files that still match the SmartAdmin manifest while preserving manually modified files. Use --force only when overwriting generated output is intentional.

Project Layout

smartadmin new creates:

  • src/<Name>.Domain
  • src/<Name>.Application
  • src/<Name>.Infrastructure
  • src/<Name>.API
  • src/<Name>.Shared
  • smartadmin.json
  • <Name>.sln

The scaffold uses the embedded clean-architecture template and records its templateVersion in smartadmin.json.

Templates

Default generation templates are embedded in SmartAdmin.Generator. A sample override set is available in examples/template-overrides.

smartadmin generate --templates /path/to/SmartAdmin/examples/template-overrides --mode Preview

When --templates is provided, files in that folder override matching embedded templates and all other templates fall back to the defaults.

Development

dotnet restore SmartAdmin.sln
dotnet build SmartAdmin.sln
dotnet run --project tests/SmartAdmin.Generator.Tests

Package as a local global tool:

dotnet pack src/SmartAdmin.CLI -c Release -o ./nupkg
dotnet tool install --global --add-source ./nupkg SmartAdmin.CLI

NuGet Metadata

The public packages use:

  • Repository URL: https://github.com/smartadmin/SmartAdmin
  • Repository type: git
  • Project URL: https://github.com/smartadmin/SmartAdmin
  • License: MIT
  • Version: 0.1.0

Documentation

Community

Known MVP Limits

  • SQL Server is the only production-ready database provider.
  • Generated code targets .NET 8.
  • The test harness is a console validation project rather than an xUnit/NUnit suite.
  • Connection strings are entered interactively for generation.
  • Template override validation is file-based and intentionally lightweight.

License

SmartAdmin is licensed under the MIT License.

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

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.1.0 112 6/14/2026

Initial open-source MVP release candidate with embedded scaffolds, SQL Server schema reading, Scriban template rendering, regeneration manifests, and extension points for local customization.