Learn how routing is managed in VTEX IO Store Framework.
A route maps a URL pattern and an HTTP request method to an action. It defines how the application responds to client requests for specific endpoints.
When using VTEX IO Store Framework, you do not need to manage routing and HTTP methods directly. Instead, routing and HTTP request methods are managed by either the Rewriter app or the store builder, depending on the route type. This allows you to focus on creating and managing route paths and page templates.
In Store Framework, different apps and builder manage various types of routes. The table below outlines the primary managers for each route type:
Route type | Responsibility | Description |
---|---|---|
Product routes | Rewriter app | Routes related to product pages, forwarded by the Rewriter app to the rendering pipeline. |
Search routes | Rewriter app | Routes related to search result pages, processed and forwarded by the Rewriter app. |
Catalog routes | Rewriter app | Custom routes for predefined templates (e.g., department, brand, and category handled by the Rewriter app and mapped to the appropriate page. |
Custom routes | Store builder | User-defined routes for custom landing pages or other routes that fall outside of predefined product or category routes, directly managed by the store builder and forwarded to the render server. |
The Rewriter app interprets the requested path, identifies the route type, and then forwards the route path to the rendering pipeline. Learn more in Rewriter GraphQL API. Meanwhile, the store builder forwards custom route paths directly to the render server. To learn how to create a custom page, see the Creating a new custom page guide.
In this section, you will learn how to manage routes in your Store Framework store.
Before you begin
Develop your Store Theme
Make sure your store has a Store Theme developed following the Getting Started tutorial.
Check the builders
Check if the builders are properly installed in your Store Theme. To use builders, your account must have at least version vtex.builder-hub@0.293.4
installed. Also, you need to specify them in the app's manifest.json
file. Learn more in Builders.
Make sure the store builder is configured, as it enables the development of Store Framework storefronts.
Check Rewriter installation
To check if the Rewriter app is installed in your store, follow the guide Listing an account's apps and search for vtex.rewriter
in the Installed apps list. If it is not, install the app by following the guide Installing an app.