Fast .NET scaffolder for Blazor + CQRS + Vertical Slice Architecture solutions
BlitzSliceForge (bsf) is a CLI tool that scaffolds a fully structured .NET 9 solution following Clean Architecture and Vertical Slice principles in seconds. Stop wasting time creating projects, linking references, and setting up folder structures manually โ let bsf do the heavy lifting.
- ๐ One-command scaffolding โ generates an entire solution structure instantly
- ๐๏ธ Clean Architecture โ Domain, Application, Infrastructure, and Web layers out of the box
- ๐ Blazor Interactive โ pre-configured Blazor project with
Autointeractivity mode - ๐งช Test projects included โ test projects created and linked for every layer
- ๐ Opinionated folder layout โ
src/,tests/,docs/adr/,docker/,.github/workflows/ - ๐ Common files โ
.gitignore,global.json,Directory.Build.props, andREADME.mdauto-generated - โ๏ธ Framework selection โ choose target .NET version (e.g., net8.0, net9.0) with a simple parameter
- ๐ SDK validation โ verifies the required .NET SDK is installed before scaffolding
- ๐ฆ Distributed as a .NET tool โ install globally and use anywhere
- .NET 9 SDK or later
dotnet tool install --global BlitzSliceForge.Clibsf --help
Descripciรณn:
bsf - Blitz Slice Forge
Uso:
BlitzSliceForge.Cli [opciones]
Opciones:
-n, --name <n> (REQUERIDO) Name of the solution
-f, --framework <net8|net9> Target .NET framework version (e.g. net8)
-o, --output <o> Output path (default: solution name)
-?, -h, --help Mostrar ayuda e informaciรณn de uso
--version Mostrar informaciรณn de la versiรณndotnet tool uninstall BlitzSliceForge.Cli --tool-path .tools bsf --name MyAwesomeAppThis creates a solution named MyAwesomeApp in a folder with the same name in the current directory.
bsf --name MyAwesomeApp --framework net8bsf --name MyAwesomeApp --output C:/Projects/MyAwesomeApp| Option | Alias | Description | Required |
|---|---|---|---|
--name |
-n |
Name of the solution | โ Yes |
--framework |
-f |
Target .NET framework version (e.g. net8) | โ No |
--output |
-o |
Output path (defaults to solution name) | โ No |
When you run bsf --name MyAwesomeApp, the following structure is generated:
MyAwesomeApp/
โโโ .github/
โ โโโ workflows/ # CI/CD workflow templates
โโโ docker/ # Docker configuration
โโโ docs/
โ โโโ adr/ # Architecture Decision Records
โโโ src/
โ โโโ MyAwesomeApp.Domain/ # Entities, Value Objects, Interfaces
โ โโโ MyAwesomeApp.Application/ # Use Cases, CQRS Handlers, DTOs
โ โโโ MyAwesomeApp.Infrastructure/ # EF Core, External Services, Repos
โ โโโ MyAwesomeApp.Web/ # Blazor Server/WASM (Auto mode)
โโโ tests/
โ โโโ MyAwesomeApp.Domain/ # Domain unit tests
โ โโโ MyAwesomeApp.Application/ # Application unit tests
โ โโโ MyAwesomeApp.Infrastructure/ # Infrastructure unit tests
โโโ .gitignore
โโโ Directory.Build.props
โโโ global.json
โโโ README.md
โโโ MyAwesomeApp.sln
The generated projects are automatically linked following Clean Architecture dependency rules:
graph TD
A["๐ MyAwesomeApp.Web<br/><i>Blazor - Presentation</i>"] --> B
B["โ๏ธ MyAwesomeApp.Application<br/><i>Use Cases / CQRS</i>"] --> C
B --> D
D["๐ MyAwesomeApp.Infrastructure<br/><i>Data Access / External</i>"] --> C
C["๐งฑ MyAwesomeApp.Domain<br/><i>Entities / Core Logic</i>"]
style A fill:#6C3FC5,stroke:#4A2A8A,color:#fff
style B fill:#0078D4,stroke:#005A9E,color:#fff
style C fill:#107C10,stroke:#0B5E0B,color:#fff
style D fill:#D83B01,stroke:#A52C00,color:#fff
Application โ references Domain + Infrastructure Infrastructure โ references Domain
timeline
title BlitzSliceForge Roadmap
section MVP โ
v0.0.1 : Solution scaffolding
: Clean Architecture layers
: Blazor Web project (Auto)
: Test projects per layer
: Project reference linking
: Common file templates
: SDK version validation
section Next Steps ๐ฎ
Backlog : Entity scaffolding per feature
: CQRS handler generation
: Vertical Slice feature scaffolding
: MediatR integration templates
: Docker Compose templates
: GitHub Actions CI/CD templates
: NuGet package publishing
| Feature | Status |
|---|---|
| Solution generation | โ Done |
| Clean Architecture project layout | โ Done |
| Blazor Web project (Auto interactivity) | โ Done |
| Test projects for each layer | โ Done |
| Automatic project reference linking | โ Done |
Common templates (.gitignore, global.json, etc.) |
โ Done |
| .NET SDK validation | โ Done |
| Global .NET tool distribution | โ Done |
| Framework selection | โ Done |
| Unit tests for CLI core logic | โ Done |
| Feature | Status |
|---|---|
| Entity scaffolding per feature/slice | ๐ Planned |
| CQRS command/query handler generation | ๐ Planned |
| Vertical Slice feature folder scaffolding | ๐ Planned |
| MediatR integration templates | ๐ Planned |
| Docker Compose templates | ๐ Planned |
| GitHub Actions CI/CD pipelines | ๐ Planned |
# Clone the repository
git clone https://github.com/AlejBlasco/BlitzSliceForge.git
cd BlitzSliceForge
# Build the project
dotnet build
# Run locally
dotnet run --project src/BlitzSliceForge.Cli -- --name TestSolution
# Pack as a .NET tool
dotnet pack src/BlitzSliceForge.Cli -c Release
# Install locally from the generated .nupkg
dotnet tool install --global --add-source ./src/BlitzSliceForge.Cli/nupkg BlitzSliceForge.Clidotnet testThe test suite covers the core logic of BlitzSliceForge.Cli using xUnit, Moq and FluentAssertions.
| Area | Test class | What is verified |
|---|---|---|
| Enums | AvailableFrameworksEnumExtensionsTests |
TFM string mapping, out-of-range exception |
| Models | GenerationOptionsTests |
Default values, property assignment |
| Models | ProjectGenerationOptionsTests |
ProjectName, ProjectDirectory, FullProjectPath computed properties |
| Services | DotNetCliResponseTests |
Constructor, GetOutputLines with empty / Unix / Windows / mixed line endings |
| Services | SdkCheckerServiceTests |
Null guard, SDK found โ true, not found โ false, CLI called once |
| Services | TemplateRendererServiceTests |
Missing template, static render, model interpolation, cancellation |
| Generators | ProjectTemplateTests |
Project count, src/tests layout, framework propagation, Blazor options |
| Generators | ProjectGeneratorTests |
Null guard, CLI invocation count, directory creation, reference linking |
dotnet test --collect:"XPlat Code Coverage"This project is licensed under the MIT License โ see the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
All important decisions are documented in docs/adr/