This is a React project that mimics the GitHub Search functionality of GitHub, but for users.
To run locally, run yarn install
first. Then run yarn start
.
Tests are executed via yarn test
.
To create the final build, run yarn build
.
- This project uses both v3 (REST) and v4 (GraphQL).
- GraphQL was used to minimize the number of HTTP requests towards GitHub API. GraphQL allows retrieval of various attributes such as follower count in a single search query. If we were to use REST, we would need to use multiple queries to display this information under search results.
- REST was used to display user information upon clicking a search result, since it provides a nice & quick way to display user data.
- Semantic UI was used for visuals, since its design is quite similar to GitHub's design.
- GraphQL-Request was chosen as the GraphQL library, which a simple library, but sufficient for a project of this size.
Deployment is done to Netlify using GitHub actions. It is executed on every push.