This sample application demonstrates one way to implement a PWA (Progressive Web Application) functionality in a Blazor WASM app. It is live at https://demos.telerik.com/blazor-financial-portfolio.
You may want to review the MSDN article on using the PWA template and working with PWAs in general: https://docs.microsoft.com/en-us/aspnet/core/blazor/progressive-web-app.
To get the PWA functionality working while testing, you need a "valid" SSL certificate, and the first example from the following Microsoft article can help you generate one for your local machine name, so you can publish the app and test its behavior while developing: https://docs.microsoft.com/en-us/powershell/module/pkiclient/new-selfsignedcertificate?view=win10-ps#examples.
You need to have .NET 8 installed to run the app. You can download it from here.
- Open you CLI and go to
/Client
, then runnpm install
- This restores the needed packages that are later used to create the themes.
- Run
npm run build
command- This will compile a custom theme for the project.
The UI is built mostly with the Telerik Blazor components.
Most of the layout uses media queries and bootstrap to be responsive, some additional logic related to the viewport size is implemented through the BlazorSize package by EdCharbeneau.
Data is generated in services for simplicity in this sample. They do not provide full offline capabilities (such as offline detection and caching changes that can be synced later) as this is beyond the scope of this example.