What is a Module
Author:
Fluent Commerce
Changed on:
20 Sept 2024
Overview
This article introduces the concept of a Fluent Commerce Module, describing it's basic structure and content.
Key points
- Provide a good understanding of the following topic:
- Module Artifacts/Metadata
- Rules
- Workflows
- Settings
- Web App Manifests
- Transactions
- UI Components
Definition
A Module is a group of Artifacts bundled together to achieve a domain functionality. Artifacts can be built by:
- The Rule SDK (Rules) and Component SDK (UI Components)
- The Workflow Engine (Workflows)
- The UX Builder (Web App Manifests)
Artifacts also include Settings.
A valid Module can contain any combination of Artifacts, however, they must also contain Metadata. Together, the Artifacts in a Module should provide a single package of domain capability or a reference to create or extend domain capability. Modules work together and extend each other.
There are two categories of Module, Reference Modules and Extensions.
Module Artifacts
A module must contain Metadata, but can otherwise have any combination of the following Artifacts:
Artifact Name | Mandatory |
Metadata | Yes |
Rules | No |
Workflows | No |
Settings | No |
Web App Manifests | No |
Translations | No |
UI Components | No |
Structural data | No |
Metadata
Metadata contains information about the Module's name, publisher, version, author(s), Dependencies, and Contracts.
Dependencies
Dependencies are either Modules or Contracts that must exist on an account before the Module with the dependency can be installed.
Contracts
A Contract is a document that defines what input and output events are required for a Module to work. Contracts offer a convenient way to specify workflow compatibility between Reference Modules, Extensions and Connectors”
Rules
A Rule represents an atomic piece of business logic which can be configured and reused. A commonly used analogy for describing Rules is LEGO bricks which we can click together in different configurations to create a different outcome. Learn more about Rules here.
Workflows
Workflows describe business process orchestration that underpin specific feature sets and functionality for each of the Fluent apps. Workflows run on the Workflow Engine.
Settings
Settings are key-value pairs set in a Context (Account, Retailer, Location/Agent) that the Fluent Platform, Workflows and Web App Manifests use to drive their logic. Learn more about Settings.
Web App Manifests
A Web App Manifest is a type of Setting that describes an App. A Web App Manifest may extend an existing app, like Fluent OMS or Fluent Store, or could create an entirely new app. The Manifest also describes the layout and components of a page within an app. Learn more about the UX Framework.
Translations
Translations are a type Setting that enables the translation of an app into another language. Learn more about Translations.
UI Components
Components are referenced in Web App Manifests and used to control how a user interacts with an app. See available components in our Component Library. Learn more about building UI Components.