Local dev setup
This section describes how to run the project locally.
Prerequisites
Node.js
20+Yarn
3- Personal Access Token with the scope read:packages
Download Node.js from the official website or use nvm to switch to a compatible version. For installation instructions for Yarn, refer to the Yarn documentation.
Repository fork
We recommend working with a fork of the app repository. A fork allows you to easily incorporate updates from this boilerplate into your own codebase.
Authentication
NPM registry
This project queries data from PlentyONE by using other NPM packages as middleware. These packages are published on the GitHub registry. To download packages from GitHub's registry, you have to authenticate. To enable authentication, carry out the following steps:
- In the root directory, create a new file called
.yarnrc.yml
. - Copy the contents of
.yarnrc.yml.example
to.yarnrc.yml
. - In
.yarnrc.yml
, replace<TOKEN>
with the Personal Access Token you created earlier.
The .gitignore
doesn't track .yarnrc.yml
, so you don't have to worry about exposing your token.
TIP
You can enable push protection in your GitHub account for an additional layer of security.
PlentyONE system
- Add your API endpoint
- Add your API security token
Starting the app
- Open the repository in your command line interface.
- Run
yarn
to install all dependencies. - Run
yarn dev
to start the development server. The app will be served with hot reload at localhost:3000.
Custom configuration
By default, the app connects to a demo shop. The demo shop uses English as the default locale and German as a second locale. To connect to your own PlentyONE system, you have to update the API endpoint in the middleware and match the locale configuration in system and app.
For details, refer to the following guides: