4lbertoC / popularrepositories

A simple app showing the most popular repositories for a GitHub user

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Popular Repositories

A page containing the most popular repositories of a GitHub user.

Structure forked from react-starter-kit.

Directory Layout

.
├── /build/                     # The folder for compiled output
├── /config/                    # Configuration files for Webpack, Jest etc.
├── /node_modules/              # 3rd-party libraries and utilities
├── /src/                       # The source code of the application
│   ├── /actions/               # Action creators that allow to trigger a dispatch to stores
│   ├── /assets/                # Static files which are copied to ./build on compile
│   ├── /components/            # React components
│   │   ├── /common/            # - Shared components. E.g. Link, Mixins
│   │   ├── /layout/            # - Layout components. E.g. Header, Navbar
│   │   └── /pages/             # - Web-page components. E.g. About, Profile
│   ├── /constants/             # Constant values used across the app
│   ├── /core/                  # Core components (Flux dispatcher, base classes, utilities)
│   ├── /helpers/               # Custom utilities for the application
│   ├── /models/                # Definitions of data types
│   ├── /services/              # Wrappers for remote services
│   ├── /stores/                # Stores contain the application state and logic
│   ├── /styles/                # The styles to be included in the app
│   └── /app.js                 # The application's main file (entry point)
├── gulpfile.js                 # Configuration file for automated builds
└── package.json                # The list of 3rd party libraries and utilities

Requirements

Node.js has to be installed on your machine. The other dependencies are fetched by npm.

Getting Started

Clone the repo:

$ git clone git@github.com:4lbertoC/popularrepositories.git
$ cd popularrepositories
$ npm install                   # Install Node.js components listed in ./package.json

By default, it builds in debug mode. If you need to build in release mode, add --release flag.

How to Run

$ gulp                          # or, `gulp --release`

This will start a lightweight development server with LiveReload and synchronized browsing across multiple devices and browsers.

How to Test

Run unit tests powered by Jest with the following npm command:

$ npm test

Tests and mocks can be found in the __tests__ and __mocks__ directories at the same level of the tested class.

Optional parameters

In the current implementation, the userId can be changed through the query parameters.

For example, you can view the popular repositories of the user bob by appending at the end of the url ?userId=bob.

Known Issues

Watchers

The number of watchers returned by the GitHub API is the same as the stargazers. The correct number should be fetched from GET /repos/:owner/:repo/subscribers. See this GitHub Blog post.

URLs

The react-starter-kit creates a single-page web application. It uses client-side routes that don't work as direct links.

About

A simple app showing the most popular repositories for a GitHub user

License:MIT License


Languages

Language:JavaScript 92.6%Language:CSS 5.7%Language:HTML 1.7%