Creating new projects
Learn how to create new projects in your FastStore monorepo.
After setting up your FastStore monorepo, you can create new projects for additional stores, brands, or modules using the fsp create command. This is useful when you need to add a new storefront, extend your monorepo with additional modules (Buyer Portal Checkout, VTEX Sales App), or create projects for different brand variants within your organization. You can create a Buyer Portal Checkout (checkout) or Sales App (sales-app) project without a Product Discovery Experience (discovery) project if FastStore isn't your storefront.
The fsp create command automatically creates the project directory with the necessary structure and updates your faststore.json configuration file with the new project settings, including the path and port allocation.
Instructions
Run the following command in your terminal at the root of your monorepo:
_10yarn fsp create
Or using npm:
_10npx fsp create
Use case example
Consider you want to create a new Discovery project for a different brand. The fsp create command will guide you through an interactive setup by asking for:
- Account name: The VTEX account for which you're creating the project (example:
store-a,brand-store-1). - Module type: The module you want to initialize (
discovery,checkout, orsales-app). For Buyer Portal Checkout (checkout) and Sales App (sales-app), continue with Setting up Buyer Portal Checkout or Setting up Sales App extensions after you create the project. - Project path: The directory path where the project will be created (example:
./packages/store-a,./store-a/checkout).
In your terminal, you should answer the questions as follows to create a new Discovery project for a different brand:
_10? What's the account name? brand-store-1_10? Which module do you want to initialize? discovery_10? What should be the path to initialize discovery? ./packages/brand-store-1
You can also include all parameters directly in your command:
_10yarn fsp create brand-store-1 discovery ./packages/brand-store-1
Or using npm:
_10npx fsp create brand-store-1 discovery ./packages/brand-store-1
After running the command, your monorepo structure will be updated with:
_10📂 Account monorepo_10│_10├── 📂 packages_10│ └── 📂 store-a_10│ ├── 📂 discovery_10│ └── 📂 brand-store-1_10│ ├── 📂 discovery_10├── 📄 faststore.json_10├── 📄 package.json_10│
And your faststore.json will be automatically updated with the new configuration:
_17{_17 "$schema": "https://unpkg.com/@vtex/fsp-config/faststore.schema.json",_17 "stores": {_17 "store-a": {_17 "discovery": {_17 "path": "packages/store-a",_17 "port": 3000_17 }_17 },_17 "brand-store-1": {_17 "discovery": {_17 "path": "packages/brand-store-1",_17 "port": 3001_17 }_17 }_17 }_17}