michaelyuen / github-search

Home Page:https://my-github-search.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Repository Search App

https://my-github-search.vercel.app/

This app allows you to search GitHub's repositories, specifically using the user and/or stars qualifiers. See GitHub's docs for more info.

ℹ️ Only user and stars are supported. General queries or other qualifiers are ignored.

Getting Started

First, make sure you install the dependencies:

yarn

Run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

Run Tests

Unit - Watching

yarn test:unit

Unit - Coverage Report

yarn test:unit:coverage

Integraton

yarn test:e2e

ℹ️ See Known Issues for more details

Lint

yarn lint

Build for Production

yarn build

Run Production Build Locally

yarn start

⚠️ Must build for production first

Features

  • Search using user and/or stars qualifiers with advanced validation for the special syntax (and well-tested!)
  • Search executes when either the Space or Return key is pressed.
  • Query parameter syncs with search for improved persistence and bookmarking
  • Results are cached by query for the session.
  • Page is server-side rendered and cached by the browser for ~1 minute using cache-control header
  • Adapts to light or dark theme based on system

Known Issues

  • Local TypeScript warnings in test files. Seems to be related to conflicts between Jest and Cypress. Harmless, but a bit annoying. (Reference)
  • Getting start-server-and-test to work with Next.js and Cypress as outlined here.
    • This relates to difficulties encountered in tryng to set up a GitHub Action to run the end-to-end tests

ℹ️ If you find any other issues, please open an Issue!

Known Limitations & Future Enhancements

  • The search is hardcoded to only query for Repository results. In the future, this could be expanded to support other result types.
  • The search is hardcoded to return 50 results. In the future, support could be added for pagination or lazy-loading. Also, allowing users to choose the number of results or page size could be worth considering.
  • Sorting of page results
  • Enhanced search results. Currently the data displayed is a small subset.

About

https://my-github-search.vercel.app/


Languages

Language:TypeScript 98.1%Language:JavaScript 1.9%