Project Setup
This section walks you through the steps to create a basic Node.js project and boot the Unchained Engine API server locally.
Step 1: Installation
- Create a new folder for your project.
mkdir my-unchained-engine
- Use the Unchained initialization script to download the code.
npm init @unchainedshop
- Select the installation template. Choose Unchained engine.
? What type of template do you want ›
Full stack e-commerce
Storefront
Unchained engine <--
- Select the directory (press
enter
to use the current directory) and whether to initialize git.
? Directory name relative to current directory
(press Enter to use current directory) ›
? Do you want Initialize git? no / yes
- Ensure your Node version is 22+ and install the npm packages.
cd my-unchained-engine
npm install
Step 2: Start the Unchained Engine
npm run dev
Open localhost:4010 to check if your Unchained Engine is running correctly. You should see the following Landing page in your browser:
Open Admin UI sandbox
The Unchained Admin UI needs a browser that allows cross-origin requests to localhost such as Chrome or Firefox. Safari is not supported.
On the initial landing page, click Use sandbox Admin UI to manage your local engine instance using the admin UI sandbox. Use the following credentials to log in and change them as soon as possible:
Username: admin@unchained.local
Password: password
You can also click on GraphQL playground to open the GraphQL playground for executing queries and mutations.
Step 3: Add Products
To set up the store and add products and categories using the admin UI, follow the instructions in the Add Products guide using your local instance at localhost:4010.
Follow the examples to learn how to add products, initiate a checkout, and use plugins with GraphQL.
Run the Storefront template
To test the Unchained Engine, set up the test storefront web app created with React.js and Next.js locally and connect it to your local Unchained Engine GraphQL API, as covered in the next chapter.