Skip to main content

Set Up Headless Turbo Theme

This guide connects the Headless Turbo theme to a Fynd Commerce sales channel and starts the local storefront.

Review Prerequisites

  • Git
  • Node.js 20 or later
  • A Fynd Commerce company and sales channel
  • The sales channel's application ID and public-scope application token

Set Up Headless Turbo Theme

  1. Clone the Headless Turbo theme repository:

    git clone https://github.com/gofynd/HeadlessTurbo.git
    cd HeadlessTurbo
  2. Install dependencies with your preferred package manager.

  3. Create or update the env file with the required environment variables:

    PROXY_TARGET=https://api.fynd.com
    DOMAIN=api.fynd.com
    PORT=8080

    APPLICATION_ID=your_application_id
    APPLICATION_TOKEN=your_public_application_token

    TURBO_DEV_PORT=5002
    USE_PROXY=true
    warning

    The token is injected into the storefront and can be read by visitors. Use only a public-scope application token.

  4. Start the Webpack Dev Server and Fastify using your selected package manager.

  5. Verify that the storefront connects to your sales channel:

    • Ensure that the home page, product listing, and product detail pages display the correct data.
    • Check that browser requests to /service, /ext, and /graphql succeed.
    • Confirm that cart and login flows function properly.
    • Make sure the browser always uses the Fastify URL, not the internal Webpack port.

Further Reading

  • Continue with the shared source layout and customization workflow in Theme Development.