A next-gen, multi-tenant, scalable, performant e-commerce stack.The goal of this architecture is to define a next-gen foundational layer to enable developing e-commerce products quickly and efficiently. The new stack must provide a core set of modular components and interfaces to:
Enable building new websites/e-commerce products also called tenants.
Extend existing tenants — building new features — quickly and efficiently
Allow integrations across different components to provide advanced report generations/analytics capabilities also integrating with next-gen services and tools.
Core Considerations
The architecture shall provide a set of modular core components which define functionality to allow building composable integrations across the stack while also providing interfaces to allow interactions across all components.
Multi Tenancy
Multi tenancy defines the ability to host multiple residents within each core component of the stack. A tenant may be a website or a brand or a set of brands associated with a vendor. A tenant may also just be a set of tags associated with a tenant identifier. All core components must be multi-tenant enabled, also allowing querying and displaying information at a tenant level.
Federated Ecosystem
Federation allows an entire ecosystem to be composable — with data from different federated content sources and with presentation from different federated app services.
Federated Data
A federated data layer must provide content federation functionality to query, define and transform content from different data sources into a single type-defined entity.
Federated Apps
A federated app layer shall provide app federation functionality enabling composing multiple different micro frontends to query and display tenant-based data.
Headless/GraphQL Architecture
All core components must provide headless/GraphQL based interfaces to build composable solutions. The GraphQL layer shall also provide Content Federation to build super graphs based on data from a set of subgraphs.
Micro Services
The architecture shall be entirely composed of Micro Services. Micro Services allow for building fault-tolerant, independent, self-contained, performant architectural components. Each micro service instance will have complete ownership of its data source and also provide scalability, availability characteristics in addition to providing tenant-based reporting and querying capabilities. A example of a micro service is a Product Micro Service. A product micro service shall have complete ownership of all product-related information and will provide performant tenant-level querying interfaces to retrieve/modify product data.
Micro Frontends
Micro Frontends shall enable building modular frontend pieces which can be mixed and matched to build complete functional e-commerce features. Each micro frontend shall define a layout, be composable, interact with one or more micro services and allow defining multiple presentation formats based on a tenant-level configuration. A example of a micro frontend is a Recommended Products component. Another example is a Product Reviews component. With a multi-tenant architecture, the micro frontend shall present the Recommended Products with different theming/styling per the tenant-level definitions also interacting with the corresponding micro services to perform data querying/mutations.
Events and Messaging
An Events and Messaging layer shall define core interfaces to enable building interactions between different core components and also allowing extending functionality. The Events and Messaging layer will also provide well-defined interfaces to allow integrations across the stack enabling building composable solutions.
Topics, Subscriptions and Events:
Components within the stack will interact by subscribing to Topics and publishing events. One example of an event is Customer.Created. All components interested in Customer events shall subscribe to that topic and handle all relevant events. The Events and Messaging layer must provide reliable event delivering and subscription capabilities at scale across the stack.
Composability
The architecture must provide composability features — enabling developers/admins to add integrations and even switch out external tools/services — by providing plugin-style composability in order to quickly build integrations with external platforms and services.
Cloud-First and Mobile-First
All stack components must be cloud-first. All dashboard/reporting components must be mobile-first and must allow viewing/modifying interactions from a mobile layout.
Serverless Components
The new stack must be built with next-gen, server-less, edge-enabled components serving data, micro services and micro frontends at scale.
Advanced Logging and Monitoring
All core components in the new stack shall provide tenant-level logging and monitoring interfaces providing a tenant-based view for reporting and monitoring reasons. All user interactions, for example even during a checkout, must be logged reliabily and persistently.