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

codeforces-stats-card

v1.8.2

Published

A self-contained React card that shows a Codeforces user's total solved problems and their contest-rating history graph. Just pass a handle.

Readme

codeforces-stats-card

A self-contained React card that displays a Codeforces user's problem-solving stats and contest-rating history. Just pass a handle — it fetches everything from the public Codeforces API and ships its own styles, so there's nothing else to wire up.

Features

  • 🔢 Attempted / solved / acceptance counts from the user's submissions
  • 📊 Solved-by-rating distribution — five numeric ranges (aligned to Codeforces rank thresholds) that automatically center on the user's current rating, with unbounded < X and X+ ends so every solved problem is counted
  • 🎖️ Current & max rating with the rank name colored by its Codeforces tier
  • 📈 Contest-rating graph with rating-tier color bands, a per-contest marker for every competition, and a hover tooltip showing the contest name, rank, rating change, and date
  • 🎨 Zero CSS imports — styles self-inject once into <head>
  • 📦 No runtime dependencies beyond React (peer dependency)

Install

From npm:

npm install codeforces-stats-card
# or
bun add codeforces-stats-card

Or straight from GitHub (no npm account needed):

bun add github:Ryan-Westfall/codeforces-stats-card
# or
npm install github:Ryan-Westfall/codeforces-stats-card

React 17+ is a peer dependency.

Usage

import { CodeforcesCard } from 'codeforces-stats-card';

export default function App() {
  return <CodeforcesCard handle="Ryan-Westfall" />;
}

That's it. The card fetches the user's info, rating history, and submissions, then renders the stats and rating graph. It's designed to fill its container, so give it a sized wrapper (e.g. a grid/flex cell) to control its footprint.

Props

| Prop | Type | Default | Description | | ---------------- | -------------------- | -------------- | ------------------------------------------------------------------------ | | handle | string | (required) | The Codeforces handle to display. | | title | string | 'Codeforces' | Card heading text. | | showRank | boolean | true | Show the rank name next to the current rating. | | maxSubmissions | number | 10000 | How many recent submissions to scan when counting distinct solved problems. | | className | string | '' | Extra class names for the root element. | | style | React.CSSProperties| — | Inline styles for the root element. |

Styling

Styles are injected once into <head> under #cfsc-styles. Everything is scoped to the .cfsc-* class namespace. You can override the look via CSS variables on .cfsc-card, e.g.:

.cfsc-card {
  --cfsc-line: #e43e3e;   /* rating line + area color */
  --cfsc-bg: #fbfbfb;
}

Data source

All data comes from the public Codeforces API: user.info, user.rating, and user.status. No API key required. The Codeforces API sends permissive CORS headers, so this works from the browser.

License

MIT © Ryan Westfall