A backend application for discovering popular repositories on GitHub.
This highly scalable and performant application serves list of GitHub repos sorted by number of stars.
Response times: ~100ms
@heroku free dyno deployment at any time.
-
Service can return the most popular repositories created from specific time points onwards:
- all time (default)
- a day ago
- a week ago
- a month ago
- a year ago
-
CronService periodically makes Github API calls and refreshes list of popular repos.
- MasterElector makes sure that only one instance of workers doing the cron jobs.
-
ReposCache caches API responses to Redis (with persistence).
-
/repos
endpoint serves already cached results.- query paramaters:
- created=day|week|month|year|allTime
- limit=10|50|100
- language="string"
- example:
https://pop-repos.herokuapp.com/repos?language=python&created=year&limit=50
- query paramaters:
Online Demo -> https://pop-repos.herokuapp.com/
docker-compose -f local.yml build
docker-compose -f local.yml up
yarn test
yarn test:watch
yarn build