Project tutorial

Build a Blazor Blog

Build Ironwharf Gazette with Blazor SSR, Bootstrap 5, hand-wired cookie auth, EF Core, owned post CRUD, search, password recovery, and Azure/Kestrel deployment.

  • Difficulty Intermediate
  • Parts 12
  • Stack C#, ASP.NET Core 8, Blazor SSR, Bootstrap 5, EF Core, PostgreSQL, BCrypt.Net-Next

How this project works

Ironwharf Gazette is an original teaching blog in twelve complete snapshots. Clone once and run any numbered folder without rebuilding earlier stages.

The path starts with minimal ASP.NET hosting, adds Blazor components and Bootstrap, then introduces isolated Postgres databases. Later parts add cookie auth, media, ownership, pagination, search, reset tokens, and Azure deploy notes.

Snapshots 4–12 seed [email protected] and [email protected] with password123.

Local Postgres runs through Docker Compose on host port 5445 with databases ironwharf_01ironwharf_12.

Start with part 1 Open GitHub repo

Parts in order

Work through the parts in sequence. Each lesson explains the ideas in plain language, then points you to a complete runnable snapshot on GitHub for that stage.

  1. Part 1: Getting StartedCreate a minimal ASP.NET app on port 5081.
  2. Part 2: RoutingOrganize Blazor component routes with MapRazorComponents.
  3. Part 3: Layout and UIRender Blazor layouts with Bootstrap 5 CDN.
  4. Part 4: Data LayerPersist authors and posts with EF Core and PostgreSQL.
  5. Part 5: Feed and DetailBuild a database-backed feed and post detail components.
  6. Part 6: RegistrationValidate accounts and store BCrypt password hashes.
  7. Part 7: Login and SessionsAuthenticate with hand-wired cookie auth.
  8. Part 8: Profiles and MediaShow author profiles and accept constrained avatar uploads.
  9. Part 9: Posts CRUD and OwnershipCreate, edit, and delete posts with owner authorization.
  10. Part 10: Pagination and SearchPaginate the feed and search post text.
  11. Part 11: Password ResetIssue expiring one-use password reset tokens.
  12. Part 12: DeployPrepare Ironwharf Gazette for Azure Container Apps and Kestrel.