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, with Alokai CLI handling store-specific operations. 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. The root commands are configured to use either Turborepo for package management or Alokai CLI for store operations.
List of available commands:
dev
- run development server in every app and store usingalokai-cli store dev --all --verbose
build
- run build command in packages and all stores using Turborepo andalokai-cli store build --all
test:integration:pw
- run integration tests usingalokai-cli store test --all
lint
- run ESLint in packages after composing stores withalokai-cli store build --all --compose-only
format
- run Prettier after composing stores withalokai-cli store build --all --compose-only
Direct Store Operations
You can also use the store
command directly for specific store operations:
# Shorthand for alokai-cli store commands
yarn store dev --store-id=my-store
yarn store build --store-id=my-store
yarn store test --store-id=my-store
Framework Commands
Native Next.js/Nuxt commands won't work correctly with multistore setup. Always use Alokai CLI commands for store operations.
See More:
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.