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

rhythm-captcha

v0.0.8

Published

Audio-Captcha is a React component that provides an audio-based captcha to verify user interaction. Users must tap along with a rhythm played by the component to prove they are human. This solution is designed to be more engaging and effective against aut

Downloads

29

Readme

Audio-Captcha

Overview

Audio-Captcha is a React component that provides an audio-based captcha to verify user interaction. Users must tap along with a rhythm played by the component to prove they are human. This solution is designed to be more engaging and effective against automated bots.

Features

  • Plays a randomly generated rhythm pattern.
  • Records user taps and validates them against the generated pattern.
  • Provides visual feedback on verification success or failure.
  • Easy to integrate into any React application.

Installation

To use the RhythmCaptcha component, ensure you have the following dependencies installed: bash npm install tone lucide-react zustand

Usage

Import the RhythmCaptcha component into your React application and include it in your JSX.

import React from 'react';
import RhythmCaptcha from './components/RhythmCaptcha';

function App() {
return (
    <div className="App">
        <h1>Audio Captcha Example</h1>
        <RhythmCaptcha />
    </div>
);
}       
export default App;

Props

The RhythmCaptcha component does not accept any props.

State Management

The component manages its own state internally using React's useState and useEffect hooks.

Internal State

  • isPlaying: Boolean indicating if the rhythm is currently playing.
  • taps: Array of user taps recorded during the interaction.
  • pattern: Array of intervals representing the generated rhythm pattern.
  • isVerifying: Boolean indicating if the verification process is ongoing.
  • isPassed: Boolean or null indicating if the user passed the verification.

User Interaction

  • Play Pattern: Users can click the "Play Pattern" button to hear the rhythm.
  • Tap: Users can tap the designated area or press the spacebar to record their taps.
  • Verify: After tapping, users can click the "Verify" button to check if their rhythm matches the generated pattern.

Feedback

The component provides visual feedback based on the verification result:

  • Displays "Verification Successful" or "Verification Failed" based on user input.

Accessibility

Ensure that the component is accessible to all users, including those using assistive technologies. Consider adding ARIA roles and properties as needed.

License

This component is open-source and can be used freely in your projects. Please provide attribution if used in public applications.

Future Enhancements

  • Consider adding difficulty levels for the rhythm patterns.
  • Implement analytics to track user interactions and improve the captcha.
  • Explore additional audio feedback options for user taps.

Contributing

Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.

Contact

For any questions or feedback, please reach out to [email protected].