Getting started
To start your journey with Storefront, you need to have a working environment. Alokai Solution Engineers will provide you with everything you need to start developing your application.
Unleash the Power of Storefront!
Ready to see Storefront in action? Experience a world of difference firsthand!
Request an exclusive demo now and start building the next generation of eCommerce experiences.
Prerequisites
The expected versions of Node.js can be found in the .nvmrc
file. If you're new to this ecosystem, we encourage you to install NVM (Node Version Manager) for easier management of Node versions.
We use Yarn package manager. If you don't have it, please follow the official Yarn installation guide.
Installation
Once Alokai Solution Engineers provide you with the access to the repository, you can clone it, initialize and install the dependencies.
yarn run init
This command will initialize the project and install all dependencies for every package in the monorepo and you're ready to go.
Development mode running
To serve the application locally, run:
yarn dev
Depending on your project configuration you should be able to access the applications under following links:
- frontend (Storefront, Next.js)
http://localhost:3000
- frontend (Storefront, Nuxt)
http://localhost:3333
- middleware (API)
http://localhost:4000
Visit the local Storefront link to see your application. You're now ready to start your journey with Storefront
Commands
Storefront uses Turborepo to manage the monorepository. Learn more about it and other technologies at Storefront Tech Stack guide.
Each application in the monorepo has its own package.json
file, which contains the scripts
section. Turborepo allows us to run the same command in every package at once.
In the root directory, you can find the turbo.json
file with a list of configured the monorepo commands. In order to run them, check package.json
file scripts
section.
List of available commands:
lint
- run ESLint in every packageformat
- run Prettier in every packagetest:unit
- run tests in every packagebuild
- run build command in every packagedev
- run development server in every appdev:next
- run development server only with Next.js appdev:nuxt
- run development server only with Nuxt app
If a package doesn't have the appropriate command, Turborepo will skip it.
Congratulations!
You've successfully set up your Storefront project and are now ready to start developing your application. Next, learn more about the Storefront architecture.