Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bloomreach/bloomreach-reference-spa
brX SaaS + React = ♥️
https://github.com/bloomreach/bloomreach-reference-spa
bloomreach brxm react spa
Last synced: 6 days ago
JSON representation
brX SaaS + React = ♥️
- Host: GitHub
- URL: https://github.com/bloomreach/bloomreach-reference-spa
- Owner: bloomreach
- License: apache-2.0
- Created: 2020-10-28T19:21:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T13:31:03.000Z (8 months ago)
- Last Synced: 2024-03-26T21:01:56.867Z (8 months ago)
- Topics: bloomreach, brxm, react, spa
- Language: TypeScript
- Homepage:
- Size: 1.83 MB
- Stars: 14
- Watchers: 18
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bloomreach Content + React = ♥️
Reference SPA using the Bloomreach Experience [React SDK](https://www.npmjs.com/package/@bloomreach/react-sdk).
The app is created using [Next.js](https://nextjs.org/).## Install and run
Copy `.env.dist` file to `.env` and specify the brX SaaS instance to fetch the page model from:
```
NEXT_PUBLIC_BRXM_ENDPOINT=https://brx-saas-eng02.bloomreach.io/delivery/site/v1/channels/brxsaas/pages
```By default, **multi-tenant mode is disabled**. You may enable multi-tenant support by setting the environment variable NEXT_PUBLIC_BR_MULTI_TENANT_SUPPORT to true.
```
NEXT_PUBLIC_BR_MULTI_TENANT_SUPPORT=true
```If multi-tenant mode is enabled, then the NEXT_PUBLIC_BRXM_ENDPOINT should not be set:
```
#NEXT_PUBLIC_BRXM_ENDPOINT=https://brx-saas-eng02.bloomreach.io/delivery/site/v1/channels/brxsaas/pages
```
Then, build and run the Next.js app as follows:```bash
npm ci
npm run build
npm run start
```## Available scripts
In the project directory, you can run:
### `npm run dev`
Runs the app in the development mode.
Open to view it in the browser.The page will reload if you make edits.
You will also see any lint errors in the console.### `npm run 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](https://nextjs.org/docs/deployment) for more information.