This project is a simple single-page application built with ReactJS, Redux, Redux Persist, React Router, and other modern technologies. It allows users to search for users or repositories on GitHub, displaying the results in a responsive grid format. The application efficiently handles API calls, loading states, and pagination.
To run the project locally, follow these steps:
- Clone the repository.
- Install dependencies using
yarn install
. - Create a
.env
file based on the provided.env.example
file. - Set the
VITE_API_URL
tohttps://api.github.com
. - Generate a GitHub API token here and add it to
VITE_GITHUB_TOKEN
in the.env
file. - Start the development server using
yarn dev
. - Open your browser and navigate to
http://localhost:3000
.
Once the application is running, you can perform the following actions:
- Use the search field to type your query.
- Choose between searching for users or repositories using the dropdown menu.
- As you type, the application will fetch and display the results in a grid format above.
- Pagination allows you to navigate through multiple pages of results.
- Various states such as initial, loading, and error are handled gracefully, providing feedback to the user.
yarn dev
: Starts the development server.yarn test
: Runs tests.yarn build
: Builds the project for production.
A live demo of the project is available at https://dulatif-github-searcher.netlify.app.