https://github.com/alejandromumo/react-searchkit

React component library for interacting with a REST API.

https://github.com/alejandromumo/react-searchkit

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

React component library for interacting with a REST API.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of inveniosoftware/react-searchkit
Created about 4 years ago · Last pushed about 4 years ago

https://github.com/alejandromumo/react-searchkit/blob/master/



# React-SearchKit

![Build status](https://github.com/inveniosoftware/react-searchkit/workflows/CI/badge.svg)
[![Release](https://img.shields.io/npm/v/react-searchkit)](https://www.npmjs.com/package/react-searchkit)
[![License](https://img.shields.io/github/license/inveniosoftware/react-searchkit)](https://github.com/inveniosoftware/react-searchkit/blob/master/LICENSE)
[![Downloads](https://img.shields.io/npm/dm/react-searchkit)](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

![React-SearchKit screenshot](docs/website/static/img/screenshot.png)

## Examples

You can find a collection of examples in the `src/demos` folder:

- Elasticsearch, an example on how to query Elasticsearch (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).

### Elasticsearch

To run the Elasticsearch 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/elasticsearch/docker
docker-compose up
```

Then, init the demo data:

```bash
curl -XPUT 'http://localhost:9200/random?pretty' -H 'Content-Type: application/json' -d @es7-mappings.json
curl -XPOST 'http://localhost:9200/random/_bulk' -H 'Content-Type: application/json' --data-binary @es-random-data.json
curl -XGET 'http://localhost:9200/random/_count?pretty'
```

Demo data have been randomly generated using .

> In case you want to clear your elastic search from data you can use `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
```

Owner

  • Name: Manuel Alejandro
  • Login: alejandromumo
  • Kind: user
  • Location: Geneva, Switzerland
  • Company: CERN

Computer Engineer | CERN Open Science Repositories | @inveniosoftware @zenodo

GitHub Events

Total
Last Year