Get Started
This page provides all the steps needed to create your first extension. It covers the following tasks:
- Install Fynd Development Kit (FDK) command-line interface (CLI)
- Generate starter code for extension
- Populate test data
- Preview your extension
Prerequisites
Before getting started, you'll need the following:
- Git for the starter code
- Node.js 18+ for FDK CLI
- Partner account
- Development company
1. Install FDK CLI
The FDK CLI simplifies theme and extension development using commands for creating, testing, and deploying projects. For more details, refer to the GitHub documentations.
- Run the following command in your terminal to install FDK CLI:
npm install -g @gofynd/fdk-cli
You can run fdk --version
to check if FDK CLI is successfully installed.
2. Generate the Starter Code
- Run the following command to log into your Fynd Partner account:
fdk login
- Select the account for which you want to create the extension.
After login, you can run fdk user
to verify if you've logged in.
- Go back to your terminal and run the following command to initialise a new extension:
fdk extension init
- Select Create new extension.
-
Enter a name for your extension.
-
Select the extension type as Public.
-
Select your preferred technology stack for the template.
The fdk extension init
command creates the extension's folder in your local system with a starter code and registers the extension in the Fynd Partner's account you selected during fdk login
. The starter code includes pre-implemented OAuth flow and an easy setup for webhooks.
3. Populate Test Data
- Run the following command to navigate to the extension directory:
cd "<extension-name>"
- Run the following command:
fdk populate
- Select your development company.
The fdk populate
command adds a predefined set of products to the selected development company. This can be done only once per development company. However, if preferred, you can also create the products manually.
4. Preview Your Extension
- Run the following command:
fdk extension preview
- Copy the preview URL from your terminal into the browser.
- Click Accept and Continue. You should see the following screen:
You've successfully created and launched your first extension.
Futher reading
You can now start building your extension features using the below resources: