Context pack

Select latest-version context options and export them as a ZIP file.

Latest options

configuration-keys

Configuration and secrets
configuration-keys website saas game configuration secrets environment-variables
Context text
DMB package configuration keys must use the logical form DMB:{Package}:{Section}:{Name}.
Environment variables must replace each ':' with '__', for example DMB:Stripe:SecretKey becomes DMB__Stripe__SecretKey.
Keep secret keys and non-secret runtime settings in the same DMB:{Package}:... namespace when they belong to the same feature.
Do not introduce new package variables under implementation class names when a DMB:{Package}:... key exists or can be introduced.

configuration-lifecycle

Configuration lifecycle
configuration-lifecycle website saas game configuration startup generic-configuration
Context text
Use GenericConfiguration<T> and package-level configuration classes for DMB package startup.
Load ServerHelperConfiguration before package configuration that depends on server defaults, secrets, localization, URL composition, cookies, or sessions.
Keep configuration loading deterministic and document when new behavior runs: before file loading, during file loading, after file loading, or during application middleware registration.

cookie-session-contracts

Cookies and sessions
cookie-session-contracts website saas game cookies sessions security
Context text
Cookie and session names, default values, groups, duration, security flags, serialization formats, and parsing behavior are externally observable.
Prefer additive changes and keep global cookie/session registries deterministic.
Review compatibility before changing existing definitions, deletion behavior, SameSite policy, Secure policy, or serialization formats.
Treat cookies, sessions, data protection, validation messages, and user-provided URL values as security-sensitive areas.

domain-url-composition

Domain and URL composition
domain-url-composition website saas game domain url security
Context text
Use DMBServerHelper domain and URL composition helpers when host, domain, localhost, subdomain, or HTTPS URL behavior is involved.
Document accepted input formats, localhost handling, subdomain handling, and generated HTTPS URL format for domain APIs.
Treat user-controlled URL values as security-sensitive input and keep fallback behavior explicit.

embedded-static-assets

Embedded assets
embedded-static-assets website saas static-files embedded-assets wwwroot
Context text
Expose package-owned embedded wwwroot assets through reusable ASP.NET static file provider composition.
Do not replace embedded asset registration with host-specific physical paths unless explicitly requested.
When adding static file behavior, keep provider ordering deterministic and document how the host application receives or overrides the assets.

html-builder-semantics

HTML builders
html-builder-semantics website saas game html builders semantics
Context text
Use existing DMBPageBuilder typed HTML builders and constrained builders for reusable markup instead of ad hoc raw HTML.
Keep tag name, attribute name, reserved attribute, style declaration, URL attribute, and raw content validation behavior deterministic.
Use raw HTML only when a typed builder or helper does not represent the required browser semantics.

launch-token-cache-busting

Asset versioning
launch-token-cache-busting website saas game cache-busting launch-token assets
Context text
Do not append manual cache-busting query strings such as ?v=... to local asset URLs.
PageBuilder applies ServerHelperConfiguration.Config.LaunchToken to local URLs during rendering when launch-token versioning is enabled.
External CDN URLs and intentionally versioned third-party URLs may keep explicit vendor versioning.

localization-composition

Localization
localization-composition website saas game localization resources lookup-order
Context text
Use WebLocalizer and CombinedStringLocalizer for shared localization lookup.
Keep localizer registration order, fallback behavior, and debug behavior explicit and deterministic.
Do not hide localization lookup-order changes behind generic wording; document downstream impact when lookup behavior changes.
Follow the local localization nomenclature before adding new keys.

middleware-order

Request pipeline
middleware-order website saas middleware pipeline startup
Context text
Middleware registration is observable application behavior.
Document ordering assumptions when changing UseApp(...), session handling, request localization, exception handling, status code pages, static file registration, captcha endpoints, or cookie policy behavior.
Prefer additive extension points over replacing existing middleware order, and keep changes deterministic across host applications.

page-information-lifecycle

Page lifecycle
page-information-lifecycle website saas game page-information controller metadata
Context text
Use PageInformation and the PageBuilder controller lifecycle for page title, description, metadata, icons, scripts, stylesheets, schema data, alerts, body builder, and page container behavior.
Configure page-level information in the controller action before returning the view.
Do not scatter page metadata, scripts, stylesheets, or rendering decisions across unrelated helpers when PageInformation already owns the behavior.

razor-helper-boundaries

Razor helpers
razor-helper-boundaries website saas game razor html-helper rendering
Context text
Keep Razor helper extensions focused on exposing PageBuilder components, utilities, and rendering adapters to views.
Do not put business-flow logic, product-specific policy, Bootstrap-specific component behavior, or form-builder responsibilities into DMBPageBuilder helpers.
When helper behavior affects user-facing output, document the rendered contract and downstream impact.

rendering-contract-stability

Rendering contracts
rendering-contract-stability website saas game rendering public-api compatibility
Context text
Treat DMBPageBuilder as infrastructure-level rendering code with cross-module impact.
Preserve public builder APIs, Razor helper behavior, rendered HTML shape, metadata order, asset order, and default rendering behavior unless a breaking change is explicitly requested.
Prefer additive extension points over replacing existing rendering contracts.

request-localization

Localization
request-localization website saas localization culture request
Context text
Request culture resolution, accepted language parsing, localization setup, and language utility behavior affect user experience and routing assumptions.
Keep culture fallback behavior deterministic and document changes to request localization, Accept-Language parsing, LanguageTools, CountryWebTools, or localization resources.
Follow the local localization nomenclature before adding or renaming localization keys.

secret-management

Secret management
secret-management website saas game secrets security validation
Context text
Feature packages must register required secrets through ServerHelperConfiguration.Config.Secrets.Require(...).
Read secret values through the central SecretManager instead of custom IConfiguration lookups scattered through feature code.
Validate all registered secrets from one central host point after package configuration calls have completed.
Never log secret values; diagnostics may show missing keys and setup instructions only.
PreProduction and Production must fail closed when required secrets are missing.

session-captcha-contracts

Session and captcha
session-captcha-contracts website saas session captcha security
Context text
Session and captcha behavior is security-sensitive and user-visible.
When changing SessionGuardMiddleware, CaptchaFactory, CaptchaController, or session-backed validation, document when session is loaded, which keys are used, how failures are handled, and what happens when session is unavailable.
Do not add new session dependencies without documenting key names, lifetime expectations, validation behavior, and compatibility impact.

web-asset-registration

Web assets
web-asset-registration website saas game assets javascript css
Context text
Register shared or application-level JavaScript, CSS, and link assets through IWebAssetRegistry using RegisterGlobalScriptAsset, RegisterGlobalStylesheetAsset, or RegisterGlobalLinkAsset.
Register component-scoped assets on the current PageInformation with SetScriptFile or SetStylesheet only when the component renders.
Keep reusable browser-side behavior in static asset files such as wwwroot; do not generate reusable JavaScript or CSS from C# strings when a real asset can be registered.

web-configuration-lifecycle

Service and middleware setup
web-configuration-lifecycle website saas configuration startup aspnet-core
Context text
Use ServerWebHelperConfiguration and WebGenericConfiguration<T> for shared ASP.NET Core web setup.
Keep reusable service registration, middleware setup, request localization, session guard behavior, embedded asset registration, captcha setup, and web utility configuration centralized in DMBServerWebHelper.
Do not move visual component, form builder, page layout, or application-specific website behavior into this package.

web-utility-boundaries

Utility helpers
web-utility-boundaries website saas utilities deterministic security
Context text
Keep utility helpers such as LanguageTools, CountryWebTools, CountryRegionInfoTools, ColorHelper, SecurityHashTools, and RequestCounter small, deterministic, and focused.
Do not turn utility classes into application policy engines or service containers.
Treat hashing, user-provided values, locale data, and request-derived values as security-sensitive inputs and document accepted formats and fallback behavior.