Boilerplate Overview
Boilerplate is a pre-written codebase that speeds up development by providing a foundational template for building extensions.
The FDK CLI ships a boilerplate for each supported stack. Every one of them does the same thing — authenticates with Fynd Commerce, lists the products of a company, and receives webhooks — so you can pick the stack your team already knows and read the page for it.
If you do not have a boilerplate yet, go through the steps on the Get Started page.
If FDK CLI is already set up, fdk ext init walks you through an interactive stack picker. Pass --template to skip it and select a stack directly.
Pick your stack
JavaScript
| Stack | Template | Storage | Explanation |
|---|---|---|---|
| Node + React.js | node-react | SQLite | Node + React |
| Node + React.js + Fit.js | node-react-fit | MongoDB + Redis | Node + React + Fit.js |
| Node + Vue 3 | node-vue | SQLite | — |
| Node + Next.js | node-next | SQLite | — |
Java
| Stack | Template | Storage | Explanation |
|---|---|---|---|
| Java + React.js | java-react | SQLite | Java + React |
| Java + Vue 2 | java-vue | SQLite | — |
Python
| Stack | Template | Storage | Explanation |
|---|---|---|---|
| Python (FastAPI) + React.js | python-react-fastapi | Redis | Python (FastAPI) + React |
| Python (Sanic) + React.js | python-react-sanic | Redis | — |
Go
| Stack | Template | Storage | Explanation |
|---|---|---|---|
| Go + React.js + Go-Fit | go-react | MongoDB + Redis | Go + React + Go-Fit |
The stacks without an explanation page follow the same structure as the documented one for their language — the recommended combination for each language is the one explained above.
What every boilerplate has in common
Whichever stack you choose, the extension is the same shape:
- Extension helper library. Handles the install and auth handshake, stores the session, attaches an authenticated platform client to your requests, and verifies webhook signatures. Available for JavaScript, Java and Python; Go uses
fdk-extension-go. - Client library. A generated SDK over the Fynd Commerce APIs, used through the platform client the helper library gives you.
- Session storage. Where the installed company's tokens live — SQLite for the single-process templates, Redis and/or MongoDB for the production-shaped ones.
- A callback URL per launch context. After install, Fynd Commerce redirects the merchant to the URL your
authcallback returns, either/company/:company_idor/company/:company_id/application/:application_id. - A React frontend that calls your own backend routes, which in turn call Fynd Commerce.
Pick Node + React to get to a working extension fastest — it needs nothing but Node installed. Pick Node + React + Fit.js or Go + React + Go-Fit if you are building something that has to scale, since both come pre-wired with MongoDB, Redis, structured logging and error reporting.