https://github.com/inveniosoftware/react-searchkit
React component library to build search interfaces
https://github.com/inveniosoftware/react-searchkit
Last synced: 8 months ago
JSON representation
React component library to build search interfaces
- Host: GitHub
- URL: https://github.com/inveniosoftware/react-searchkit
- Owner: inveniosoftware
- License: mit
- Created: 2018-10-25T11:46:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-05T09:03:31.000Z (8 months ago)
- Last Synced: 2025-05-16T13:06:23.372Z (8 months ago)
- Language: JavaScript
- Homepage: https://inveniosoftware.github.io/react-searchkit/
- Size: 6.13 MB
- Stars: 82
- Watchers: 80
- Forks: 41
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cern - React-SearchKit
README
# React-SearchKit

[](https://www.npmjs.com/package/react-searchkit)
[](https://github.com/inveniosoftware/react-searchkit/blob/master/LICENSE)
[](https://www.npmjs.com/package/react-searchkit)
React-SearchKit is a React library that allows you to build in an easy way your search application.
Main features:
- ready-to-use collection of UI components
- configurable REST API endpoint and serialization
- configurable URL parameters handling for deep linking

## Examples
You can find a collection of examples in the `src/demos` folder:
- OpenSearch, an example on how to query OpenSearch (see below)
- Zenodo.org, an example on how to query an Invenio 3 instance
- CERN Videos, another Invenio 3 example
Install dependencies and run the React app to try them out (see steps below).
### OpenSearch
To run the OpenSearch backend for the demo, you can use Docker. A `docker-compose` file with `ES 7` and `nginx` as reverse proxy is available and ready to use.
Run the services:
```bash
cd src/demos/opensearch/docker
docker-compose up
```
Then, init the demo data:
```bash
curl -XPUT 'http://localhost:9200/random?pretty' -H 'Content-Type: application/json' -d @os2-mappings.json
curl -XPOST 'http://localhost:9200/random/_bulk' -H 'Content-Type: application/json' --data-binary @os-random-data.json
curl -XGET 'http://localhost:9200/random/_count?pretty'
```
Demo data have been randomly generated using .
> Delete data in the cluster: `curl -X DELETE 'http://localhost:9200/_all'`
## Developer guide
React-SearchKit uses [create-react-app](https://create-react-app.dev/) as development toolkit.
Install the library:
```bash
npm install
```
Start the demo application:
```bash
npm start
```
The library uses [Jest](https://jestjs.io/) as test runner. To run the tests:
```bash
npm test
```
The library uses `rollup` to build a final version inside the `/dist` folder and it will build CommonJS and ES Modules versions:
```bash
npm run build
```