Getting started

Setup an admin panel

The Sylius Stack comes with a bunch of components that work great independently, but when they come together, that's when the stack's magic truly operates! Indeed, the highlight of this project is the ability to configure an admin panel UI within minutes.

Create a new project

You can set up the Sylius Stack on existing Symfony projects, but in the case you are starting from scratch, here is what you need to do.

# With Composer:
composer create-project symfony/skeleton:"8.0.*" my_project_directory
cd my_project_directory
composer require webapp

# Or with Symfony CLI:
symfony new my_project_directory --version="8.0.*" --webapp
cd my_project_directory

Allow Contrib Recipes

Sylius Stack recipes are hosted in the symfony/recipes-contrib repository. To ensure Symfony Flex installs them automatically, enable contrib recipes before requiring the packages:

composer config extra.symfony.allow-contrib true

Install the package using Composer and Symfony Flex

Go to your project directory and run the following command:

Flex recipes

Type "a" or "p" to configure the packages via Symfony Flex.

Do not forget to set your application secret environment variable:

Run your web server

The admin panel is ready to use. Now, it's your turn!

Admin dashboard overview

Using AssetMapper

To prevent duplicate Ajax calls, disable the auto-initialized Stimulus app and Symfony UX stylesheets from the sylius/bootstrap-admin-ui package, so you can take control of Stimulus initialization in your own code.

Disabling Stimulus app & Symfony UX stylesheets from third party package

First, you need to disable the Stimulus App started by the sylius/bootstrap-admin-ui package and add a custom javascript app hook for the asset mapper.

Starting Stimulus App

Last updated

Was this helpful?