Local & Production environments

This section explains how to run and debug the FrontWing storefront in different environments.

Local development

Run the app in development mode using Vite:

npm run dev

Then open the app at http://localhost:5137.

Make sure your Sylius backend is running and accessible (e.g. http://127.0.0.1:8000) and that API_URL in your .env is correctly set.

Server-side rendering (SSR)

FrontWing uses SSR by default, powered by Remix.

To test SSR locally:

  1. Build the frontend

npm run build
  1. Start the SSR server

npm run start
  1. Visit http://localhost:3000 – the page source should contain pre-rendered HTML.

πŸ” Check SSR with curl

Example:

curl http://localhost:3000
curl http://localhost:3000/product/Apollo_T_Shirt

If the responses contain full HTML (e.g. product name), SSR is working.

πŸͺ Order token & cookies

FrontWing stores the order token in cookies and syncs it with the Sylius backend using OrderContext.

  • The token is created if not present

  • It is reused across sessions

  • It’s sent in all cart/order API requests

πŸ‘‰ Make sure your Sylius backend allows cookies (check backend CORS and cookie domain settings if needed).

Last updated

Was this helpful?