riot.dotnet.ten
1.0.4
dotnet new install riot.dotnet.ten@1.0.4
This package contains a .NET Template Package you can call from the shell/command line.
Riot.js 10.x and ASP.NET Core 10.x Web API Starter Template
This is an ASP.NET Core 10.x Web API backend with a Riot.js 10.x frontend SPA template.
- Uses Microsoft.AspNetCore.SpaProxy with Vite to support the Riot.js development server from the ASP.NET Core project.
- Uses ASP.NET Core minimal API endpoints for lightweight backend APIs.
- Uses FluentValidation for request/model validation.
- Uses Serilog for application logging.
- Supports hot module reloading, so CSS/JS changes are recompiled and updated in the browser for faster app development.
Requirements
- Visual Studio 2026 or later.
- .NET 10 SDK.
- Node.js >= 20.17.0.
- npm >= 10.8.2, normally bundled with Node.js.
Installation
- Open your favorite CLS (Command Line Shell).
- Navigate to your chosen installation folder.
- Enter the command to install the Riot.js/.NET 10 template on your local PC.
dotnet new install riot.dotnet.ten
- To create a new project based on the template, run:
dotnet new riot-dotnet10 -n Demo
Running the demo project
Visual Studio
- Open the demo project in Visual Studio.
- Click the green run button.
- Assuming all requirements are met, Visual Studio will:
- Build the ASP.NET Core app.
- Run
npm installfor the SPA. - Start the application.
- Launch the Vite development server through SPA proxy on port 8080.
- Open the app in the default browser at
http://localhost:5000.
Command Line
cd src
dotnet run
The SPA will be served with hot module reloading via the SPA proxy.
Project Structure
src/
ClientApp/ # Riot.js frontend SPA
app/ # Riot.js components
assets/ # Images, fonts, etc.
public/ # Static files (generated by Vite build)
index.html # SPA entry point
vite.config.js # Vite build configuration
package.json # Node.js dependencies
Endpoints/ # API endpoints
Model/ # Data models
Validators/ # FluentValidation validators
Program.cs # ASP.NET Core entry point
Templating.RiotSPA.csproj
README.md # This file
Environment Configuration
The application reads settings from appsettings.json and appsettings.{ASPNETCORE_ENVIRONMENT}.json.
Default ports:
- Development: Backend on
http://localhost:5000, Vite dev server onhttp://localhost:8080
Troubleshooting
Delete
src/ClientApp/package-lock.jsonand thesrc/ClientApp/node_modulesfolder, then runnpm installagain from thesrc/ClientAppfolder.Confirm the installed .NET SDK with:
dotnet --list-sdksConfirm Node.js and npm versions with:
node --version npm --version
Additional Resources
-
net10.0
- FluentValidation (>= 11.11.0)
- Microsoft.AspNetCore.SpaProxy (>= 10.0.8)
- Serilog.AspNetCore (>= 10.0.0)
- Serilog.Sinks.Console (>= 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.