Ivy Insights is a comprehensive web application for visualizing and analyzing NuGet package statistics. It displays real-time data about package versions, downloads, releases, and trends with interactive charts, animated metrics, and detailed analytics. Built specifically for monitoring the Ivy framework package, but can be easily adapted for any NuGet package.
Click the badge above to open Ivy Examples repository in GitHub Codespaces with:
- .NET 10.0 SDK pre-installed
- Ready-to-run development environment
- No local setup required
- Real-Time NuGet Statistics - Automatic data fetching from NuGet API v3
- Daily Download Tracking - PostgreSQL database integration for tracking daily download statistics
- GitHub Actions Integration - Automated daily data collection via GitHub Actions workflow
- Interactive Dashboard with multiple visualization panels:
- KPI Cards - Total downloads, total versions, latest version, and most popular version with animated count-up effects
- Top Popular Versions - Bar chart showing top 3 most downloaded versions
- Daily Downloads (Last 30 Days) - Line chart showing daily download growth with average trend line
- Daily Download Statistics Table - Detailed table with daily download counts and growth
- Releases vs Pre-releases - Pie chart showing distribution of release types
- Recent Versions Distribution - Filterable bar chart showing versions with most downloads:
- Date range filtering (from/to dates)
- Pre-release toggle (include/exclude pre-releases)
- Configurable count (2-20 versions)
- Version Releases Over Time - Timeline chart showing release frequency by month
- All Versions Table - Complete searchable, sortable, and filterable table with all package versions
- Smart Caching - 15-minute cache for NuGet API responses, 5-minute cache for database queries
- Automatic Data Refresh - Background revalidation keeps data fresh
- Animated Metrics - Smooth count-up animations for download and version numbers
- Responsive Design - Clean, modern UI with optimized layouts
- Error Handling - Graceful error states with retry functionality
- Loading States - Skeleton loaders during data fetching
- .NET 10.0 SDK or later
- Ivy Framework - This project uses local project references to Ivy Framework
- Ensure you have the Ivy Framework cloned locally at:
C:\git\Ivy-Interactive\Ivy-Framework
- Ensure you have the Ivy Framework cloned locally at:
- PostgreSQL Database (optional, for daily download tracking)
cd project-demos/ivy-insightsdotnet restoreIf you want to use daily download tracking, you need to set up a PostgreSQL database connection using secrets.
dotnet user-secrets set "DB_CONNECTION_STRING" "Host=hostname;Port=5432;Database=dbname;Username=user;Password=pass"dotnet watchNavigate to the URL shown in the terminal (typically http://localhost:5010/ivy-insights)
- Data Fetching: The app fetches data from multiple sources:
- NuGet API v3: Package registration data (all versions with published dates), package search API (download statistics per version)
- PostgreSQL Database: Daily download statistics stored by GitHub Actions workflow
- Data Processing: Statistics are calculated and aggregated:
- Total downloads across all versions (from NuGet API)
- Daily download growth (from database)
- Monthly download trends (from database daily data)
- Version popularity rankings
- Release vs pre-release distribution
- Growth metrics (current month vs average)
- Caching: Data is cached to optimize performance:
- NuGet API: 15-minute cache
- Database queries: 5-minute cache
- Server-side caching shared across all users
- Display: Results are shown in an interactive dashboard with:
- Animated number count-ups
- Interactive charts with filtering
- Real-time data updates
- Responsive layouts
The application works with a GitHub Actions workflow (.github/workflows/update-remote-postgres.yml) that:
- Runs daily at midnight UTC
- Fetches current download count from NuGet API
- Stores data in PostgreSQL database
- Supports manual runs with custom dates for historical data simulation
IvyInsights/
├── Apps/
│ └── NuGetStatsApp.cs # Main application with dashboard
├── Models/
│ └── Models.cs # Data models (PackageStatistics, VersionInfo, DailyDownloadStats, etc.)
├── Services/
│ ├── INuGetStatisticsProvider.cs
│ ├── NuGetApiClient.cs # NuGet API v3 client
│ ├── NuGetStatisticsProvider.cs # Statistics aggregation service
│ ├── IDatabaseService.cs # Database service interface
│ └── DatabaseService.cs # PostgreSQL database service for daily statistics
├── Program.cs # Application entry point
└── GlobalUsings.cs # Global using directives
- Ivy Framework - UI framework for building interactive applications
- Ivy.Charts - Bar charts, line charts, and pie charts for data visualization
- NuGet API v3 - Package registration and search APIs
- PostgreSQL - Database for storing daily download statistics
- Npgsql - .NET PostgreSQL data provider
- UseQuery Hook - Automatic data fetching, caching, and state management
- JobScheduler - Coordinated animations for number count-ups
- .NET 10.0 - Runtime platform
- HttpClient - API communication with compression support
- GitHub Actions - Automated daily data collection
- Date Range Filtering: Filter versions by publication date
- Pre-release Toggle: Include or exclude pre-release versions
- Download Filtering: Only show versions with download data
- Configurable Count: Display 2-20 most downloaded versions
- Server-Side Caching: 15-minute TTL shared across all users
- Request Deduplication: Multiple components requesting same data = single request
- Stale-While-Revalidate: Shows cached data immediately while fetching fresh data
- HTTP Compression: Gzip/deflate support for API responses
- Efficient API Usage: Combines multiple API endpoints for complete data
- Multiple Data Sources: Combines registration API and search API for complete statistics
- Fallback Mechanisms: Handles missing download data gracefully
- Version Normalization: Ensures consistent version matching across APIs
The NuGet API is public and doesn't require authentication, but has rate limits. The app optimizes API usage by:
- Caching responses for 15 minutes
- Combining multiple API calls efficiently
- Using compression to reduce bandwidth
- Sharing cache across all users
To monitor a different NuGet package, change the PackageId constant in NuGetStatsApp.cs:
private const string PackageId = "YourPackageName";Deploy this application to Ivy's hosting platform:
cd project-demos/ivy-insights
ivy deploy- Ivy Framework: github.com/Ivy-Interactive/Ivy-Framework
- Ivy Documentation: docs.ivy.app
- NuGet API Documentation: learn.microsoft.com/nuget/api
NuGet, Statistics, Analytics, Data Visualization, Dashboard, Ivy Framework, C#, .NET, Package Management, Metrics