Search NPM registry

Project URL, Github

Problem

  • I want to build a search UI for NPM registry and be able to search with text inputs.
  • I want to list out the results of the search.
  • I want to see details like name of the package, author and package updated date.
  • I want to be able to route to a separate page so that the users can view details of the selected package.

Solution

  • What if NPM registry sends back a million results? Pagination.
  • Pagination would require some math for the api call to fetch results number 1-10 for page 1, 11-20 for page 2 and so on.
  • Displays error message if no npm packages were found

Stack

  • Programming Languages: Typescript
  • Frontend: NextJS(React), Material UI
  • Testing: Cypress for automated end-to-end testing
  • Misc: Axios