NuGet Trends holds historical data of NuGet packages download numbers. It's a useful tool for package maintainers to see the download rate of their packages and also for people interested in packages popularity over time. The database has the complete nuget.org catalog which include target framework information. That means that there's a lot more features we can add, like TFM adoption overtime, dependency graphs etc.
We want to get a script to bootstrap the development environment but it's not here yet. That means now you'll need to:
- Run
docker-compose up
to get the services.
And either:
- Restore a DB backup to get some data, like the packages and some download number.
Or:
- Run Entity Framework migrations to get the database schema in place.
- Run the catalog importer from scratch.
- Run the daily download importer for a few days to get some data in.
Background jobs are done using Hangfire. It lives in the
NuGetTrends.Scheduler project. Once you run it (i.e: dotnet run
) its dashboard will be made available through https://localhost:5003/.
The jobs are scheduled to run at an interval. You can browse the dashboard and trigger the jobs on demand though.
One of the jobs is to download the NuGet's catalog. The second is to hit the nuget.org's API and get the current number of downloads for each package and store in the database.
The website is composed by two parts, the single page application and the REST web API.
The SPA can be build using yarn
and it's under src\NuGetTrends.Spa
The API can be run with dotnet run
and it's under src\NuGetTrends.Api
We host a DB backup with the latest month's download counts. This will help you see some data on and fill the charts when developing. The backup can be grabbed here: https://contrib.nugettrends.com/nuget-trends-contrib.dump and is a compressed postgres database.
You can pull the repo and run docker-compose up
at the root of the project to get the required services.
That will give you an empty postgres database though.
We lock the .NET SDK version via global.json
to have a reference version and avoid surprises during CI.
If you don't have that exact version, usually anything with that major works just fine.
If you just want to quickly build, try just deleting global.json
.
This project is supported by the .NET Foundation.
- Sentry.io for supporting open source projects like this free of charge.
- Logz.io for offering a free tier.
- JetBrains for providing free licenses for core contributors.
- Project announcement on reddit.