Extending the Dashboard
The custom functionality you create in your Vendure plugins often needs to be exposed via the Dashboard so that administrators can interact with it.
This guide covers how you can set up your plugins with extensions to the Dashboard.
Plugin Setup
For the purposes of the guides in this section of the docs, we will work with a simple Content Management System (CMS) plugin that allows us to create and manage content articles.
Let's create the plugin:
Now let's add an entity to the plugin:
You now have your CmsPlugin created with a new Article entity. You can find the plugin in the ./src/plugins/cms directory.
Let's edit the entity to add the appropriate fields:
Now let's create a new ArticleService to handle the business logic of our new entity:
The service will be created in the ./src/plugins/cms/services directory.
Finally, we'll extend the GraphQL API to expose those CRUD operations:
Now the api extensions and resolver has been created in the ./src/plugins/cms/api-extensions directory.
The last step is to create a migration for our newly-created entity:
Your project should now have the following structure:
src
└── plugins/
└── cms/
├── api/
│ ├── api-extensions.ts
│ └── article-admin.resolver.ts
├── entities/
│ └── article.entity.ts
├── services/
│ └── article.service.ts
├── cms.plugin.ts
├── constants.ts
└── types.ts
Add Dashboard to Plugin
Dashboard extensions are declared directly on the plugin metadata. Unlike the old AdminUiPlugin, you do not need to separately declare ui extensions anywhere except on the plugin itself.
You can do this automatically with the CLI command:
This will add the dashboard property to your plugin as above, and will also create the /dashboard/index.tsx file
which looks like this:
IDE GraphQL Integration
When extending the dashboard, you'll very often need to work with GraphQL documents for fetching data and executing mutations.
Plugins are available for most popular IDEs & editors which provide auto-complete and type-checking for GraphQL operations as you write them. This is a huge productivity boost, and is highly recommended.
- GraphQL extension for VS Code
- GraphQL plugin for IntelliJ (including WebStorm)
Run the npx vendure schema to generate a GraphQL schema file that your IDE plugin
can use to provide autocomplete.
- Install the GraphQL plugin for your IDE
- Run
npx vendure schema --api adminto generate aschema.graphqlfile in your root directory - Create a
graphql.config.ymlfile in your root directory with the following content:
Dev Mode
Once you have logged in to the dashboard, you can toggle on "Dev Mode" using the user menu in the bottom left:
In Dev Mode, hovering any block in the dashboard will allow you to find the corresponding pageId and blockId values, which you can later use when customizing the dashboard. This is essential for:
- Identifying where to place custom page blocks
- Finding action bar locations
- Understanding the page structure
What's Next?
Now that you understand the fundamentals of extending the dashboard, explore these specific guides:

