Area: Optimizely B2B Commerce

Understanding the development architecture

Recommended reading 


There are many building blocks that form the architecture of B2B Commerce. Some of the building blocks are widgets, modules, handlers, services, directives, controllers, and more.

Consider the following diagram that illustrates the building blocks and development workflow.

  1. CMS Widget
  2. AngularJS Directive
  3. AngularJS Template
  4. AngularJS Directive Definition
  5. AngularJS Controller
  6. Typescript Service
  7. WebAPI Controller
  8. Module Business Service
  9. Module Handler Factory
  10. Module Handlers
  11. Optimizely Data Access & Persistence


The development architecture is split across three core libraries.

B2B Commerce.Web

The B2B Commerce.Web project is the ASP.NET MVC application. The web application is responsible for the client side models and services which call the WebAPI layer within each of the Optimizely Modules.

The B2B Commerce.Web project also is where all widget views, AngularJS directives, AngularJS controllers, and AngularJS services reside.


In B2B Commerce 3.7 and earlier versions all of the models and persistence layer were located in the Insite.Model library. In version 4.0 the core commerce models have been split into their own self-contained modules.

For example:

  • Insite.Account
  • Insite.Cart
  • Insite.Catalog
  • Insite.Customers
  • Insite.Order
  • Insite.Requisition

Although these modules are mostly self-contained they do have a dependency on the presentation layer of each of the components. The presentation elements of each of the modules are located in the B2B Commerce.Web project.


Insite.Model handles the Unit of Work, Repository, Domain Services, ContextProvider, and persistence of the platform.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Dec 11, 2020

Recommended reading