Git Product home page Git Product logo

github-explorer's Introduction

GitHub Explorer

Explore all repos in the GitHub world

Set GitHub access token (Optional)

For requests using Basic Authentication, OAuth, or client ID and secret, you can make up to 30 requests per minute. For unauthenticated requests, the rate limit allows you to make up to 10 requests per minute. -- https://developer.github.com/v3/search/#rate-limit

Create .GITHUB_ACCESS_TOKEN.js at repo root

module.exports = '{YOUR_ACCESS_TOKEN}'

Run

npm ci
npm start

Open http://localhost:8080

Development

Prerequisites: Node v10 or higher

npm ci
npm start

with another terminal:

npm run build:dev

Storybook

npm run storybook

Test

npm run test
npm run test:functional

Demo screen recording

https://drive.google.com/file/d/1_Yh9z2jmA6I74XL9jCyFrhGoiRVET0lF/view?usp=sharing

Architecture

Server

  • Node.js + Express
  • React SSR
  • route
    • /:keyword?: render React app
    • /search/repos/:keyword/:page?: proxy for calling GitHub API w/ GitHub access token
      • Use normalizer to remove useless fields in GitHub API response

Client

  • React w/ Hooks
  • react-router
  • useContext + useReducer for state management
    • repo
    • keyword
  • styled-component
  • Transpile/bundle via webpack and babel

Feature

  • Gzip for server response
  • Real-time search
    • Debounce search input onChange event
    • Bind/sync for keyword in both URL and search input
  • Highlight keywords in repo card
  • Scroll to bottom to load more
    • Use intersectionOberver to check if user scrolls to bottom to load more
  • Dark mode (w/ bad design lol)

Code quality

  • ESLint
  • Prettier
  • Husky pre-commit hook w/ lint-staged

Test

  • Jest (unit test)
  • CodeceptJS + Puppeteer (e2e test)
  • Storybook (manual test ๐Ÿ˜›)

Questions of the interview take-home assignment

image

github-explorer's People

Contributors

x3388638 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ulayab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.