Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 = ♥️

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.