Installation

This guide will help you run the FrontWing storefront locally with a Sylius backend.

âś… Requirement:

  • Node.js v20 or higher

  • A running Sylius backend with the Sylius API enabled and accessible

  • A .env file configured with your Sylius backend API URL

Installation

  1. Fork and clone the repository

git clone https://github.com/<your-username>/FrontWing.git
cd FrontWing
  1. Install dependencies

npm install
  1. Set up your .env file

Create a .env file in the root directory with the following:

API_URL=http://127.0.0.1:8000
PUBLIC_API_URL=http://127.0.0.1:8000
  1. Run in development mode

npm run dev

Backend Setup

If you don't have a Sylius backend ready, you can use the Sylius Standard Edition and follow these extra steps:

  • Configure CORS for local development Edit the file: public/index.php in your Sylius project (example):

<?php

declare(strict_types=1);

header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Request-Method");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE");
header("Allow: GET, POST, OPTIONS, PUT, PATCH, DELETE");
$method = $_SERVER['REQUEST_METHOD'];
if ($method == "OPTIONS") {
    die();
}

use App\Kernel;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return static function (array $context) {
    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};

đź’ˇTroubleshooting

  • API_URL is undefined – make sure .env exists and API_URL points to a working Sylius instance.

  • CORS errors – check that your Sylius backend sends appropriate Access-Control-Allow-Origin headers (e.g. via index.php).

  • ECONNREFUSED / fetch errors – ensure Sylius is running and accessible from your React frontend.

Last updated

Was this helpful?