A beautiful package download statistics viewer for npm and PyPI packages built with Next.js, shadcn/ui, Tailwind CSS, and Framer Motion. View download statistics for any npm or PyPI package with interactive charts and detailed package information.
- π Dual Package Manager Support - Switch between npm and PyPI packages
- π Search Packages - Search for any npm or PyPI package by name
- π Interactive Charts - Visualize download statistics with beautiful charts
- π Custom Date Ranges - View stats for 7 days, 30 days, 90 days, 1 year, or custom dates (npm)
- π Multiple Views - Switch between Daily, Weekly, Monthly, and Yearly chart views (npm) or Day/Week/Month (PyPI)
- π€ Author Information - View package author details and maintainers
- π README Display - Full markdown README rendering with syntax highlighting
- π Dark/Light Theme - Toggle between dark and light themes
- β¨ Smooth Animations - Beautiful Framer Motion animations throughout
- π± Responsive Design - Works perfectly on desktop, tablet, and mobile devices
Visit the live application: https://npm-package-download-stat.vercel.app
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI components
- Framer Motion - Smooth animations
- Recharts - Interactive chart library
- React Markdown - Markdown rendering
- npm Public API - npm package download data
- PyPI Stats API - PyPI package download statistics
- Node.js 18+
- npm or yarn or pnpm
git clone https://github.com/gautammanak1/npm-package-download-stat.git
cd npm-package-download-statnpm install
# or
yarn install
# or
pnpm installnpm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 in your browser.
npm run build
npm start
# or
yarn build
yarn startThis project uses CI/CD pipeline only for deployments. Vercel automatic builds are disabled.
- Go to Vercel Dashboard
- Click "Add New Project"
- Import your GitHub repository:
gautammanak1/npm-package-download-stat - Vercel will auto-detect Next.js settings
- Click "Deploy" (this will do initial deployment)
Important: After initial deployment, disable automatic builds:
- Go to your project in Vercel Dashboard
- Navigate to Settings > Git
- Under "Production Branch", find "Automatic deployments"
- Disable automatic deployments by toggling it off
- Or go to Settings > Git > Deploy Hooks and disable automatic deployments
Alternative Method:
- Go to Settings > Git
- Scroll to "Deploy Hooks"
- Disable automatic deployments for
mainbranch
-
Get Vercel credentials:
- Vercel Token: Vercel Settings > Tokens
- Organization ID: Vercel Settings > General (Team ID)
- Project ID: Project Settings > General (Project ID)
-
Add GitHub Secrets:
- Go to repository Settings > Secrets and variables > Actions
- Add:
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID
- Repository Settings > Actions > General
- Under "Workflow permissions":
- β Read and write permissions
- β Allow GitHub Actions to create and approve pull requests
The project uses GitHub Actions for all deployments:
- On Push to Main: Automatically deploys to Vercel production via CI/CD
- On Pull Request: Creates preview deployment via CI/CD
- Build Status: Shows build status in GitHub Actions
Note: All deployments now happen through CI/CD only. Vercel won't auto-build on git push.
No environment variables are required for this project as it uses public npm APIs.
- Select npm: Click the "npm" button in the header
- Search Package: Enter an npm package name (e.g.,
react,lodash,express) - View Statistics: Click "Search" or press Enter to view download statistics
- Explore Charts: Switch between Daily, Weekly, Monthly, and Yearly views using tabs
- Custom Date Range: Use quick buttons (7 days, 30 days, etc.) or select custom dates
- View Details: Check author information, maintainers, and README
- Select PyPI: Click the "PyPI" button in the header
- Search Package: Enter a PyPI package name (e.g.,
requests,numpy,pandas) - View Statistics: Click "Search" or press Enter to view download statistics
- Explore Charts: Switch between Day, Week, and Month views using period buttons
- View Details: Check author information, homepage, and package description
This project uses public APIs for both package managers:
- Download Statistics:
https://api.npmjs.org/downloads/range/{start}:{end}/{package} - Package Info:
https://registry.npmjs.org/{package}
- Download Statistics:
https://pypistats.org/api/packages/{package}/recent - Overall Downloads:
https://pypistats.org/api/packages/{package}/overall - Package Info:
https://pypi.org/pypi/{package}/json
No API keys required - all endpoints are public.
npm-package-download-stat/
βββ app/
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Main page
βββ components/
β βββ ui/ # shadcn/ui components
β βββ author-info.tsx # Author information component
β βββ download-chart.tsx # Chart component
β βββ readme-viewer.tsx # README viewer component
β βββ theme-provider.tsx # Theme context provider
β βββ theme-toggle.tsx # Theme toggle button
βββ lib/
β βββ npm-api.ts # npm API integration
β βββ utils.ts # Utility functions
βββ .github/
β βββ workflows/
β βββ vercel.yml # CI/CD pipeline
βββ vercel.json # Vercel configuration
βββ README.md # This file
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Gautam Manak
- Website: https://gautammanak.vercel.app
- GitHub: @gautammanak1
Made with β€οΈ by Gautam Manak