SmartAdmin.Generator
0.1.0
dotnet add package SmartAdmin.Generator --version 0.1.0
NuGet\Install-Package SmartAdmin.Generator -Version 0.1.0
<PackageReference Include="SmartAdmin.Generator" Version="0.1.0" />
<PackageVersion Include="SmartAdmin.Generator" Version="0.1.0" />
<PackageReference Include="SmartAdmin.Generator" />
paket add SmartAdmin.Generator --version 0.1.0
#r "nuget: SmartAdmin.Generator, 0.1.0"
#:package SmartAdmin.Generator@0.1.0
#addin nuget:?package=SmartAdmin.Generator&version=0.1.0
#tool nuget:?package=SmartAdmin.Generator&version=0.1.0
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>.Domainsrc/<Name>.Applicationsrc/<Name>.Infrastructuresrc/<Name>.APIsrc/<Name>.Sharedsmartadmin.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
- Quick Start Guide
- Installation Guide
- Example Usage Guide
- Common Troubleshooting Guide
- Release Readiness Audit
- Project scaffolding
- Template development
- Generation flow
- Validation
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 | Versions 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. |
-
net8.0
- Microsoft.Data.SqlClient (>= 6.1.1)
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.