Giter Site home page Giter Site logo

grantbirki / ghtrending Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 14.09 MB

Open source version of the GitHub /trending page

Home Page: https://ghtrending.birki.io

License: MIT License

Python 44.60% JavaScript 46.84% CSS 4.03% HTML 3.85% Makefile 0.68%
open-source primer react trending trending-repositories

ghtrending's Introduction

ghtrending ⭐

ci stars stars_to_s3


⚠️ This project is being archived. It appears that GitHub is keeping the trending page and that is great! I'm no longer going to maintain this project for the following reasons:

  1. I don't want to keep paying $40 a year for the domain
  2. I cannot move it under an existing domain easily (like one I already own) because Cloudflare charges $10 a month for subsub domain certificates
  3. I simply don't have enough time.

Open source version of GitHub's trending page

Find the latest trending repositories on GitHub!

ghtrending.birki.io link 🔗

ghtrending

Please note, this project is not affiliated with GitHub, Inc.

About 💡

On September 1st, 2022, GitHub announced that it will be deprecating the /trending page. Many GitHub users (myself included) really enjoy the trending page. It is a great way to discover new repositories, projects, and developers.

This project is an attempt to recreate the trending page in a way that is open source and community driven. The goal is to be able to preserve a feed of trending repos that can be used by anyone, regardless of which direction GitHub chooses to go with the /trending page

How it Works 🔨

This project has two main components:

  • The data
  • The website

The Data 📊

All data which is used to generate the trending data is from gharchive which is an open source project to collect a history of all GitHub events.

A GitHub Action cron runs once an hour to collect all data from the previous hour from gharchive and stores that data in an Azure Storage Table. The cron stores the timestamp of when the "star event" took place, the name of the repo, and the name of the user who starred the repo.

From here, the second phase of the Action workflow kicks off which aggregates all the events from the database in time slices (1 day, 1 week, and 1 month). This data is then enriched with repository and contributor information from GitHub's API.

Once we have enriched data, it is sent to an S3 bucket in JSON format and those files are served by Cloudflare's CDN all around the world

The Website 🌐

Wow the website looks just like GitHub! Is it GitHub?

Even though the website looks very similar to GitHub, it is not GitHub at all! In fact, GitHub open sourced their entire CSS design system called Primer. They have also been releasing React componets for Primer as well and that is exactly what this website is built with!

In short, this website is a React app that uses Primer components and the data from the data pipeline to generate the trending page.

Contributing 🤝

All and any contributions are welcome! If you have an idea, open an issue. If you want to contribute code, open a PR!

Development Setup 🔨

To get started, all you will need is node and npm installed to start the React app locally:

npm i
npm run prebuild
npm run start

A local instance of the website will be running at localhost:3000


It should be noted that I have not included instructions on how to contribute to the "data/backend" portion of this project. That is because it is mostly a "set-and-forget" situation. The GitHub Action cron(s) will always run in the background and Azure Table Storage will just exist. There really shouldn't ever be a reason to modify the data pipeline ™️

However, if you are interested in contributing to the data pipeline, please open an issue and I will be happy to help you get started!

Open Source ❤️

This project is open source and is licensed under the MIT License. The goal of this project was to only use open source components and make it run as cheap as possible. The only paid component of this project to date is the domain name.

ghtrending's People

Contributors

dependabot[bot] avatar grantbirki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

loilock

ghtrending's Issues

How do I get up and running to start contributing

Hey there,

Thanks for creating this project. I'm interested in helping where I can!

Can you tell me how do i get everything up and running locally and where do I store the data etc.

Many thanks

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.