Section
Examples
Inspect concrete, working proof that shows the system behaving in practice.
In this section
Browse the public pages here.
-
RazorWire MVC Example Example
This sample is the concrete proof behind the RazorWire package README. It shows how returned Razor fragments, islands, and SSE fit into a normal ASP.NET Core MVC app without a separate client rendering stack.
-
AppSurface ASP.NET Core DevAuth Example Example
This example proves [`ForgeTrust.AppSurface.Auth.AspNetCore.DevAuth`](../../Auth/ForgeTrust.AppSurface.Auth.AspNetCore.DevAuth/README.md) can give a local package consumer a fake, visible persona lab without configuring an external identity provider. DevAuth activates only in `Development` by default and can opt in additional local/proof environments through `AllowedEnvironmentNames`.
-
AppSurface Auth ASP.NET Core Bridge Example Example
This example proves `ForgeTrust.AppSurface.Auth.AspNetCore` can consume a normal ASP.NET Core authentication and authorization setup without owning it.
-
AppSurface Auth ASP.NET Core OIDC Example Example
This example proves `ForgeTrust.AppSurface.Auth.AspNetCore.Oidc` can register named cookie and OIDC schemes without owning host defaults or requiring a live identity provider for local diagnostics.
-
AppSurface Auth Aspire Keycloak AppHost Example
This AppHost proves `ForgeTrust.AppSurface.Auth.Aspire.Keycloak` with real local Keycloak and a paired ASP.NET Core web app that uses `ForgeTrust.AppSurface.Auth.AspNetCore.Oidc`.
-
AppSurface Auth Aspire Keycloak Verifier Example
This helper is run by the `verify` profile in `examples/auth-aspire-keycloak-apphost`. It probes the AppHost-backed web app and checks generated realm evidence. Run it through the AppHost rather than directly:
-
AppSurface Auth Aspire Keycloak Web Proof Example
This web app uses `ForgeTrust.AppSurface.Auth.AspNetCore.Oidc` directly. It does not reference `ForgeTrust.AppSurface.Auth.Aspire.Keycloak`; the AppHost package only supplies local provider configuration.
-
AppSurface Auth Web/RazorWire Proof Example
This sample is the five-minute proof for `ForgeTrust.AppSurface.Auth.AspNetCore` plus `ForgeTrust.RazorWire.Auth.AspNetCore`: one host-owned ASP.NET Core policy flows through AppSurface into a Minimal API response and RazorWire auth projection markup.
-
AppSurface Flow Approval Example Example
This example shows the first local-development path for AppSurface Flow: define a typed graph, run until a wait, then resume the same node with an external event.
-
AppSurface Flow Generated Authoring Example Example
This example shows the generated-authoring path for AppSurface Flow. The app defines a partial flow specification with `[FlowAuthoring]`, typed input and output ports, generated outcome cases, a generated envelope context, a generated graph mapping helper, and generated adapters that lower into the existing in-memory runner.
-
AppSurface Product Readiness Lab Example
This example is a local evaluator for AppSurface package-family adoption. The readiness report is the product; the small SaaS-shaped app exists to generate evidence.
-
AppSurface Web PWA Runtime Foundation Proof Example
This example shows the AppSurface Web install, independent application badging, offline, and shared push-worker foundation. Its explicit registration button proves browser worker activation. A separate accessible badging card keeps a synthetic in-app attention count authoritative while demonstrating accepted, unsupported, and sanitized rejected requests without claiming the home-screen icon changed. Without external keys, the sample still provides worker/helper readiness evidence; the optional push rail is reported as `not-configured`, while notification permission, subscription, and delivery remain unevaluated. In Development, externally configured keys activate the optional [`ForgeTrust.AppSurface.Web.Push`](../../Web/ForgeTrust.AppSurface.Web.Push/README.md) proof card with DevAuth personas, in-memory app-owned custody, direct-gesture subscription, and a truthful example-only protected host action.
-
Aspire AppHost Example Example
This example proves the local `ForgeTrust.AppSurface.Aspire` adoption path. It starts an Aspire AppHost through `AspireApp<TModule>`, selects a profile command with CliFx, and composes the existing web example through reusable Aspire components. The web example registers `ForgeTrust.AppSurface.Observability`, so Aspire-provided OTLP configuration flows into the app-side OpenTelemetry logging, tracing, and metrics setup.
-
Config validation example Example
This sample shows scalar validation on a strongly typed AppSurface config wrapper.
-
Console app example Example
This sample demonstrates how to build a console application with **ForgeTrust.AppSurface**.
-
Durable PostgreSQL local tutorial Example
This public-preview tutorial proves the current [`ForgeTrust.AppSurface.Durable.PostgreSql`](../../Durable/ForgeTrust.AppSurface.Durable.PostgreSql/README.md) adoption path on a disposable PostgreSQL 16+ database. It is a local composition reference, not production operations guidance. Application startup never applies DDL.
-
Examples Example
This directory contains sample applications that use **ForgeTrust.AppSurface**.
-
LocalSecrets example Example
This sample shows the complete local-secret workflow without printing the secret value.
-
Named canary adoption lab Example
This local lab shows the complete boundary around a protected AppSurface named canary: your application triggers a workflow and records its evidence, AppSurface evaluates that existing evidence, and your caller chooses what to do with the [bounded `appsurface canary poll` result](../../Cli/ForgeTrust.AppSurface.Cli/README.md#appsurface-canary-poll).
-
Native Aspire deployment example Example
This AppHost calls `DistributedApplication.CreateBuilder(args)` so Aspire owns operation mode, environment, parameters, output path, step discovery, and named-step execution. It annotates the existing `ProjectResource` once and assigns it to one explicit AppSurface compute environment.
-
Northstar brochure starter Example
Northstar is a fictional editorial studio and a small, package-first MVC starter. The application owns its controllers, views, routes, CSS, and artwork; [ForgeTrust.RazorWire](../../Web/ForgeTrust.RazorWire/README.md) supplies the host integration and runtime tag helpers.
-
Product Readiness Lab AppHost Example
This AppHost runs `examples/product-readiness-lab` with a local Postgres resource for product/domain state.
-
Tenant theme selection proof Example
This development-only host demonstrates the [AppSurface Web host-owned theme-selection adapter](../../Web/ForgeTrust.AppSurface.Web/README.md#host-owned-theme-selection). It intentionally maps two authorized tenant identities to the same sealed `shared-blue` pair while rendering tenant-distinct body content. That proves why a theme-pair id is not a safe response-cache key.
-
Web app example Example
This example shows how to build a minimal ASP.NET Core application using **ForgeTrust.AppSurface.Web**.
-
Web error-page proof Example
This example is a confidence proof for the `ForgeTrust.AppSurface.Web` error-page conventions. It does not add new framework behavior. It runs a small app and verifies that browser users get conventional HTML status and exception pages while API clients avoid surprise browser HTML.