After Elasticsearch and the Arranger Admin UI are properly configured, you can finally integrate your UI application (e.g. data portal).
The key browser-side packages used by Arranger are the @arranger/admin-ui
and @arranger/components
packages:
@arranger/admin-ui
: This package provides the admin UI for content administration@arranger/components
: This package provides UI components that are pre-configured to work with the Arranger server APIBoth packages are written in React, and hence we highly recommend that you develop your UI app in React for the most seamless integration.
To integrate the admin UI with your React app:
npm i @arranger/admin-ui
import ArrangerAdmin from '@arranger/admin-ui/dist';import { Route, Switch } from 'react-router-dom';const ArrangerAdminPage = () => (<ArrangerAdmin basename="/admin" apiRoot="http://localhost:8000" fetcher={fetch} />)
Config | Description |
---|---|
basename | Tells Arranger Admin to treat /admin as the root path for client-side routing. |
apiroot | Tells Arranger Admin where to communicate with the backend API. |
fetcher | Allows you to specify a custom data fetcher to use. Can be useful for integrating custom client-side login or authorization logic. It must implement the Fetch API. |
The code for a very basic sample portal implementation can be examined with the @arranger/components
package, to guide you in your development.
From your arranger
project directory:
npm ci && npm run bootstrap
modules/components/stories
directory:cd modules/components
Storybook
server:npm run storybook
Storybook
. The actual code for the basic portal implementation can be examined in this file: arranger/modules/components/stories/Portal.js
.