Nonstop API
Architecture
The overall project consists of a Public API written using .NET Core 2.1, a CMS written as a SPA using Angular 6 and a CMS API also using .NET Core 2.1.
APIs
The project is based on the ASP.NET Zero template which is in turn based on the open-source ASP.NET Boilerplate project. This project provides excellent support for user management and access control as well as "battle-tested" patterns for writing scalable APIs in .NET.
The Public and CMS APIs communicate with a SQL Server database using Microsoft's Entity Framework Library. A Redis Cache is used where possible to reduce direct access to the database.
Key technologies
- .NET Core 2.1
- ASP.NET Zero
- Entity Framework
- Castle Windsor
Project Structure
Nonstop.Application- CMS Application layer codeNonstop.Application.Public- Public Application layer codeNonstop.Core- Domain layer code - e.g. contains the Entities for the database and domain servicesNonstop.EntityFrameworkCore- Entity Framework specific classesNonstop.Migrator- Migrator console appNonstop.Web.AdminAPI- CMS APINonstop.Web.Core- shared code between the CMS and Public APIsNonstop.Tests- Unit testsStorm.AzureStorage- ASP.NET Boilerplate module for accessing Azure StorageStorm.Redis- ASP.NET Boilerplate module for interacting with Redis
CMS Front End
The CMS Front End is implemented as an Angular 6 application using Typescript which connects to the CMS API for its data.
The site is built using the Angular CLI (which uses Webpack under the hood).
The site is currently deployed as a set of static files hosted behind IIS - although it can also be run as a Docker container using nginx as the web server.
The CMS is secured using both local user accounts and MyID. The front end is able to trigger the authentication flow and authentication with the API is managed using JWTs (JSON Web Tokens).
API Access code is generated from the CMS API's Swagger documentation using NSwag which is able to generate a fully functioning Typescript API client.
The CMS uses the ASPNET Zero admin UI.
Key technologies
- Angular 6
- Webpack
- NPM