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

lucky-money-event

v2.0.38

Published

Lucky Money event

Readme

Lucky Money Game

Một trò chơi "Cơn Mưa Lì Xì" được xây dựng bằng React + TypeScript + PixiJS, cho phép người chơi click vào các bao lì xì rơi từ trên xuống để nhận phần thưởng.

Tính năng chính

  • 🎮 Gameplay tương tác với click chuột
  • 🎁 Hệ thống phần thưởng với API xác nhận
  • 🎨 Hiệu ứng đồng xu nổ khi click
  • 📱 Responsive design cho mobile và desktop
  • 🏆 Bảng xếp hạng top người chơi
  • ⏱️ Countdown timer cho game

node v21.7.3

Cài đặt

# cập nhật bảng mới nhất
lucky-money-event@latest

# cài đặt
npm i lucky-money-event
yarn add lucky-money-event

Sử dụng cơ bản

1. Import component

import { LuckyMoneyEvent } from "lucky-money-event";

function App() {
  return (
    <LuckyMoneyEvent 
        appId="your-app-id"       // appId game
        authCode="your-auth-code" // authcode xacs thực
        debug={false}             // test debug dữ liệu trả về popup
    />
  );
}

2. Props cần thiết

  • appId: ID ứng dụng để xác thực API
  • authCode: Mã xác thực để gọi API
  • debug: Bật/tắt chế độ debug (optional, default: false)

3. Cách hoạt động

  1. Khởi tạo game: Component sẽ tự động load tài nguyên và bắt đầu game
  2. Click lì xì: Người chơi click vào bao lì xì rơi xuống
  3. Xác nhận phần thưởng: Hệ thống gọi API để xác nhận phần thưởng
  4. Kết thúc game: Sau khi hết thời gian, hiển thị modal kết quả và bảng xếp hạng

Cấu trúc thư mục

src/
├── game/
│   ├── animations/          # Animation chính của game
│   ├── components/          # UI components
│   ├── hooks/              # Custom hooks
│   ├── apis/               # API calls
│   ├── config/             # Cấu hình game
│   └── types/              # TypeScript types
├── context/                 # React context
├── services/                # API services
└── styles/                  # CSS styles

Dependencies chính

  • React 18+ - UI framework
  • TypeScript - Type safety
  • PixiJS - 2D rendering engine
  • GSAP - Animation library
  • Vite - Build tool

API Endpoints

Game sử dụng các API sau:

  • confirmReceiveReward - Xác nhận nhận phần thưởng
  • getTopRankingResults - Lấy bảng xếp hạng

Tùy chỉnh

Thay đổi cấu hình game

Troubleshooting

Lỗi thường gặp

  1. Game không load: Kiểm tra appIdauthCode có đúng không
  2. API lỗi: Kiểm tra network và authentication

3.1. network - đăng kí nhận thưởng lỗi: đứng game ở phần cowndown 3.2. network - nhận thưởng: Không ảnh hưởng đến game

License

MIT License - xem file LICENSE để biết thêm chi tiết.