> For the complete documentation index, see [llms.txt](https://stack.sylius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stack.sylius.com/getting-started.md). Agents can also search and read this documentation through its [MCP server](https://stack.sylius.com/~gitbook/mcp).

# 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.

This guide installs the admin panel with [Shadcn Admin UI](https://stack.sylius.com/shadcn-admin-ui/getting-started.md), the recommended theme (Tailwind CSS v4 and shadcn/ui). Prefer Bootstrap? Jump to [Using Bootstrap Admin UI instead](#using-bootstrap-admin-ui-instead).

### 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.

```bash
# 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:

```bash
composer config extra.symfony.allow-contrib true
```

### Install the packages

```bash
composer require -W \
  doctrine/orm \
  doctrine/doctrine-bundle \
  pagerfanta/doctrine-orm-adapter \
  symfony/asset-mapper \
  sylius/shadcn-admin-ui \
  sylius/ui-translations
```

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

Import the theme configuration (hooks, grid templates, component prefixes):

{% code title="config/packages/sylius\_shadcn\_admin\_ui.yaml" lineNumbers="true" %}

```yaml
imports:
    - { resource: '@SyliusShadcnAdminUiBundle/config/app.php' }
```

{% endcode %}

### Add the stylesheet and the JavaScript entrypoint

Create the Tailwind entry of the admin panel:

{% code title="assets/styles/admin.css" lineNumbers="true" %}

```css
@import "tailwindcss";
@import "../../vendor/sylius/shadcn-admin-ui/assets/styles/theme.css";
```

{% endcode %}

{% code title="config/packages/symfonycasts\_tailwind.yaml" lineNumbers="true" %}

```yaml
symfonycasts_tailwind:
    binary_version: 'v4.3.3'
    input_css:
        - '%kernel.project_dir%/assets/styles/admin.css'
```

{% endcode %}

Then the `admin` importmap entrypoint, which starts Stimulus:

{% code title="assets/admin.js" lineNumbers="true" %}

```js
import './stimulus_bootstrap.js';
```

{% endcode %}

{% code title="importmap.php" lineNumbers="true" %}

```php
'admin' => ['path' => './assets/admin.js', 'entrypoint' => true],
```

{% endcode %}

Do not forget to set your application secret environment variable:

{% code title=".env" %}

```dotenv
# ...
APP_SECRET=UseYourOwnSecretPlease
```

{% endcode %}

### Run your web server

```bash
php bin/console tailwind:build assets/styles/admin.css --watch
```

```bash
docker compose up -d
symfony serve -d
```

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

<div data-full-width="false"><figure><img src="https://2999098582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRNAi9oQYTWFv4Vn5yZFm%2Fuploads%2Fgit-blob-04b523a4225e3f80c33ab8a76e77a428fdd52317%2Fshadcn-admin-ui-dashboard.png?alt=media" alt="Admin dashboard overview"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The [Shadcn Admin UI getting started](https://stack.sylius.com/shadcn-admin-ui/getting-started.md) covers the details: requirements, Symfony UX Autocomplete, icons in production and a checklist.
{% endhint %}

### Next steps

* [Create your first CRUD pages](https://stack.sylius.com/cookbook/admin_panel/basic_operations.md)
* [Secure the admin panel](https://stack.sylius.com/cookbook/admin_panel/security.md)
* [Add your pages to the menu](https://stack.sylius.com/cookbook/admin_panel/menu.md)
* [Pick a color theme](https://stack.sylius.com/shadcn-admin-ui/theming.md)

## Using Bootstrap Admin UI instead

[Bootstrap Admin UI](https://stack.sylius.com/bootstrap-admin-ui/getting-started.md) ships prebuilt assets: no Tailwind build is needed. Replace `sylius/shadcn-admin-ui` with `sylius/bootstrap-admin-ui` in the `composer require` command above and skip the stylesheet and JavaScript steps: its Flex recipe configures everything.

```bash
composer require -W \
  doctrine/orm \
  doctrine/doctrine-bundle \
  pagerfanta/doctrine-orm-adapter \
  symfony/asset-mapper \
  sylius/bootstrap-admin-ui \
  sylius/ui-translations
```

<div data-full-width="false"><figure><img src="https://2999098582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRNAi9oQYTWFv4Vn5yZFm%2Fuploads%2Fgit-blob-2de48dd0f791ac621d440a058574c361df492faa%2Frecipes.png?alt=media" alt="Flex recipes"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Install only one theme: never enable `SyliusShadcnAdminUiBundle` and `SyliusBootstrapAdminUiBundle` in the same kernel.
{% endhint %}

If your application starts its own Stimulus application with AssetMapper, read [Assets and AssetMapper](https://stack.sylius.com/bootstrap-admin-ui/assets.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stack.sylius.com/getting-started.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
