Using the API provided by Github Search API, which is documented here (https://docs.github.com/en/rest/search#about-the-search-api) create a SPA using React and Next.js. A user should be able to search for public repositories and users.
- Select: you should be able to select search type between 'repositories' and 'users' and do a search based on this type.
- Search: When a user enters a query and 'user' type is selected, it should be able to
get a list of users matching this query.
- Show the user avatar, name and the link to his profile.
- Search: When a user enters a query and 'repository' type is selected, it should be able to
get a full list of public repositories matching this query.
- Filetype: Convert the filetypes of the files in the repository into a tag/badge, (e.g, if the returned repository has a list of files containing python and javascript files, the repository should have the respective tags/badges).
- Fork: Username/Avatar of the last 3 users who forked it with avatar linking to the fork.
- Any other additional information, you'd like to show.
- Handle the empty/error/loading states.
- Pagination: add the infinite scroll pagination.
- You should think about the UI and UX of your app.
- You should think about the state management of your app.
- You should consume the api endpoint mentioned and not use it as internal json file.
- You should build this application using Reactjs and NextJS (Typescript will be a plus).
- Simple, clear, readable code How well structured it is? Clear separation of concerns? Can anyone just look at it and get the idea to what is being done? Does it follow any standards?
- Correctness Does the application do what it promises? Can we find bugs or trivial flaws?
- Memory efficiency How will it behave in case of large datasets? Are results cached? Do you have debounce on your search?
- Testing How well tested your application is? Can you give some metrics?
If you have any questions to this challenge, please do reach out to us.
The challenge should be delivered as a link to a public git repository (github.com or bitbucket.com are preferred).
Before submitting, make sure that your program
- Code accompanies the Unit Tests
- Usage is clearly mentioned in the README file, This including setup the project, how to run it, how to run unit test, examples,etc
- Uses the endpoint directly
Implementations focusing on quality over feature completeness will be highly appreciated, don’t feel compelled to implement everything and even if you are not able to complete the challenge, please do submit it anyways.
