Skip to content

micson-us/openlxp-xms-ui

Repository files navigation

Open LXP

Version yarn license

react router tailwind

Table of content


Installation

Clone Project

git clone git@github.com:OpenLXP/openlxp-xms-ui.git

Install Project Dependencies

Start off by verifying that you have yarn installed.

yarn -version

If yarn is not installed use the following command to install it. This will install the yarn package manager globally on your system.

global install

npm install yarn -g

local install

npm install yarn

Once yarn has been installed you will need to install the project dependencies. Using the following command we will manually set your yarn version for this project.

yarn set version 1.22.1

After the version has been installed and set we will install the dependencies. Using the following command we will install all the project dependencies.

yarn install package.json

Getting started

Environment Variables

This project makes use of globally available environment variables. Below are the required environment variables required for this project.

REACT_APP_XIS_CATALOGS_API

This is the root API endpoint used by the application to access XIS catalogs.

http://<YOUR_BACKEND_ENDPOINT>/api/catalogs/

REACT_APP_XIS_COMPOSITELEDGER_API

This is the endpoint for accessing the XIS compositeledger.

http://<YOUR_BACKEND_ENDPOINT>/es-api/

REACT_APP_XIS_EXPERIENCES_API

This is the root API endpoint used by the application to access XIS experiences.

http://<YOUR_BACKEND_ENDPOINT>/api/experiences/

Creating a local environment file

Walk through

Let's create a local .env.local file. If you are in a code editor you can right click and create new file.

vscode create new file

If you are using the terminal use the following command to create a new file.

bash command

touch <PATH_TO_YOUR_PROJECT_ROOT>/.env.local

powershell

New-Item -Path <PATH_TO_YOUR_PROJECT_ROOT>\.env.local -ItemType File

Navigate to the newly created file and paste the template (below) into the file. Replace <YOUR_BACKEND_ENDPOINT> with your localhost setup or your live endpoint.

.env Template

REACT_APP_XIS_CATALOGS_API=<YOUR_BACKEND_ENDPOINT>/api/catalogs/
REACT_APP_XIS_COMPOSITELEDGER_API=<YOUR_BACKEND_ENDPOINT>/api/metadata/
REACT_APP_XIS_EXPERIENCES_API=<YOUR_BACKEND_ENDPOINT>/api/experiences/

Important Notes

To use this piece of code without any issues you will need the XMS component to accompany it.

OpenLXP XMS

You're all set! Explore the commands below to run, build, or test the app.


Available Scripts

In the project directory, you can run the following.

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn coverage

Launches the test runner with coverage mode enabled. See the section about running tests for more information.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages