This project outlines the development process for a Fynd extension that displays product listings for a company and its associated applications. By following this guide, you'll be able to set up the development environment, build the extension locally, and understand the testing procedures.
- You have installed globally Node 18.X.X or above version.
- You have fdk-cli installed install
- You have created a partner account.
- You have created a development account and populated test data in it.
To initialize your extension template locally, run the following command:
fdk extension init --template node-react
Enter your preferred extension name and type, and you are all set.
To start local development, execute the following command:
fdk extension preview
This command will provide a partner’s panel URL where you can interact with your extension. For more information, please read this guide.
To run the application using Docker in Production environment, follow these steps:
- Build the Docker image:
docker build -t extension .
- Run the Docker container
docker run -p 8080:8080 extension
To Run the extension with Docker locally, ensure you first prepare your environment:
- Copy the .env.example file and rename it to .env at the root of your project.
- Fill in all the required values in the .env file.
After setting up your .env file, you can proceed with the Docker commands listed above to build and run your extension locally.
By default, this template uses an SQLite
database to store session data. SQLite is sufficient for development purpose only, it may not be suitable for all production scenarios. The best database for your application depends on your data requirements and query patterns.
If your app requires a more robust database solution, you can easily extend the base storage class provided by the fdk-extension-javascript
library to use a database of your choice for session data. Here are some databases that we support by default:
- SQLite
- Memory Storage
- Redis
Feel free to configure and run your preferred database on your server to meet your specific needs.
- fdk-client-javascript: This library contains all the methods to call Fynd platform APIs.
- fdk-extension-javascript: This library streamlines the setup of authentication for accessing Fynd Platform APIs. It also simplifies the process of subscribing to webhooks for receiving real-time notifications.