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

@antontranelis/money-printer

v1.8.0

Published

Create personalized time vouchers that look like real currency. React components for voucher generation with PDF export.

Readme

Money Printer

Create personalized time vouchers that look like real currency. Design your own "Zeitgutscheine" (time vouchers) with custom portraits, names, and descriptions - perfect as unique gifts.

Live Demo

Features

  • Custom Portrait: Upload your photo with zoom and pan controls
  • Background Removal: AI-powered background removal with adjustable opacity and blur
  • Sepia Effect: Local vintage currency engraving effect (no API required)
  • Personalization: Add your name, email, and phone number
  • Multiple Denominations: Choose between 1, 5, or 10 hour vouchers
  • Bilingual: Full support for German and English (auto-detects browser language)
  • High-Quality Export: Download as print-ready PDF (A4 landscape)
  • Responsive: Works on desktop and mobile with touch support

Installation

npm install @antontranelis/money-printer

Usage

As a React Component

import { MoneyPrinter } from '@antontranelis/money-printer';

function App() {
  return <MoneyPrinter />;
}

Individual Components

import {
  BillForm,
  BillPreview,
  ExportButton,
  PortraitUpload,
  useBillStore
} from '@antontranelis/money-printer';

function CustomEditor() {
  const portrait = useBillStore((state) => state.portrait);

  return (
    <div>
      <PortraitUpload />
      <BillPreview />
      <ExportButton />
    </div>
  );
}

Services

import {
  // PDF Generation
  generateBillPDF,
  exportBillAsPDF,

  // Canvas Rendering
  renderFrontSide,
  renderBackSide,

  // Template Composition
  composeTemplate,
  composeTemplateFullRes,
  getTemplateLayers,
  preloadBaseImages,
  TEMPLATE_WIDTH,
  TEMPLATE_HEIGHT,
  PREVIEW_WIDTH,
  PREVIEW_HEIGHT,

  // Image Effects (local, no API)
  applyEngravingEffect,
  resizeImage,
  compositeWithBackground,
  clearImageCache,

  // AI Enhancement (requires API key)
  removeBackground,
  setApiKey,
  hasApiKey,
} from '@antontranelis/money-printer';

Portrait Controls

Zoom & Pan

  • Zoom Slider: Adjust portrait size from 50% to 200%
  • Pan/Drag: When zoomed in, drag the portrait to reposition (mouse & touch supported)
  • Works in both the avatar preview and the bill preview canvas

Background Removal

  1. Toggle "Remove background" (requires Stability AI API key)
  2. Adjust Background Opacity (0-100%) to blend original background
  3. Adjust Blur (0-100%) for depth-of-field effect

Sepia Effect

  • Local processing, no API required
  • Adjustable intensity (0-100%)
  • Applies vintage currency engraving look

AI Features (Optional)

Background removal uses Stability AI. To enable:

  1. Get an API key from Stability AI
  2. Click "Remove background" toggle in the app
  3. Enter your API key when prompted

The sepia/engraving effect runs locally and doesn't require an API key.

Tech Stack

  • React 18/19 - UI Framework
  • TypeScript - Type Safety
  • Zustand - State Management with persistence
  • jsPDF - PDF Generation
  • Canvas API - Image Processing & Template Compositing

Templates

Templates are dynamically composed at runtime from layered assets:

  • Background: Base template background (3633x1920px @ 600 DPI)
  • Badges: Hour denomination badges (1, 5, 10) positioned in corners
  • Frame: Ornamental frame overlay
  • Banner Text: Arc-curved text rendered on canvas

Both German and English use the same base templates with localized text.

Development

# Clone the repository
git clone https://github.com/antontranelis/money-printer.git
cd money-printer

# Install dependencies
npm install

# Start development server
npm run dev

# Build library
npm run build:lib

# Build standalone app
npm run build

Performance Optimizations

The image processing is optimized for smooth performance:

  • Layer Caching: Composed templates are cached as data URLs
  • Image Caching: Avoids reloading the same images
  • Uint32Array: Fast pixel manipulation for effects
  • Reusable Canvas: Reduces garbage collection pressure
  • Debounced Updates: Slider changes are debounced to prevent lag
  • Preview Scale: Lower resolution previews (50% scale) for faster rendering

License

MIT License - see LICENSE for details.