Code Monkey home page Code Monkey logo

githubrepos's Introduction

Description

Github shows list of popular github repos from last week which can be starred and filtered via starred status & language. One can update star status for each repo.

Setup

  • yarn install To install dependencies

  • yarn run dev Runs the app in the development mode.

  • yarn test To run tests

Directory Structure of components/containers

					App
					|
				RepoListPage
				|          |
			Filters    	PaginatedRepos
				|           |		|
		input checkbox   Paginate  RepoList
										|		
									RepoTile
									|		|
								Detail	IconButton + Star

Architecture

  • components: All the folders of react components used in the app. Each folder contains a tsx file for rendering and a ts file for styled components + test files for testing the functionality of the game.
  • store: used ZUSTAND to support localstorage for storing starred repo ids. useStarredRepoStore is a hook responsible for any update and re-rendering when starred status of repo is changed. Benefits of using zustand A small, fast and scalable bearbones state-management solution using simplified flux principles. Has a comfy API based on hooks, isn't boilerplatey or opinionated.
  • api: Uses rtk query to fetch list of github repos
  • Testing: Unit tests for RepoListPage added which tests rendering of repo list and filtering based on languages.

Special Mention

  • Added zustand store for localstorage usage for starred repos
  • Used rtk for caching to avoid re-fetching.
  • Added language filter - Repos can be filtered by language
  • Used React Paginate for pagination and optimized update
  • Responsive UI

Improvements

  • Improved loading state for repos using UI skeletons
  • Introduction of gql for parameter aliasing
  • Improved UX for Pagination
  • Extraction of styleguide components for re-usability
  • Unit test cases for all components
  • Advanced Optimization: Introduction of Virtualized list of repos(includes BE involvement)

Third-party libraries

  • zustand
  • styled-components
  • @reduxjs/toolkit
  • react-redux
  • react-paginate

githubrepos's People

Contributors

chhavi-khandelwal avatar

Watchers

 avatar

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.