An example admin app that adds a menu button to the admin sidebar.
We're working on the admin builder, which will allow you to define two files: admin/routes.json
file with everything you need to create an admin interface (routes paths and components), and admin/navigation.json
which alows your admin app to insert itself in the sidebar navigation. This is a temporary example!
-
Admins always declare routes in
/admin/app/<route>
-
Declare the
admin
builder in your manifest -
When installed, the user navigates to
/admin/<route>
, but your app runs in an iframe that points to/admin/app/<route>
. -
You can develop directly in the
/admin/app
route for convenience, but don't forget to test it inside the iframe. :)
-
Clone this repo
-
yarn --cwd react/
for code completion -
vtex link
-
Navigate to
workspace--account.myvtex.com/admin/app/example