GithubHelp home page GithubHelp logo

isabella232 / nuget-trends Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotnet/nuget-trends

0.0 0.0 0.0 2.84 MB

Check out NuGet packages adoption and what's trending on NuGet.

Home Page: https://nugettrends.com

License: MIT License

C# 50.50% JavaScript 0.51% TypeScript 38.01% HTML 4.18% Shell 0.81% SCSS 5.91% Dockerfile 0.10%

nuget-trends's Introduction


NuGet Trends Gitter chat Twitter Follow

Nuget Trends Web Codecov Scheduler

Summary

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.

Docker

Images published at: https://hub.docker.com/u/nugettrends

Developing

We want to get a script to bootstrap the development environment but it's not here yet. That means now you'll need to:

  1. Run docker-compose up to get the services.

And either:

  1. Restore a DB backup to get some data, like the packages and some download number.

Or:

  1. Run Entity Framework migrations to get the database schema in place.
  2. Run the catalog importer from scratch.
  3. Run the daily download importer for a few days to get some data in.

Requirements

  • .NET SDK 5
  • Docker, Compose (for the dependencies, postgres, rabbitmq)
  • Node.js 15.0.1 (might also work with higher versions)
  • Yarn (We use Yarn instead of npm)

Run the jobs

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 http://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.

Website

The website is composed by two parts: An Angular SPA and an ASP.NET Core API. The API is at the root of src/NuGetTrends.Web/ and the SPA is in the Portal sub-folder.

To run it localy:

SPA (src/NuGetTrends.Web/Portal)

  1. Install the SPA dependencies: yarn install (only the first time)
  2. Run the SPA: ng serve

API (src/NuGetTrends.Web) 2. Run the API with dotnet run

The app can be browsed at:

  • http://localhost:5000
  • https://localhost:5001
  • http://localhost:4200 (default ng serve port)

Note: You might need to see how to install/trust the ASP.NET Core HTTPS development certificates (not required but nice to have)

Database backup for contributors

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.

Note to .NET SDK version and global.json

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.

.NET Foundation

This project is supported by the .NET Foundation.

Acknowledgments

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

Links

nuget-trends's People

Contributors

bruno-garcia avatar dependabot[bot] avatar frosch95 avatar joaopgrassi avatar terrajobst avatar tyrrrz avatar victoriadoiron 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.