Getting Started
This is the entry point for the Raccoon documentation. Here you will find all the information you need to start building your Next.js applications for the VTEX Admin.
What is Raccoon?
Raccoon is a set of tools and libraries that help you build and deploy Next.js applications for the VTEX Admin. It provides a set of functions to connect your Next.js app with VTEX IO, and it also provides a set of components and hooks to help you build your app.
It is composed of two main packages:
@vtex/raccoon-next
: The core package that provides the functions to connect your Next.js app with VTEX IO.@vtex/raccoon-io
: An utility package that provides you with the means to communicate with your Next.js app from a VTEX IO app.
And a component from the Admin Shell:
- The
RaccoonIframe
Together, these tools enable the development of Admin apps powered by Next.js.
Creating a Raccoon application through DK Portal
This is the simplest way to create a Raccoon application. If you can just click on the link below and follow its guided steps. Alternatively, you can use the create-raccoon-app CLI below (which is used under the hood by DK Portal), or you can set up your application manually.
Creating a Raccoon application with the create-raccoon-app (CRA) CLI
-
Initialize the app using CRA
Your fresh Raccoon app will be created in the
admin-{app-name}
folder, and have the project structure described here. -
Start developing
Jump into the folder created by the CLI. Install the dependencies using the package manager of your choice and start the development server.
Manual Setup
-
Install @vtex/raccoon-next package
-
VTEX IO Admin integration setup
Although you are building a Next.js app, you still need to declare the
admin
andmessages
builder for it, as in thismanifest.json
example:For VTEX IO to correctly map your app route and host, you need to declare them on the
/admin/navigation.json
(refer to the admin-shell docs to understand these properties) file, following this example:You will also need to keep declaring the message IDs of your app under the
messages
folder. -
Next.js App Setup
Use the connect and bootstrap functions to establish a connection between the Next.js application and the VTEX IO Admin.
-
Develop the application
Once you finished configuring your app, you can start developing it by running the development server.