Part I Getting Started
Before we start to build our Blog application we are going to take a look at the tools needed for building the static web app and take a look at the languages that can be used (and which are used in the book).
Then we are going to create a near untouched scaffolded solution, deploy to our Static Web App to Azure before finally looking at a couple of simple ways we can run the application locally.
Chapter 1. Setting Up Your Environment (20 pages)
Work through the requirements for working through the book
* Azure Account
* GitHub Account
* Creating the GitHub repo, and cloning it the local machine
* Visual Studio 2022 (used in book examples) / Visual Studio Code
* Alternative languages (book is written in Blazor/C# Azure Functions, but you can follow along with any SPA front end language and Azure Function language)
Chapter 2. Deploying Your First Application (20 pages)
* Creating the client application
* Exploring the scaffolded Blazor app
* Adding the API application
* Creating an Azure Function to consume
* Consuming the function in the Client App
* Pushing to GitHub
Chapter 3. Creating the Static Web AppWA (15 pages)
* Creating the Azure Static Web App
o Create Resource Group
o Create SWA
Base subscription information
Logging into GitHub
Setup for the Blazor Build
* Overview of the GitHub action
* Viewing the deployed application
Chapter 4: Simple Ddebugging (15 pages)
* Difference between local and Azure environments
* Visual Studio debugging
o Local settings for finding the Azure Function
o Setting up CORS for the API Azure Function
o Setting start up projects
o Running the app locally
o Checking origin of pages and data
o Limitations of running in this way
* Static Web App CLI
o Brief intro
o Installing
o Combining Visual Studio and SWA CLI
o Overview of other functionality (to be covered in detail later in the book)
Part II. Starting our Blog Application
Now that we have our scaffolder solution built, it's time to build communication with the outside world, and authenticate ourselves to the application
Chapter 5: Retrieving Data (15 pages)
* Cleanup existing code before continuing
o Remove unused pages/functions/navigation
* Add a shared project for shared models between client and API
* Add a shared model for passing data from the API to the client
* Add a model in the API layer for getting data from an outside data source
* Retrieve the data and convert to internal format
o Example of real world data
o Introduction to JSON file used for the application (to keep the project simple)
* Return data to client
Chapter 6: Displaying Data (15 pages)
* Add Client Service to retrieve and cache data from API
* New pages for blog posts, and retrieve data from service
* Add component for blog post, use on blog posts page
* Add route in navigation menu
* Add earliest blog post to the home page
* Redeploy application and check production
Chapter 7 Static Web App Configuration File (10 pages)
* Limitations of application to date
o Refresh page when not on index page
* Add Static Web Application Configuration
* Add fall back route
* Add route for pages to date
* Overriding HTTP response codes
* Adding Global headers
* Networking options (Standard Tier)
* Forwarding (Standard Tier)
Part III . Authenticating with Our Application
Chapter 8 Authentication (20 pages)
* Built in authentication options
* Authorization options
o Free
25 users with roles
o Standard
25 users with roles
Unlimited with function authorization
o Built in role management
* Functionality available to use from the /.auth endpoints
o Providers
o Logout
o Me endpoint
Chapter 9 Creating new Blog Posts (40 pages)
* Add authentication to the application
o Add authentication to start-up
o Using authentication on pages
o Role based authentication
o Not authorized/authorized content
o Allowing users to logout
o Adding redirection on auth
o Show app working
* Add authentication to API
o Getting access to the header
o Checking roles
o Checking user IDs
* Add blog creation page
o New page for blog creation
o Navigation
o Adding route information to SWA config file (including authorized/role based information)
o Adding (simple) input for blog post
o Save post to API
* App blog post creation function
o Get data
o Check rights
o Create save model
o Fake save data
Part IV Static Web App Working Flows
Chapter 10 SWA Static Web App CLI Command Line Interface (15 pages)
* Reintroduction to SWA
o Recap on current usage
* Serving code using the app parameters
o Serve static content from disk
Publish client application
Run application pointing to publish folder + VS running API
o Service code using HTTP endpoint
* Using the SWA to serve API functions
o Using a running function
o Running the function
o Changing the API port
* Debugging scenarios
o Everything inside of visual studio
o Client inside of visual studio
o API inside of visual studio
* Configuring the SWA using the swa-config-location parameters
* Controlling where the SWA is located using the host and port parameters
* Turning on SSL using the ssl parameters
* Running scripts on startup using the run parameter
* Using the devserver-timeout parameter
Chapter 11 Testing in a Production- like Environment (15 pages)
* Deeper look at GitHub action
* Staging changes
o Making a change to the site
o Create branch and push to GitHub
o Create Pull request
o Anatomy of Stage URL
o Thing to consider with Staging Environments
* Adding automatic checks
* Creating pipelines outside of GitHub
* Managing Deployment Management tokens
Part V Working in an Enterprise Environment
Chapter 12 Exploring Advanced SWA Options (20 pages)
* Adding custom domains to our application
* Adding private endpoints (Standard Tier)
* Adding managed identity (Standard Tier)
* Adding Managed Functions (Standard Tier)
o Why managed functions
o Setting up a managed function
o Staging considerations with managed functions
* Monitoring your Static Web App
Appendices