Coder Social home page Coder Social logo

taylorjg / repo-traffic-react Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.33 MB

GitHub OAuth App to display repo traffic data using React and TypeScript

Home Page: https://repo-traffic-react.onrender.com

HTML 2.41% TypeScript 97.26% JavaScript 0.28% Procfile 0.05%
github-api react typescript material-ui github-oauth render-app

repo-traffic-react's Introduction

CI/CD

Description

I have used React for a few years and I have some familiarity with TypeScript but this is my first attempt at using them together. The backend Express server also uses TypeScript.

This little app lists your GitHub repos along with some traffic details. It is a GitHub OAuth App - you need to authorize it to allow access to your GitHub repos. Once authorized, it maintains the GitHub access token in an encrypted cookie (github-token).

Authorization steps

  1. If you have not authorized yet, then I initially show a view explaining that you need to authorize and provide a button to start the process
  2. You are then redirected to GitHub where you can review the permissions required by this app - namely the public_repo scope
  3. You will need to login to your GitHub account to complete the process
  4. After successful authorization, you are redirected to the home view

Authorization steps

Things in this project that I already have experience with

  • React and Hooks
  • JavaScript
  • Node.js
  • Express
  • Async/await, generators and async generators
  • GitHub REST API
  • GitHub GraphQL API
  • Deployment to render.com

Things in this project that were new to me

  • Node.js Express server with TypeScript
  • React with TypeScript
  • react-query
  • graphql-request
  • MUI
  • GitHub OAuth Apps
  • CI/CD workflow using GitHub Actions

TODO

  • Turn this into a GitHub OAuth App
  • Add screenshots showing the authorization process
  • Add a link to review access
  • Show totals (views, clones, stars, forks)
  • Show user details
  • Show stats (elapsed time, number of API calls, rate limit details)
  • Use conditional requests as these don't count against the rate limit when the resource is unchanged i.e. when status code 304 is returned
  • Add CI/CD workflow using GitHub Actions
  • Semantic markup
  • Accessibility (a11y)
  • Responsive UI
  • Tests
    • Backend
    • Frontend

Links

repo-traffic-react's People

Contributors

taylorjg avatar

Watchers

 avatar  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.