0.9.3
ResearchNow front end application based on NYPL's React Design System.
Provides a "Welcome page" entry point with heading, search box, and tagline. Connects to an ElasticSearch index via an API endpoint (https://platform.nypl.org/research-now/search-api). Simple keyword searches can be entered in the form and an index response is displayed back to the user.
This is a Next.js project bootstrapped with create-next-app
.
Clone the repo and run npm install
.
ResearchNow also uses [webpub viewer] (https://github.com/NYPL-Simplified/webpub-viewer/tree/SFR-develop) to serve epubs. Clone this branch and run npm install
and npm run streamed
For local development, run npm run dev
to start the local server at localhost:3000
with
default environment variables.
Configurations are environment specific with different values per environment so it's necessary to set the appropriate environment when starting the application.
- NextJS
- Redux
- NYPL Header and Footer npm modules
- NYPL Design System
Currently takes in a query string to pass along to the ResearchNow Search API which submits a keyword search to the Elasticsearch instance, and renders the returned output. Sends the q
parameter specified in the rendered search form on the main page.
The server route /search
should also take a q
query string parameter and perform the same keyword search via the ResearchNow Search API.
Search via keyword, author, title, subject have been implemented against v1 of the ResearchNow Search API. Terms use the AND boolean operator by default. Search terms can also use the OR boolean operator and search terms can be quoted for phrase searching. Combinations of these can be used as well for more complex searching using the basic search input.
Term combinations
- One term: jefferson
- Multiple terms: world war
- Phrase: "English Literature"
- Single term and phrase: james AND "English Literature"
These types of combinations can be used with any available field selection.
Advanced search to introduce multiple form inputs including field select.
To test Request Digitization, append to the url feature=RequestDigital
To test Total Number of Works, append to the url feature=BooksCount
To test displaying citations, append to the url feature=DisplayCitations
Appending to URL doesn't work for more than one feature, to test more than one feature, edit the object in featureFlagConfig.js
To run unit tests, run npm test
in the terminal. Or run npm run test-with-coverage
to run the test and see the test coverage.