This document helps you setup local environment for Alsayer Project.
-
Download the OpenJDK Java 11 from https://jdk.java.net/java-se-ri/11 and setup JAVA_HOME and PATH variables.
-
IntelliJ /Eclipse and VS Code Editor
-
Backend Development Requirement- Extract the sap commerce cloud zip downloaded from onedrive link shared:
in your hybris installation directory.
-
Frontend Development Requirement-
-
node.js - 12.x version
-
Angular CLI- 10.x or later
-
yarn-1.15 or later
-
-
Create a codebase directory for cloning the repository. Open the command prompt/terminal inside the directory and run the command :
git clone https://github.com/aspiredigital-ae/Al-Sayer-DIP.git
It will ask for your Github id and password, provide the details accordingly.
-
Create your local branch for your custom changes:
-
For windows you can use Tortoise git or SourceTree to create a branch under origin/develop.
-
For Linux/Mac run command -
To create and checkout from origin/develop to your branch
git checkout -b <branch_name> develop
To create branch in the repo
git push -u origin <branch_name>
- Create symlinks for custom by running the following commands in cmd/terminal :
-
For Windows :
Symlink for custom folder from the Alsayer codebase
mklink /D {hybris_installation_dir}/hybris/bin/custom {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/hybris/bin/custom
-
For Linux/Mac :
Symlink for custom folder from the Alsayer codebase
ln -s {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/hybris/bin/custom {hybris_installation_dir}/hybris/bin/custom
-
Copy and paste alsayer-receipe in your {hybris_installation_dir}/installer/recipes which is present your codebase.
-
Open a terminal or command prompt window inside the installer folder i.e., {hybris_installation_dir}/installer and set up the recipe using the following command:
./install.sh -r alsayer-receipe
If you are using Windows, change ./install.sh to install.bat.
-
Go to your platform directory to {hybris_installation_dir}/hybris/bin/platform and run following commands to access the site -
-
For windows-
setantenv.bat
ant clean all
ant initialize
hybrisserver.bat debug
-
For linux/mac-
. ./setantenv.sh
ant clean all
ant initialize
./hybrisserver.sh debug
You can access the storefront from link https://localhost:9002/alsayerstorefront?site=electronics
-
You can see the alsayerstore, the spartacus storefront present in repo/js-storefront/alsayerstore and can start server inside alsayerstore as:
yarn install
yarn start
And can access the spartacus site form link https://locahost:4200
-
Create symlinks for localextensions.xml and local.properties by running following commands in cmd/terminal:
-
For Windows :
Symlink for local.properties :
mklink /D {hybris_installation_dir}/hybris/config/local.properties {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/config/local.properties
Symlink for localextensions.xml:
mklink /D {hybris_installation_dir}/hybris/config/localextensions.xml {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/config/localextensions.xml
-
For Linux/Mac :
Symlink for local.properties :
ln -s {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/config/local.properties {hybris_installation_dir}/hybris/config/local.properties
Symlink for localextensions.xml:
ln -s {alsayer_codebase_dir}/Al-Sayer-DIP/core-customize/config/localextensions.xml {hybris_installation_dir}/hybris/config/localextensions.xml