Skip to main content
Version: 3.x

Services

The services are the main building blocks of the Front-Commerce architecture. They are responsible for handling the business logic and the data of the application.

note

For a full list please see the Services implementation.

Global Services

These services are instantiated when the server starts and are propagated to the onServerInit lifecycle hook. They are singletons and their lifecycle is tied to the server's lifecycle.

NameDescriptionReference
RateLimiterUsed to rate limit a resource📖 Guide
🔗 Code
MaintenanceModeUsed to manage the maintenance mode📖 Guide
🔗 Code

Server Services

These services are instantiated per request and are propagated to the onServerServicesInit lifecycle hook. They are scoped to the current request and are destroyed when the request is completed, with the exception of RateLimiter and MaintenanceMode.

NameDescriptionReference
ContentMetadataExtractorRegistryUsed for storefront content registration📖 Guide
🔗 Code
ServerEventBusUsed for server events publishing📖 Guide
🔗 Code
SitemapUsed for sitemap registration📖 Guide
🔗 Code
DIUsed for Dependency Injection registration📖 Guide
🔗 Code
ExternalLoginUsed for External login providers📖 Guide
🔗 Code
DynamicRoutesUsed to serve url rewrites📖 Guide
🔗 Code
RateLimiterInstance from Global Services-
MaintenanceModeInstance from Global Services-
CacheControlUsed to add Cache-Control headers to requests📖 Guide
🔗 Code
ServerTimingsUsed to add Server-Timing headers to responses🔗 Code
MetricsServiceUsed to register metrics for outbound requests📖 Guide
🔗 Code