Skip to content

Architecture

Principles

  • Server-rendered Blazor: Interactive Server components with ASP.NET Core hosting — not a static site generator or SPA shell.
  • Composition over copy-paste: Reusable section components (Components/Sections/) compose pages from JSON-driven content.
  • File-based content: Placeholder copy in wwwroot/data/pages/*.json loaded by IPageContentService — no external CMS in the baseline.
  • Parallel API layer: MVC controllers for forms and SEO endpoints alongside the Blazor UI.
  • CPM: Central Package Management in Directory.Packages.props; targets net10.0 only.

Request flow

App.razor (HTML shell, assets, GA4)
  └── Routes.razor (Blazor Router)
        └── MainLayout (Header / Drawer / Footer / CookieConsent)
              └── Pages (route-mapped .razor)
                    └── Sections (UIKit section components)
                          └── JSON content via IPageContentService

Parallel API layer:
  ContactController, NewsletterController, SeoController

See the template repo for component and service detail: docs/index.md.

Composition vs other front-end templates

Template Role When to use
Marketing Site (ConnectSoft.MarketingSiteTemplate) Public marketing website (landing, pricing, blog, lead capture) Brochure sites, B2B SaaS marketing, growth campaigns
Blazor Shell (ConnectSoft.Blazor.ShellTemplate) Portal-grade app shell with MFE hosting SaaS admin portals, authenticated dashboards
Blazor Component Library Reusable RCL / design-system components Shared UI primitives across apps
Documentation Site (ConnectSoft.DocumentationTemplate) MkDocs documentation repos Technical docs, ADRs, API references

Pair marketing sites with ConnectSoft backend templates (REST APIs, OIDC) for product backends — the marketing site ships stub lead/email services and scaffold auth pages, not a full identity provider.

Key libraries

  • ConnectSoft.Blazor.UIKit — Navbar, Drawer, Footer, form primitives
  • ConnectSoft.Blazor.ComponentLibrary.Adapters.Flowbite — Toast/dialog adapters
  • ConnectSoft.Extensions.Options — validated options binding
  • ConnectSoft.Extensions.Observability — telemetry defaults
  • Microsoft.FeatureManagement — runtime page-pack toggles

Full package list: repo Directory.Packages.props and MarketingSiteTemplate.csproj.