A playground project about searching a GitHub user by username, in order to practice Redux pattern. This application consumes the public GitHub REST API, so user doesn't have to be authenticated. After a successful search, the main page renders a user's minimal bio, their public repositories, followers and following users. Fully responsive layout taking advantage of Material Design specification.
- React.js as main UI library
- Redux as state management library
- Redux Thunk as side effects middleware
- Material-UI components as an implementation of Google's Material Design
- axios as HTTP client
This project was bootstrapped with Create React App using the following command:
$ npx create-react-app <project-name>
Netlify is used for automated build and production deployment. Check out the deployed app.
Create a .env
file at project's root directory, running the following command:
$ touch .env
Define needed project environment variables as key/value pairs inside .env
file. Notice that custom environment variables needs to start with REACT_APP
prefix, so React can expose them in JS through process.env
.
Example:
REACT_APP_KEY = VALUE
Only one environment variable is required for this application, the GitHub API base URL. So, you need to define the following pair:
REACT_APP_BASE_URL = https://api.github.com
Before starting the server, install all the needed dependencies for the project, running the following command:
$ npm install
Run the appplication in the development mode using your terminal at project's root directory:
$ npm start
Open http://localhost:3000 to view it in the browser.
Build the app for production to the build
folder using:
$ npm run build
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
This project is licensed under the terms of the MIT license. Check LICENSE file.