Skip to content

This is a small application that allows you to search for repositories on GitHub.

Notifications You must be signed in to change notification settings

snax4a/github-repository-search

Repository files navigation

🔎 GitHub Repository Search

This is a small application that allows you to search for repositories on GitHub.

App demo

📝 Features

  • Search for repositories by text query
  • Sort and order by Stars or Updated column
  • Simple pagination support (next and previous page)
  • Change the number of results per page
  • Results are cached in memory for 1 minute
  • Loading and error states are displayed when necessary

I have added husky and commitlint to enforce commit message format. I have also added lint-staged to run linters on staged files before commit.

I have decided to use RTK Query because there was Redux requirement and I thought that It would be better choice than Tanstack Query because I added Redux Toolkit also. Usually I would use Tanstack Query for this kind of application.

Btw, I have used Redux Toolkit Query for the first time so I might have not used it in the best way.

Missing features

  • Unit tests
  • No React Context was used
  • State is not hold in the URL, so if you refresh the page, the state is lost (If I had more time I would move the searchParams state from redux to URL query params)
  • GitHuB API rate limits are not handled
  • Search, Next, Prev buttons have no loading state (I would disable them while the request is being made and display a loading spinner inside)

🚀 Technologies used

🪚 Requirements

This project uses pnpm as package manager, so you need to install it before running the project.

# Install pnpm
$ npm install -g pnpm

📦 How to run

# Install the dependencies
$ pnpm install

# Run production build
$ pnpm build
$ pnpm start

# or

# Run development build
$ pnpm dev

About

This is a small application that allows you to search for repositories on GitHub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published