meta_mantle_server library

Native request-time Server-Side Rendering (SSR), universal database providers, caching, and framework adapters for MetaMantle.

Classes

Alternative language representation for hreflang links.
AlternateUrl
Convenience subclass/alias for AlternateLink.
BootstrapAdapter
Integrates MetaMantle static rendering with Flutter's web bootstrap pipeline.
BuildWebOptions
Options configuring the FlutterWebBuildEngine build process.
CacheEntry
Cached representation of a rendered page, its metadata snapshot, and headers.
CachePolicy
Cache policy controlling freshness and revalidation rules for routes.
CdnInvalidator
Abstract contract for programmatic CDN cache invalidation.
CdnPurgeResult
Result summary of a CDN cache purge operation.
CloudflareCdnInvalidator
Cloudflare v4 Cache Purge API adapter.
CloudFrontCdnInvalidator
Unsupported placeholder for AWS CloudFront invalidation.
CollectionRouteSource<T>
Paginated data source for a route pattern containing exactly one :key.
CoreWebVitalsCollector
Aggregates and calculates Core Web Vitals percentiles according to Google standards.
CourseProfile
Schema profile generator for Courses and Educational programs.
CrawlerInspector
Tools for crawling, previewing, and inspecting web endpoints. Call close when finished if this instance created its own HTTP client.
DataProviderResult<T>
The result returned by a MetaMantleDataProvider.
DirectoryValidationReport
Aggregated report for a directory of HTML documents.
DistributedLockProvider
Abstract contract for distributed locking across multi-instance production clusters.
DocSearchIndexer
Generates client-side and full-text search indexes (search.json).
DocumentDatabaseAdapter<T>
Adapter demonstrating how Document Databases (Cloud Firestore, Supabase, MongoDB) integrate with MetaMantle without introducing vendor SDK dependencies into core.
DocVersionDecision
Directive decision for versioned documentation routes.
DocVersionPolicy
SEO policy governing versioned documentation portals (/docs/v1/, /docs/latest/).
ElementNode
A semantic HTML element node with attributes and child nodes.
ExternalStandardsValidationResult
Result of an external HTML5 standards conformance audit.
FacetedNavPolicy
Configurable SEO policy for faceted navigation (filters, sorting, pagination).
FacetedUrlDecision
Directive decision for faceted e-commerce navigation URLs.
FeedGenerator
Generates compliant RSS 2.0 and Atom 1.0 syndication feeds.
FeedItem
Represents a publishable article or blog item for RSS/Atom syndication.
FileHtmlArtifactStore
Local HTML artifact store with content-addressed immutable object storage, atomic manifests, path containment, and instant zero-copy publication drafts.
FileRegenerationQueue
Persistent single-host filesystem queue with an O(1) persistent idempotency index, indexed pending job resolution, batch scheduling, and exclusive lock fencing.
FileWebhookReplayStore
File-based replay guard for a single host and a filesystem with file locks.
FixedRouteSource
One fixed page rendered through the same artifact and dependency pipeline.
FlutterWebAccelerator
Accelerator and diagnostic toolkit for Flutter Web (Mode A). Analyzes Flutter web builds, diagnoses Wasm compatibility, font/bundle weights, and recommends multi-threaded Skwasm headers and bootstrap optimizations.
FlutterWebAnalysisReport
Comprehensive analysis report for Flutter Web applications.
FlutterWebBuildEngine
Production-grade Flutter Web Build Engine.
FlutterWebBuildResult
Result of executing FlutterWebBuildEngine.build.
FrontmatterExtractor
Lightweight YAML frontmatter parser for documentation and blog markdown files.
GarbageCollectionReport
Report summarizing an artifact garbage collection execution.
GeneratedRouteDocument
Complete HTML plus dependency information for one generated page.
GraphQLDataProvider<T>
Adapter for querying GraphQL APIs for MetaMantle dynamic SEO.
H
Factory functions for common semantic HTML tags.
HeadTag
A normalized, platform-neutral representation of one head element.
HreflangFinding
Validation finding for multilingual SEO and hreflang links.
HreflangValidator
Validates multilingual hreflang consistency and reciprocal links across routes.
HtmlDocument
Renders a complete, valid, SEO-ready semantic HTML5 document.
HtmlDocumentValidationReport
Report for a single HTML document validation.
HtmlNode
Base class for all HTML DOM nodes rendered by MetaMantle SSR.
HtmlSanitizer
Allowlist-based HTML sanitizer for rich text content.
HtmlValidationIssue
A specific issue found during HTML validation.
HtmlValidator
Comprehensive HTML5 quality auditor and validator.
HttpDate
Helper for HTTP date parsing according to RFC 9110.
HybridEnqueueReport
Result of scheduling one explicit revalidation event.
HybridGenerationReport
HybridRevalidationScheduler
Maps path, tag, and route events to durable jobs for one site/tenant store. Use separate stores and queue directories for tenants; dependency indexes themselves are intentionally not tenant-aware.
HybridRevalidator
Explicit in-process revalidation. It is not a durable/distributed queue.
HybridStaticGenerator
Generates paginated collections without loading all records at once.
InMemoryWebhookRateLimiter
Simple per-process fixed-window limiter. Put a trusted client address in ServerRequest.clientIp when the application sits behind a proxy.
InsertChildPatch
Insert new child node at index.
InventoryChanged
InventoryEventDispatcher
Dispatches catalog events and executes granular tag-based cache invalidation.
JasprTagDescriptor
Structured component descriptor representing a Jaspr head element.
JobPostingProfile
Schema profile generator for Job Postings.
JsonLd
Structured data payload for search crawlers.
LlmsTxtGenerator
Generator for /llms.txt and machine-readable AI documentation manifests.
LocalBusinessProfile
Schema profile generator for Local Business entities.
MantleApp
Universal application root definition.
MantleAppBar
MantleArticle
Semantic article container component (<article>).
MantleAsyncSnapshot<T>
Asynchronous state wrapper for Futures.
MantleBorder
MantleBorderRadius
MantleBoxShadow
MantleBreadcrumb
Universal breadcrumb trail component producing semantic <nav aria-label="Breadcrumb"> and <ol> markup.
MantleBreadcrumbItem
Represents an item in a MantleBreadcrumb navigation trail.
MantleBuilder<T>
A reactive component that rebuilds when a MantleObservable changes.
MantleButton
MantleCenter
MantleCheckbox
MantleChildPatch
Patch describing child list reconciliation.
MantleColor
Universal styling abstraction that maps cleanly to CSS styles on Web/Server and Flutter styling properties (BoxDecoration, TextStyle, etc.) on native.
MantleColumn
MantleComponent
Base class for all portable UI components in MetaMantle.
MantleContainer
MantleContext
Context provided to components during build time.
MantleCustomElement
Escape hatch allowing rendering of arbitrary custom HTML elements, Web Components, or SVG tags.
MantleDetails
Semantic collapsible disclosure component (<details> and <summary>).
MantleDiffEngine
Computes the diff between oldNode and newNode.
MantleDisposable
Contract for objects that need lifecycle disposal.
MantleDrawer
Universal drawer component for side navigation and menus.
MantleEdgeInsets
MantleElementNode
Represents an element node (such as container, button, div, section, heading, etc.).
MantleEvent
Abstract cross-platform event passed to portable Mantle event callbacks.
MantleExpanded
MantleForm
MantleFragment
Represents a collection of siblings without an enclosing wrapper.
MantleFutureBuilder<T>
A component that renders based on the latest state of a Future.
MantleGestureDetector
MantleGrid
MantleHeading
MantleIcon
MantleIconButton
MantleImage
MantleIsland
Represents a scoped Flutter Island mount container in hybrid rendering (Strategy C: RenderingStrategy.domWithFlutterIslands).
MantleKey
Key for establishing stable identity during reconciliation across renders.
MantleLabel
MantleLandmark
MantleList
Semantic list container component (<ul> or <ol>).
MantleListItem
Single item within a MantleList (<li>).
MantleNavigation
Universal navigation component (bottom nav, top bar, or side rail).
MantleNavigationContext
Concrete implementation of MantleContext for runtime navigation.
MantleNavigationItem
Navigation destination item used in MantleNavigation.
MantleNode
Abstract base node in MetaMantle's universal intermediate representation.
MantleNodeVisitor<T>
Visitor interface for traversing the MantleNode tree across different renderers.
MantleObservable<T>
An observable value that notifies registered listeners when changed.
MantleOffset
MantlePadding
MantlePage
MantleParagraph
MantlePatch
Describes a mutation patch to update a DOM/UI node incrementally.
MantleProduct
Rich semantic Product representation with embedded Schema.org microdata (itemscope itemtype="https://schema.org/Product").
MantleRadio<T>
MantleRenderer<T>
Abstract contract for a rendering backend capable of turning a MantleNode into a target platform visual or document tree of type T.
MantleRichText
MantleRoute
Represents a single route declaration in MetaMantle's universal routing system.
MantleRouteMatch
Result of matching a path against registered MantleRoutes.
MantleRouter
Universal route resolver and matching engine.
MantleRow
MantleSelect<T>
MantleSemantics
MantleServerRenderer
Server-side semantic HTML renderer for MantleNode trees. Produces standard, accessible HTML markup with zero client-side framework overhead.
MantleSizedBox
MantleSpacer
MantleStack
MantleState<T extends StatefulMantleComponent>
The logic and internal state for a StatefulMantleComponent.
MantleStateRegistry
Registry retaining and managing lifecycle for MantleState instances.
MantleStore
Observable state store supporting key-value state management across components.
MantleSwitch
MantleTab
Single tab item within a MantleTabs component.
MantleTable
Semantic HTML Table component (<table>).
MantleTableCell
A cell inside a MantleTableRow (<td> or <th>).
MantleTableRow
A row inside a MantleTable (<tr>).
MantleTabs
Universal tabs component.
MantleText
MantleTextArea
Multi-line text input component (<textarea>).
MantleTextField
MantleTextNode
Represents plain or styled text in the intermediate representation.
MantleTextSpan
MantleTextStyle
MantleValueKey<T>
A key that uses a value of a particular type to identify itself.
MantleWrap
MemoryCacheStore
Thread-safe in-memory cache store with tag-based indexing and metrics.
MemoryCdnInvalidator
In-memory CDN invalidator used for unit tests, local development, and CI environments.
MemoryDataProvider<T>
An in-memory implementation of MetaMantleDataProvider ideal for testing, prototypes, and local development.
MemoryWebhookReplayStore
Process-local replay guard for tests and single-process development.
MerchantFeedGenerator
Generates Google Merchant Center compliant XML RSS 2.0 product feeds.
MetadataRenderer
Resolves global defaults and page metadata into deterministic head tags.
MetaMantleCacheAdapter
Cache adapter bridging Jaspr SSR responses to MetaMantle MetaMantleCacheStore.
MetaMantleCacheStore
Abstract cache store contract for MetaMantle SSR.
MetaMantleConfig
Global defaults used to resolve page-level metadata in MetaMantle.
MetaMantleContentAdapter
Content adapter reading Markdown frontmatter and generating Jaspr/MetaMantle metadata.
MetaMantleDartFrogAdapter
Dart Frog adapter for MetaMantle SSR.
MetaMantleDataComponent<T>
Component adapter loading data from MetaMantleDataProvider before rendering.
MetaMantleDataProvider<T>
Universal database and external source provider interface.
MetaMantleDocument
Full Jaspr-compatible document shell renderer with server-side SEO metadata injection.
MetaMantleHead
Renders MetaMantle metadata into Jaspr head element descriptors.
MetaMantleJasprAdapter
Jaspr interoperability adapter.
MetaMantleJasprProvider
Provides ambient MetaMantle metadata and route context down Jaspr component trees.
MetaMantleRouteAdapter<T>
Route adapter connecting MetaMantle MetaRoute<T> to Jaspr SSR request handling.
MetaMantleServerEngine
Native request-time Server-Side Rendering (SSR) engine for MetaMantle.
MetaMantleServerpodAdapter
Serverpod adapter for MetaMantle SSR.
MetaMantleShelfAdapter
Shelf adapter for MetaMantle Server-Side Rendering.
MetaRoute<T>
Typed definition of an SSR page route.
MetricSummary
Statistical summary for a specific Web Vital metric across recorded samples.
NewsArticleItem
A news article item formatted for Google News sitemaps.
NewsSitemapGenerator
Generates Google News-compliant XML sitemaps using <news:news> namespace.
NginxProxyInvalidator
Nginx / Fastly reverse proxy cache purge adapter via HTTP PURGE.
OpenGraph
Convenience subclass for OpenGraphMetadata.
OpenGraphMetadata
Open Graph metadata configuration.
OpenGraphType
Standard Open Graph object types.
PageSeoSnapshot
Represents an audited SEO metadata snapshot for a single page.
ParsedDocument
Parsed document payload containing extracted frontmatter attributes and raw markdown body.
PatchChildPatch
Update child node at index with patch.
PolicyProvenance
Diagnostic provenance record tracking where resolved metadata properties originated.
PriceChanged
ProductCreated
ProductDeleted
ProductInventoryEvent
Base class for all e-commerce inventory and catalog events.
ProductItem
Enterprise E-Commerce Product model with rich SEO structured data generation.
ProductRating
Customer review and aggregate rating.
ProductSlugChanged
ProductUpdated
ProductVariant
E-commerce product variant (e.g. Size/Color SKU).
PublishedHtmlArtifact
Consistent view of an artifact and dependency read from one publication.
QueueCapabilities
Declares the operational capabilities of a regeneration queue implementation.
QueueMetrics
Point-in-time metrics for queue observability and capacity monitoring.
QueueRecoveryReport
Diagnostic report emitted when recovering persistent queue state after restart or crash.
RawSafeHtmlNode
A node representing explicitly validated or sanitized raw HTML markup.
RecipeProfile
Schema profile generator for Recipes.
RedirectManager
Manages route redirects with loop detection, chain collapsing, and open redirect protection.
RedirectResolution
Result of evaluating a redirect through RedirectManager.
RedirectRule
Configuration entry for a server redirect rule.
RegenerationJob
Durable single-host regeneration job record.
RegenerationJobRequest
One job request for batch enqueue operations.
RegenerationQueue
Abstract contract for durable and distributed job queues in MetaMantle.
RegenerationWorker
Executes one durable job. The handler must load authoritative current data; exceptions are recorded only as a safe, caller-selected error code.
RelationalDatabaseAdapter<T>
Adapter demonstrating how Relational Databases (PostgreSQL, MySQL, SQLite) integrate with MetaMantle without introducing mandatory database dependencies.
RemoveChildPatch
Remove child node at index.
ReplaceNodePatch
Indicates the entire node must be replaced with newNode.
ResolvedSeoMetadata
Container for the resolved metadata and its diagnostic provenance trace.
ResourceHint
Resource hints for high-performance resource preloading and connection warmup.
RestDataProvider<T>
Adapter for fetching dynamic SEO data from external RESTful API endpoints.
ReturnPolicy
Merchant return policy specification.
RevalidationWebhookHandler
Signed webhook endpoint that schedules revalidation against the configured site's dependency index. The payload never supplies HTML or database data.
RobotsDirective
Standard robots directive values and custom builders.
RouteArtifactEntry
Metadata record for an immutable content-addressed route artifact.
RouteDataContext
Request-scoped context passed to a MetaMantleDataProvider.
RouteDependency
RouteDiscoveryPage<T>
SearchIndexEntry
A search index entry representing an indexed document section.
SeoPolicy
A policy node declaring SEO rules, defaults, and overrides at a specific tier.
SeoPolicyResolver
Centralized SEO policy resolution engine executing the 7-tier inheritance hierarchy: Global -> Application -> Tenant -> Locale -> Section -> Route -> Page Overrides.
SeoRegressionFinding
Discovered regression finding comparing baseline and current SEO output.
SeoRegressionTester
Compares builds and live crawls against baselines to catch accidental SEO regressions.
ServerRequest
Framework-agnostic HTTP request representation for MetaMantle SSR.
ServerResponse
Framework-agnostic HTTP response generated by MetaMantle SSR.
ShippingDetails
Shipping cost and destination specification.
SingleFlightCoordinator
Prevents cache stampedes (thundering herds) by coalescing concurrent invocations for the same key into a single asynchronous operation.
SitemapGenerator
Generates XML sitemaps and sitemap indexes according to the sitemaps.org protocol.
SitemapUrlEntry
Single URL entry for sitemap generation.
SocialCardData
Content payload used to synthesize a dynamic social preview card.
SocialCardDimensions
Standard social media card dimensions.
SocialCardTheme
Visual branding theme for generated social preview cards.
SocialImageGenerator
Dynamic SVG-based social image generator with safe XML escaping and in-memory caching.
SsrfGuard
Security guard that protects outbound HTTP requests (URL inspector, crawler preview) against Server-Side Request Forgery (SSRF), internal network scanning, and cloud metadata access.
StatefulMantleComponent
A component that has associated mutable state.
StatelessMantleComponent
A component that does not require mutable local state.
StaticPageRoute
Represents a route with associated SEO metadata, component tree, and static HTML content.
StaticPatternResolver
Contract for objects that can resolve dynamic route patterns into concrete static routes.
StaticRouteManifest
Registry and resolver for statically buildable routes and dynamic data expansion.
StaticRoutePattern<T>
Dynamic pattern expanding parameterized paths (e.g. /products/:slug) from in-memory collections, async data loaders, or JSON data files.
StorageCapabilities
Declares the operational capabilities of an HTML artifact store backend.
TenantCachePartitioner
Ensures tenant cache isolation, preventing cross-tenant data leaks.
TenantContext
Contextual representation of a tenant in a multi-tenant or white-label application.
TenantHostValidator
Security guard that validates incoming HTTP Host headers against trusted tenant domains.
TextNode
A node representing escaped plain text.
TwitterCard
Convenience subclass for TwitterCardMetadata.
TwitterCardMetadata
X/Twitter card metadata configuration.
TwitterCardType
Standard X/Twitter card types.
UpdateElementPatch
Indicates an element node's attributes, classes, styles, and events should be patched.
UpdateTextPatch
Indicates a text node's content should be updated to newText.
UrlInspectionReport
Inspection report for an inspected URL.
WebhookReplayStore
WebIcon
Icon representation for favicons, touch icons, and web manifests.
Convenience subclass/alias for WebLinkTag.
WebLinkTag
Safe custom link tag representation.
WebMetadata
Page-specific metadata. Unset values inherit from WebHeadConfig.
WebMetaTag
Safe custom metadata. Only standard text attributes are supported.
WebOptimizationFinding
Diagnostic issue or optimization recommendation for Flutter Web.
WebVitalSample
A privacy-preserving observation of a single Web Vital metric.

Enums

ArtifactMissPolicy
How an artifact-backed route behaves when no generated document exists.
BuildMode
Operational mode for the Flutter Web build engine.
ExternalStandardsValidationStatus
Status of optional external HTML5 standards conformance validation (e.g. Nu HTML Checker / W3C v.Nu).
HtmlValidationSeverity
Severity of an HTML validation issue.
InitialGenerationPolicy
One bounded page returned by a dynamic route source.
ItemAvailability
Item availability state.
ItemCondition
Item physical condition.
MantleCrossAxisAlignment
MantleFontStyle
MantleFontWeight
MantleLandmarkType
MantleMainAxisAlignment
MetricRating
Google performance threshold rating.
PolicyTier
Defines the policy tier in the 7-level inheritance hierarchy.
RegenerationJobStatus
RegenerationWorkerResult
RenderingStrategy
Defines the rendering strategy for MetaMantle web applications.
WebVitalName
Core Web Vital metric names standardized by the W3C and Google Chrome UX Report (CrUX).

Functions

metaMantleShelfHandler(MetaMantleServerEngine engine) → Handler
Convenience helper to create a Shelf handler from engine.
metaMantleShelfMiddleware(MetaMantleServerEngine engine, {bool passThroughNotFound = true}) → Middleware
Convenience helper to create Shelf middleware from engine.
runStaticManifest(StaticRouteManifest manifest, List<String> args, {MantleServerRenderer serverRenderer = const MantleServerRenderer(emitHydrationMarkers: false)}) → Future<void>
Runner executed by consumer applications or CLI drivers to evaluate a manifest, render all components to semantic HTML, and write a resolved manifest JSON.

Typedefs

DocumentFetcher = Future<Map<String, dynamic>?> Function(String collection, String documentId)
Function signature for fetching a document by collection and ID.
DocumentMapper<T> = T Function(String id, Map<String, dynamic> data)
Function signature for mapping document fields to entity T.
JsonEntityMapper<T> = T Function(dynamic json)
Function to map a parsed JSON response map to entity T.
MantleEventCallback = void Function(MantleEvent event)
MantleInput = MantleTextField
Alias for MantleTextField matching HTML input nomenclature.
MantleRouteBuilder = MantleComponent Function(MantleContext context)
MantleRouteGuard = String? Function(MantleContext context)
MantleValueCallback<T> = void Function(T value)
MantleVoidCallback = void Function()
RouteHtmlBuilder<T> = List<HtmlNode> Function(T data, RouteDataContext context)
Function signature for building semantic body HTML nodes from loaded data.
RouteMetadataBuilder<T> = WebMetadata Function(T data, RouteDataContext context)
Function signature for building page metadata from loaded data.
SqlQueryRunner = Future<Map<String, dynamic>?> Function(String sql, List<Object?> parameters)
Function signature for executing a parameterized SQL query.
SqlRowMapper<T> = T Function(Map<String, dynamic> row)
Function signature for mapping a SQL row map to entity T.
StaticComponentBuilder = MantleComponent Function(MantleContext context)
StaticRoute = StaticPageRoute
Alias for StaticPageRoute for ergonomic route definitions.
WebHeadConfig = MetaMantleConfig
Backward compatibility alias for MetaMantleConfig.

Exceptions / Errors

CrawlerException
Base class for safe crawler failures.
CrawlerResponseTooLargeException
DistributedLockException
Exception thrown when a distributed lock could not be acquired within timeout.
HostValidationException
SecurityException
Thrown when an outbound request violates SSRF security boundaries.
StaleArtifactVersionException
Thrown when a draft was based on a publication that is no longer active.
StaleFencingEpochException
Thrown when an artifact publication attempt presents an obsolete or lower fencing epoch.
StaleGeneratedDocumentException