SkillAgentSearch skills...

Headway

A .NET 7.0 Blazor framework for building configurable applications fast. Supporting both hosting models, Blazor WebAssembly and Blazor Server, a WebApi for accessing data and an Identity Provider for authentication.

Install / Use

/learn @grantcolley/Headway

README

Alt text

.NET 7.0, Blazor WebAssembly, Blazor Server, ASP.NET Core Web API, Auth0, IdentityServer4, OAuth 2.0, MudBlazor, Entity Framework Core, MS SQL Server, SQLite


Build status

Headway is a framework for building configurable Blazor applications fast. It is based on the blazor-solution-setup project, providing a solution for a Blazor app supporting both hosting models, Blazor WebAssembly and Blazor Server, a WebApi for accessing data and an Identity Provider for authentication.

Alt text

Table of Contents

The Framework

  • Headway.BlazorWebassemblyApp - Blazor WASM running client-side on the browser.
  • Headway.BlazorServerApp - Blazor Server running updates and event handling on the server over a SignalR connection.
  • Headway.Razor.Shared - A Razor Class Library with shared components and functionality serving both Blazor hosting models.
  • Headway.Razor.Controls - A Razor Class Library containing common Razor components.
  • Headway.Core - A Class Library for shared classes and interfaces.
  • Headway.RequestApi - a Class Library for handling requests to the WebApi.
  • Headway.WebApi - An ASP.NET Core Web API for authenticated users to access data persisted in the data store.
  • Headway.Repository - a Class Library for accessing the data store behind the WebApi.
  • Identity Provider - An IdentityServer4 ASP.NET Core Web API, providing an OpenID Connect and OAuth 2.0 framework, for authentication.

Alt text

Getting Started

Seed Data

To help get you started the Headway framework comes with seed data that provides basic configuration for a default navigation menu, roles, permissions and a couple of users.

The default seed data comes with two user accounts which will need to be registered with an identity provider that will issue a token to the user containing a RoleClaim called headwayuser. The two default users are: |User|Headway Role|Indentity Provider RoleClaim| |----|------------|----------------------------| |alice@email.com|Admin|headwayuser| |grant@email.com|Developer|headwayuser|

The database and schema can be created using EntityFramework Migrations.

Building an Example Headway Application

An example application will be created using Headway to demonstrate features available the Headway framework including, configuring dynamically rendered page layout, creating a navigation menu, configuring a workflow, binding page layout to the workflow, securing the application using OAuth 2.0 authentication and restricting users access and functionality with by assigning roles and permissions.

Introduction to RemediatR

The example application is called RemediatR. RemediatR will provide a platform to refund (remediate or redress) customers that have been wronged in some way e.g. a customer who bought a product that does not live up to it's commitments. The remediation flow will start with creating the redress case with the relevant data including customer, redress program and product data. The case progresses to refund calculation and verification, followed by sending a communication to the customer and finally end with a payment to the customer of the refunded amount.

Different users will be responsible for different stages in the flow. They will be assigned a role to reflect their responsibility. The roles will be as follows:

  • Redress Case Owner – creates, monitors and progresses the redress case from start through to completion
  • Redress Reviewer – reviews the redress case at critical points e.g. prior to customer communication or redress completion
  • Refund Assessor – calculates the refund amount, including any compensatory interest due
  • Refund Reviewer – reviews the refund calculated as part of a four-eyes check to ensure the refunded amount is accurate

The RemediatR Flow is as follows:

Alt text

Building RemediatR in Easy Steps

RemediatR can be built using the Headway platform in several easy steps involving creating a few models and repository layer, and configuring the rest.

Create

1. Create the RemediatR Projects

2. Create the Models and Interfaces

3. Create the Repository

This example uses EntityFramework Code First.

  • In Headway.RemediatR.Repository
    • Add a reference to project Headway.Repository
    • Add a reference to project Headway.RemediatR.Core
    • Create RemediatRRepository class.
  • In Headway.Repository
    • Add a reference to project Headway.RemediatR.Core
    • Update [ApplicationDbContext](https://github.com/grantcolley/headway/blob/main/src/Headway.Repository/Data/ApplicationDb
View on GitHub
GitHub Stars36
CategoryCustomer
Updated8mo ago
Forks9

Languages

C#

Security Score

87/100

Audited on Aug 5, 2025

No findings