HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Creating new blueprints in Spire

This topic describes how to create new blueprints in Spire.

Before creating a new Blueprint in Spire, be sure you have access to a local installation of Optimizely B2B Commerce. The B2B Commerce Github repository contains all of the Spire front-end code at \FrontEnd. It also includes an example Blueprint with some basic examples of customizations at \modules\blueprints\example.

Run Spire

To run spire using the built-in content-library, follow these steps:

  1. Use a terminal and go to \FrontEnd.
  2. Run npm install (only if you have not already).
  3. Run npm run start.

This starts the Spire site at localhost:3000 and defaults to connecting to a B2B Commerce instance that is running at http://commerce.local.com. There is a file at \FrontEnd\Config\settings.js that controls the apiUrl. Changes to this file require re-running npm run start.

The npm run start command has two optional parameters. For example, if you wanted to run the example Blueprint on port 4000, run npm run start example 4000. To run the base content-library on another port,
run npm run start content-library 4000.

Create a new blueprint

To get started on your own Blueprint, follow these steps:

  1. Use a terminal and go to \FrontEnd.
  2. Run npm run create-blueprint myCustomBlueprint.
  3. Verify your new Blueprint was created at \modules\blueprints\myCustomBlueprint.

Did this page help you?