Nano ASP.NET SaaS Boilerplate
Admin credentials (all tenants): admin@email.com / Password123!
Sample data resets every hour
Nano ASP.NET SaaS Boilerplate
General
.NET Solution
Vue UI
React UI
Razor Pages
.NET Solution

Solution Overview

The Nano ASP.NET Boilerplate is more of a starter kit than an application framework. There are no forced conventions or reliance on proprietary NuGet packages. You are free to modify the code as you need.

The .NET solution follows clean architecture pattern, with code layered into Domain, Infrastructure, and Application class libraries. WebApi is the entry point of the application and serves as the presentation layer of the project.

The WebApi contains REST controllers for Authorization, Identity, Tenants, and Products. A Postman collection with all of the endpoints is included so that it’s easy to test and build without any reliance on a UI.

Front-End UI

The full version Nano boilerplate provides you with multiple front-end options. Two of these options are JavaScript single page applications, built with React and Vue. These projects are completely separate and interact with the back-end .NET solution via REST API controller endpoints exposed by the WebAPI. The UI is served as static files. Learn more about the UI projects in the React and Vue documentation.

A Razor pages application is another UI option. Razor pages, like MVC, are multi-page, server-rendered pages, which work more like a ‘traditional’ web application. RazorApp is a top-level application in the .NET solution and can be set as the startup project if you plan to use Razor pages.

The following .NET Solution guides will focus only on back-end topics. To learn more about the front-end projects, refer to the guides in their own section.

Back-End Architecture

Separating the application into layers is what’s known as clean architecture. This application is divided into the following layers:

WebApi (Main Application)

The WebApi project is the top-level project and contains the entry point of the application, program.cs. The WebApi can serve static UI files and exposes RESTful API controllers. It contains appsettings.json which is used to configure app-wide settings. The next guide will begin by examining this top-level project.

RazorApp (Main Application)

The RazorApp project is another top-level project and can be used to build an application with Razor pages. RazorApp differs from WebApi in that it contains Razor page views in addition to RESTful API controllers. These views serve as the UI for the user and since this a multi-page architecture; Cookies are used instead of JWT tokens for authentication. These differences are explained further in the Razor pages documentation.

Application

The Application layer houses application services which contain business logic. The Nano boilerplate provides one sample service, the Product Service, which can serve as a guide for creating your own application services. Check the application services documentation for more info.

Infrastructure

Generic functionality can be found in the Infrastructure layer. Services such as identity, multi-tenancy, file upload, persistence, etc. have concrete implementations in the infrastructure layer. These services are provided to the application via dependency injection.

Domain

The Domain layer exists at the lowest level in the application and contains the entity classes. Entities can implement interfaces which provide different behavior such as tenant isolation, audit automation, and soft delete. All entities derive from a base entity.

Next Steps

The next guide will focus on the WebApi, which is the entry point of the application.

Following that, the Application Services look at a sample CRUD service.