Skip to content

A React.js/Redux/Material-UI application to search GitHub users, consuming the public GitHub API.

License

Notifications You must be signed in to change notification settings

elenamountz/react-redux-material-github-users

Repository files navigation

GitHub Users

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.

Built with

Code Style

Initialization

This project was bootstrapped with Create React App using the following command:

$ npx create-react-app <project-name>

Demo

Netlify is used for automated build and production deployment. Check out the deployed app.

App Screenshots

Web

Mobile

Quick Start

Prerequisites

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

Install dependencies

Before starting the server, install all the needed dependencies for the project, running the following command:

$ npm install

Run dev server

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 project

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.

License

This project is licensed under the terms of the MIT license. Check LICENSE file.