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

@rueda.dev/gems-topaz

v1.0.2

Published

Topaz - High-Volatility Ingestion & Refining Unit by Rueda Gems

Readme

@rueda.dev/gems-topaz


What is Topaz?

Topaz is an enterprise-grade webhook ingestion and event streaming system designed for fault tolerance. It acts as an orbital refinery station — receives volatile, raw materials (webhooks, CSV dumps) from external sources, stabilizes them through validation and transformation, and queues them for safe delivery.

Your events should never be lost, even in catastrophic failures.

Quick Start

npx "@rueda.dev/gems-topaz" my-project
cd my-project
cp .env.example .env
docker-compose up -d
npm run db:migrate
npm run prisma:generate
npm run dev

Your API is now running at http://localhost:3000

Dependencies are installed automatically during scaffolding.

Why Topaz?

| Traditional Webhook Handlers | Topaz Approach | | ---------------------------- | ------------------------------------------ | | Return 202 before persisting | Return 202 only after PostgreSQL write | | Lose events on Redis crash | Write-Ahead Log guarantees durability | | Silent failures | Schema validation with drift detection | | Manual replay only | Automated replay with filtering | | Single target delivery | Fan-out to multiple targets | | Hardcoded transformations | Declarative field mapping |

What's Included

| Feature | Description | | -------------------------- | ------------------------------------------------------- | | Write-Ahead Log | Zero data loss — events persisted before queuing | | Schema Validation | JSON Schema validation with drift detection | | Event Replay | Automated replay with source, status, and date filters | | Routing & Fan-out | Deliver events to multiple targets with retry policies | | Declarative Transforms | Field mapping without writing code | | Deduplication | Configurable dedup window per source | | Source Management | HMAC signature verification, rate limiting | | Alert Rules | Webhook notifications for error rate, latency, DLQ size | | Batch Processing | Streaming CSV ingestion with chunked processing | | Real-time Dashboard | React + Tremor monitoring UI |

Architecture

Topaz follows Clean Architecture and Domain-Driven Design:

┌──────────────────────────────────────────────────────┐
│                   Interface Layer                    │
│   HTTP API (Fastify)  │  Dashboard (React)  │ Workers│
├──────────────────────────────────────────────────────┤
│                  Application Layer                   │
│   IngestWebhook  │  ValidatePayload  │  ResolveRoutes│
│   ExecuteReplay  │  ApplyTransform   │  Reconcile    │
├──────────────────────────────────────────────────────┤
│                    Domain Layer                      │
│   Event  │  Route  │  Delivery  │  Source  │  Schema │
├──────────────────────────────────────────────────────┤
│                Infrastructure Layer                  │
│   PostgreSQL (WAL)  │  Redis (BullMQ)  │  Awilix DI  │
└──────────────────────────────────────────────────────┘

Project Structure

src/
├── domain/              # Pure business logic (no framework deps)
│   └── ingestion/
│       ├── application/ # Use cases & repository interfaces
│       └── enterprise/  # Entities & value objects
├── infra/               # External implementations
│   ├── config/          # Environment, logger, Redis, database
│   ├── di/              # Awilix dependency injection container
│   ├── jobs/            # Recovery, reconciliation, alert jobs
│   ├── persistence/     # PostgreSQL repositories
│   ├── queue/           # BullMQ producers & consumers
│   └── reconcilers/     # External API reconciliation
├── interface/
│   ├── http/            # Fastify server, routes, controllers
│   └── workers/         # Background worker entry point
dashboard/               # React + Tremor monitoring UI
prisma/                  # Database schema & migrations

API Endpoints

Core

| Method | Endpoint | Description | | ------ | ------------------- | ---------------- | | POST | /webhooks/:source | Ingest webhook | | POST | /:source/batch | Batch CSV upload | | GET | /health | Health check |

Configuration

| Resource | Endpoints | Operations | | -------------- | ------------- | ------------------------------------------- | | Sources | /sources | Register, list, update webhook sources | | Schemas | /schemas | Define JSON Schema per event type | | Routes | /routes | Configure delivery targets & retry policies | | Transforms | /transforms | Declarative field mapping rules | | Alerts | /alerts | Metric-based alert rules |

Operations

| Resource | Endpoints | Operations | | ----------- | ---------- | ----------------------------------- | | Replay | /replay | Preview, execute, track replays | | DLQ | /dlq | View & manage dead letter events | | Metrics | /metrics | Throughput, latency, errors, queues |

Available Commands

# Development
npm run dev              # API server with hot reload
npm run dev:worker       # Background workers with hot reload
npm run dashboard:dev    # Dashboard dev server on :5173

# Database
npm run db:migrate       # Run Prisma migrations
npm run db:studio        # Visual database editor
npm run prisma:generate  # Generate Prisma client

# Production
npm run build            # Compile TypeScript
npm run start            # Start production server
npm run start:worker     # Start production workers
npm run dashboard:build  # Build dashboard
npm run dashboard:serve  # Serve dashboard on :3001

# Quality
npm run lint             # Format with Biome
npm run typecheck        # Type checking
npm run test:load        # Load testing

Performance

  • Micro-batching: 50ms buffer window, up to 500 events per flush
  • Throughput: ~50,000 events/second sustained
  • Memory: O(1) for batch processing (streaming CSV)
  • Latency: p99 < 100ms for webhook acknowledgment

Learn More

See the full documentation at the Topaz GitHub repository.

License

MIT - Rueda Gems by Rafael Rueda