Skip to content

williamssam/github-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Profile - a better look at your profile

My goal was to create a responsive webapp using React, Typescript and the Github GraphQL api to show an interesting look of your github profile with data visualizations for your data.


Note
- Converted the app from react with js to typescript
- Migrate the github api version from v3 (rest api) to v4 (graphql)

Getting Started

  1. Install dependencies
    yarn

  2. Start the server
    yarn start

How I worked on this project

  • I built this app with design inspiration from Britanny's original design
  • I used styled components for styling, gh-polyglot to get repo details, and flip move for the flip animations.

How to navigate this project

  • Each individual components can be found inside the components folder
  • Global styles can be found in the globalstyles folder
  • I seprated the styles from the logic, you can find the styles in the styles folder
  • declared universal types in 'types.d.ts'

Why I built the project this way

  • I used "styled-componenets" because it is a great library for styling. it includes an auto-prefixer and allows me to use Javascript for styling.
  • The application fetches data from the Github API
  • Uses the GhPolyglot to fetch user repos and the user repo lanagues details

Challenge

  • While migrating to typescript, one of erros I got is "element implicitly has an 'any' type because expression of type 'string' can't be used to index type". I solved this using Record<string, any> type, bascially telling the compiler that it can accept both 'any' and 'string' type.

This helped: StackOverflow Answer

Credit

Original idea by Britanny Chang

Author