Try the Live Demo

Some quick notes about the demo:

  • The demo data will reset every hour
  • The demo application is running in a low service tier and may take a few seconds to spin up.
  • In a real deployment, subdomains can be used to resolve tenants. In the demo, tenants are switched at login with the tenant selection.
  • To see data isolation in action, try logging in as different tenant users.
  • Only the root tenant can access the tenant management area.
  • Only admin level users can access the user administration area.
  • Every tenant has a default admin: admin@email.com
  • The password for all users: Password123!

Thank you for your interest. You can also send a message to learn more about the boilerplate.

asp nano

Please allow 10-15 seconds for the app to boot from a cold start. Try the live demo with the links below:

.NET Solution Guide

Solution Overview Guide

The Nano ASP.NET Boilerplate is an ASP.NET 7 Core application which follows the clean architecture pattern. The WebApi project hosts the React SPA and is configured with JWT authentication, the RazorApp project contains Razor pages and has uses Cookie authentication. Both projects provide RESTful http endpoints via API controllers.

This guide is a walkthrough of all the main components in the Web API solution.

Layered architecture

The solution contains 5 projects (or only 4 in the standalone version):

Separating the application into distinct layers is what’s known as Clean Architecture. Along with many other benefits, it keeps the application organized and modular. In basic Monolithic applications, the domain, controllers, and services all reside in one project, separated by folders and namespaces.

AspNano.WebApi

The WebApi project is the top-level project and the entry point of the application (program.cs). The AspNano.WebApi project serves the static files related to the React Application and also contains the RESTful API controllers. These controllers consume services from the Application and Infrastructure projects. This project is configured to use JWT tokens as its authentication scheme. If you don’t want to use Razor pages, you can simply remove the AspNano.RazorApp project from your solution.

AspNano.RazorApp

The RazorApp project is another top-level project with an entry point to application (program.cs). The AspNano.RazorApp contains Razor page views and also contains RESTful API controllers. The controllers and views consume services from the Application and Infrastructure projects. The configuration is slightly different than the WebApi project, with the main difference being the Identity configuration. In the RazorApp project, Cookies are used instead of JWT tokens for authentication. If you plan to build with Razor pages, you can remove the AspNano.WebApi project from your solution, as well as the Auth folder from the Infrastructure project. Authentication is handled within the RazorApp project.

AspNano.Infrastructure

The infrastructure project contains generic functionality services such as identity, multitenancy, mailing, image upload, mapper, utility classes, and persistence.

AspNano.Application

The application project contains application specific services (business logic). The Venue Service is a sample which can serve as a guide for creating new application services.

AspNano.Domain

The domain is the lowest-level project which contains the entity classes.