npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gh-showcase

v1.0.1

Published

A beautiful React component to showcase GitHub profiles with merged PRs, contribution graphs, and portfolio-style UI

Readme

gh-showcase

npm version GitHub

  • A beautiful React component to showcase GitHub profiles with bio, contribution graphs, categorized pull requests, dark mode support, and other stats—perfect for portfolios and documentation sites.
  • Help recruiters discover your best work effortlessly—no need for them to dig through your GitHub profile, and no worries about whether they'll find your most impressive contributions.

📦 Installation

npm install gh-showcase

🚀 Usage

import { Showcase } from 'gh-showcase';
import 'gh-showcase/style.css';

function App() {
  return <Showcase username="your-github-username" />;
}

✨ Features

  • Profile Card - Avatar, name, bio, and GitHub stats
  • PR Breakdown - Categorized merged PRs (Frontend, Docs, Fix, Feature, Other)
  • Contribution Graph - GitHub activity visualization
  • Theme Toggle - Dark/light mode with smooth transitions
  • Responsive Design - Works on all screen sizes
  • TypeScript Support - Fully typed

🖼️ Showcase

See how gh-showcase looks in a real portfolio:

🔗 Links


🛠️ Technical Implementation

Custom Hooks

useGitHubProfile(username: string)

  • Fetches user profile from GitHub API
  • Returns: { user, loading, error }
  • Handles empty username and HTTP errors
  • TypeScript interface: GitHubUser

useGitHubPRs(username: string)

  • Fetches up to 100 PRs using GitHub Search API
  • Classifies each PR using keyword matching
  • Returns: { totalPRs, breakdown, categorizedPRs, loading, error }
  • TypeScript interfaces: PRBreakdown, CategorizedPRs, GitHubPR

Components

Showcase

  • Props: username (required), theme (optional, defaults to 'light')
  • Displays complete GitHub profile card
  • Integrates PR breakdown visualization
  • Responsive design with CSS modules

PRBreakdown

  • Props: username (required)
  • Interactive accordion interface
  • Color-coded categories (Blue, Yellow, Red, Green, Gray)
  • Scrollable PR lists with max-height constraint
  • Hover effects on PR cards

📊 How It Works

  1. Profile Fetch: Component fetches user data from https://api.github.com/users/{username}
  2. PR Search: Simultaneously fetches PRs from https://api.github.com/search/issues?q=author:{username}+type:pr&per_page=100
  3. Classification: Each PR's title and body are analyzed using regex patterns
  4. Visualization:
    • Progress bar shows percentage distribution
    • Accordion shows detailed PR list per category
  5. Interaction: Click any category to expand and view all PRs, click PR cards to open on GitHub

🔧 Technologies Used

  • React 18 with TypeScript
  • Vite for fast development and building
  • CSS Modules for component-scoped styling
  • GitHub REST API for data fetching
  • ES6+ Features: Hooks, async/await, fetch API

📝 Development Timeline

Session 1: Foundation

  • ✅ Created project structure with lib/ folder inside src/
  • ✅ Built useGitHubProfile hook with TypeScript interfaces
  • ✅ Created test component in App.tsx
  • ✅ Verified data fetching with JSON display

Session 2: UI Components

  • ✅ Built Showcase component with profile card design
  • ✅ Created Showcase.module.css with modern styling
  • ✅ Integrated profile data into visual card layout
  • ✅ Added stats display and profile link button

Session 3: PR Analytics

  • ✅ Built useGitHubPRs hook with classification logic
  • ✅ Created PRBreakdown component with progress bar
  • ✅ Implemented accordion interface for PR categories
  • ✅ Added PR cards with links and metadata
  • ✅ Styled with PRBreakdown.module.css
  • ✅ Integrated PR breakdown into main Showcase card

Session 4: Bug Fixes & Documentation

  • ✅ Fixed syntax errors in useGitHubPRs.ts
  • ✅ Resolved duplicate state declarations
  • ✅ Corrected corrupted code sections
  • ✅ Created comprehensive README documentation

🎯 Current Status

Fully functional library with:

  • ✅ Complete GitHub profile display
  • ✅ Interactive PR categorization and visualization
  • ✅ Accordion-style expandable categories
  • ✅ Direct links to all PRs
  • ✅ Clean, modern UI
  • ✅ TypeScript type safety
  • ✅ Error handling and loading states

🚀 Next Steps (Potential Enhancements)

  • [ ] Implement search/filter within PR lists
  • [ ] Add more PR metadata (status, labels, comments)
  • [ ] Add unit tests
  • [ ] Support for organizations/teams
  • [ ] Caching to reduce API calls
  • [ ] Customizable color schemes

📄 License

MIT License - Feel free to use and modify!


Built with ❤️