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

@rahul_dadhich15/business-tools-toolkit

v0.1.0

Published

Production-ready toolkit for generating business documents, digital business cards, email signatures, invoices, payment links, legal policies, resumes, cover letters, and signature capture.

Readme

@rahul_dadhich15/business-tools-toolkit

A lightweight, production-ready, modular TypeScript toolkit for generating business documents, digital business cards (vCard 3.0 & 4.0), HTML email signatures, invoices with genuine PDF export, PayPal payment links, privacy policies, terms of service drafts, resumes with multi-page PDF export, and canvas signature capture.

CI License: MIT Node: >=18


Table of Contents

  1. Overview
  2. Features
  3. Installation
  4. Quick Start
  5. Core Utilities
  6. TypeScript Interfaces
  7. Validation and Error Handling
  8. Browser and Node Compatibility
  9. Security and Privacy Safeguards
  10. Legal-Document Limitations
  11. PDF Output Limitations
  12. Development Setup
  13. Tests and Coverage
  14. Build and Packaging
  15. Supported Environments
  16. Known Limitations
  17. Contributing
  18. License
  19. Changelog

1. Package Overview

@rahul_dadhich15/business-tools-toolkit provides 9 independent, framework-agnostic utilities designed for backend services, full-stack Node.js servers, and client-side browser applications. It emphasizes standard web APIs, minimal dependencies, strict input validation, and genuine document generation (including standards-compliant vCards and real binary PDFs via pdf-lib).


2. Features

  • Zero Over-engineering: Built with lean standard library helpers and one mature runtime dependency (pdf-lib).
  • Framework Independent: Works seamlessly in Node.js, Next.js, Express, Fastify, Remix, or vanilla browser applications.
  • Strictly Typed: Written in 100% strict TypeScript with declaration maps and full ESM/CommonJS distribution.
  • Real PDF Generation: True vector PDFs with clean typography, automatic pagination, and right-aligned calculations.
  • XSS & Injection Immune: Strictly escapes HTML metacharacters and attributes; sanitizes URLs against dangerous schemes (javascript:, vbscript:, data:).
  • Standards Compliant: RFC 6350 (vCard 4.0) and RFC 2426 (vCard 3.0) compliant with UTF-8 safe line folding.

3. Installation

npm install @rahul_dadhich15/business-tools-toolkit

Or using Yarn / pnpm:

yarn add @rahul_dadhich15/business-tools-toolkit
# or
pnpm add @rahul_dadhich15/business-tools-toolkit

4. Quick Start

import {
  generateCoverLetter,
  calculateInvoiceTotals,
  generateInvoicePdf,
  buildPayPalLink
} from '@rahul_dadhich15/business-tools-toolkit';

// 1. Generate an invoice calculation & PDF
const invoice = {
  invoiceNumber: 'INV-2026-001',
  issueDate: '2026-10-24',
  dueDate: '2026-11-24',
  currency: 'USD',
  seller: { name: 'Acme Cloud Inc.', email: '[email protected]' },
  customer: { name: 'Enterprise Corp' },
  items: [
    { description: 'Cloud Architecture Consulting', quantity: 20, unitPrice: 150 },
    { description: 'Migration Retainer', quantity: 1, unitPrice: 1200, discount: 200 }
  ]
};

const totals = calculateInvoiceTotals(invoice);
console.log(`Total Payable: ${totals.currency} ${totals.total}`);

const pdfBytes = await generateInvoicePdf(invoice);
// pdfBytes is a Uint8Array containing genuine PDF binary data

5. All Nine Utility Modules

1. Cover Letter Generator

Creates structured cover letters strictly tailored from candidate facts. Never hallucinates or fabricates qualifications.

import { generateCoverLetter } from '@rahul_dadhich15/business-tools-toolkit';

const letter = generateCoverLetter({
  candidateName: 'Jane Doe',
  jobTitle: 'Principal Software Engineer',
  companyName: 'Stripe',
  contactInfo: {
    email: '[email protected]',
    phone: '+1 (555) 0199',
    website: 'https://janedoe.dev'
  },
  skills: ['TypeScript', 'Kubernetes', 'High-Throughput Systems'],
  relevantExperience: [
    'Led migration of core transaction pipeline handling $10B+ volume',
    'Reduced p99 database query latency by 42%'
  ],
  tone: 'professional', // 'formal' | 'professional' | 'concise'
  length: 'medium'      // 'short' | 'medium' | 'detailed'
}, { format: 'markdown' });

console.log(letter.content);

2. Digital Business Card & vCard

Generates valid vCard 3.0 / 4.0 contact strings with line folding (RFC 6350) and clean HTML representations.

import { buildDigitalBusinessCard, generateVCard } from '@rahul_dadhich15/business-tools-toolkit';

const contactData = {
  fullName: 'Rahul Dadhich',
  organization: 'Acme Technologies Inc.',
  jobTitle: 'Lead Software Architect',
  email: '[email protected]',
  phone: '+1-555-0100',
  website: 'https://example.com',
  address: {
    street: '123 Market St',
    city: 'San Francisco',
    state: 'CA',
    postalCode: '94105',
    country: 'USA'
  }
};

// Generate shareable card result
const card = buildDigitalBusinessCard(contactData);
console.log(card.vcard);    // vCard 4.0 string with CRLF
console.log(card.html);     // Sanitized HTML card representation
console.log(card.filename); // "Rahul_Dadhich.vcf"

3. Email Signature Generator

Produces client-compatible table-based HTML email signatures with conservative inline CSS and plain-text fallbacks.

import { generateEmailSignature } from '@rahul_dadhich15/business-tools-toolkit';

const signature = generateEmailSignature({
  name: 'Sarah Connor',
  jobTitle: 'Director of Operations',
  company: 'Defense Systems Inc.',
  email: '[email protected]',
  phone: '+1-555-0144',
  website: 'https://defensesystems.example',
  brandColors: {
    primary: '#0284c7',
    secondary: '#475569',
    text: '#0f172a'
  },
  disclaimer: 'CONFIDENTIAL: This transmission is intended solely for the recipient.'
});

console.log(signature.html);
console.log(signature.text);

4. Signature Drawing & Export

Framework-independent capture for touch, mouse, and stylus inputs. Provides headless SVG serialization and browser canvas management.

Headless SVG Serializer (Universal):

import { serializeSignatureSvg } from '@rahul_dadhich15/business-tools-toolkit';

const svg = serializeSignatureSvg([
  {
    points: [{ x: 10, y: 15 }, { x: 30, y: 45 }, { x: 80, y: 120 }],
    color: '#000000',
    width: 2.5
  }
]);

Interactive Browser Pad:

import { createSignaturePad } from '@rahul_dadhich15/business-tools-toolkit/browser';

const canvas = document.querySelector('canvas')!;
const pad = createSignaturePad(canvas, {
  strokeColor: '#0f172a',
  strokeWidth: 2.5
});

// Pad operations
pad.undoSignature();
pad.clearSignature();
console.log(pad.isEmpty());

// Export as PNG data URL or SVG markup
const pngData = pad.exportSignaturePng();
const svgMarkup = pad.exportSignatureSvg();

// Clean up listeners when component unmounts
pad.destroy();

5. Invoice Generator with PDF Export

Single source of truth for financial line calculations and genuine PDF rendering.

import { calculateInvoiceTotals, generateInvoicePdf } from '@rahul_dadhich15/business-tools-toolkit';

const invoiceData = {
  invoiceNumber: 'INV-2026-001',
  issueDate: '2026-10-24',
  dueDate: '2026-11-24',
  currency: 'USD',
  seller: {
    name: 'DevServices LLC',
    address: '100 Innovation Blvd, Austin, TX',
    email: '[email protected]',
    taxId: 'US-123456789'
  },
  customer: {
    name: 'Client Corporation',
    address: '500 5th Ave, New York, NY'
  },
  items: [
    { description: 'Full-Stack Development', quantity: 40, unitPrice: 125 },
    { description: 'DevOps Pipeline Configuration', quantity: 1, unitPrice: 1500, discount: 200, taxRate: 8.25 }
  ],
  invoiceDiscount: { type: 'percentage', value: 5 },
  amountPaid: 1000,
  notes: 'Payment due within 30 days.'
};

// 1. Calculate totals
const totals = calculateInvoiceTotals(invoiceData);

// 2. Generate PDF bytes
const pdfBytes = await generateInvoicePdf(invoiceData);

6. PayPal Payment Link Builder

Generates official, standard PayPal web checkout links or modern PayPal.Me payment URLs.

import { buildPayPalLink } from '@rahul_dadhich15/business-tools-toolkit';

// Standard Web Payments Standard checkout URL:
const checkoutLink = buildPayPalLink({
  merchant: '[email protected]',
  amount: 89.99,
  currency: 'USD',
  description: 'Enterprise License',
  invoiceId: 'INV-1092',
  returnUrl: 'https://company.example/checkout/success',
  cancelUrl: 'https://company.example/checkout/cancel'
});
console.log(checkoutLink.url);

// PayPal.Me direct link:
const paypalMe = buildPayPalLink({
  merchant: 'rahuldadhich',
  amount: 25.00,
  currency: 'EUR'
}, { method: 'paypal.me' });
console.log(paypalMe.url); // "https://paypal.me/rahuldadhich/25.00EUR"

7. Privacy Policy Generator

Drafts a tailored privacy policy based strictly on user data collection questionnaire responses.

import { generatePrivacyPolicy } from '@rahul_dadhich15/business-tools-toolkit';

const policy = generatePrivacyPolicy({
  businessName: 'CloudMetrics SaaS',
  contactEmail: '[email protected]',
  websiteUrl: 'https://cloudmetrics.example',
  jurisdiction: 'State of California, United States',
  personalDataCollected: ['Name', 'Email address', 'IP address'],
  processingPurposes: ['Deliver and optimize cloud monitoring', 'Process monthly subscription payments'],
  cookies: { enabled: true, types: ['essential', 'analytics'] },
  paymentProcessors: ['Stripe'],
  analytics: ['Plausible Analytics'],
  dataRetention: 'Data is retained for the lifetime of the active account plus 90 days.',
  userRights: ['Access personal data', 'Request deletion (erasure)', 'Export data']
}, { format: 'markdown' });

console.log(policy.content);
console.log(policy.warnings); // Any missing critical legal parameters

8. Resume Builder with PDF Export

Builds structured resume summaries and renders clean multi-page vector PDFs with selectable text and automatic page numbering.

import { buildResume, buildResumePdf } from '@rahul_dadhich15/business-tools-toolkit';

const resumeData = {
  fullName: 'Alexander Wright',
  title: 'Staff Systems Architect',
  contact: {
    email: '[email protected]',
    location: 'Seattle, WA',
    website: 'https://alexwright.dev',
    github: 'https://github.com/alexwright'
  },
  summary: 'Staff Architect with 10+ years specializing in distributed systems and cloud platforms.',
  skills: {
    'Core': ['TypeScript', 'Go', 'Distributed Systems'],
    'Cloud': ['AWS', 'Kubernetes', 'Terraform']
  },
  experience: [
    {
      position: 'Staff Engineer',
      company: 'Global Scale Inc.',
      startDate: '2021',
      current: true,
      highlights: [
        'Architected multi-region platform handling 15M daily requests.',
        'Mentored 12 mid-level engineers in reliability practices.'
      ]
    }
  ],
  education: [
    {
      degree: 'B.S. in Computer Science',
      institution: 'University of Washington',
      endDate: '2016'
    }
  ]
};

// Build text / markdown summary
const textSummary = buildResume(resumeData, { format: 'markdown' });

// Generate multi-page vector PDF
const pdfBytes = await buildResumePdf(resumeData);

9. Terms of Service Generator

Generates customizable service agreement drafts based strictly on actual business operations.

import { generateTerms } from '@rahul_dadhich15/business-tools-toolkit';

const terms = generateTerms({
  businessName: 'DevSync Platform',
  contactEmail: '[email protected]',
  websiteUrl: 'https://devsync.example',
  serviceDescription: 'collaborative code editors and cloud execution environments',
  eligibilityAge: 16,
  userAccounts: {
    allowRegistration: true,
    accountRules: ['One account per user', 'Two-factor authentication required for production keys']
  },
  subscriptions: {
    enabled: true,
    billingCycles: ['Monthly', 'Annual'],
    autoRenew: true
  },
  refunds: {
    allowed: true,
    periodDays: 14,
    conditions: 'Refund requests must be filed within 14 days of initial billing.'
  },
  governingLaw: 'the State of Delaware, United States'
}, { format: 'markdown' });

console.log(terms.content);

6. TypeScript Interfaces

The package exports rich, documented TypeScript interfaces for all configuration models:

  • CoverLetterInput, CoverLetterOptions, CoverLetterResult
  • VCardInput, VCardOptions, DigitalBusinessCardResult
  • EmailSignatureInput, EmailSignatureOptions, EmailSignatureResult
  • SignatureStroke, SignaturePoint, SignaturePadOptions, SignaturePadInstance
  • InvoiceInput, InvoiceItemInput, InvoiceTotals, InvoicePdfOptions
  • PayPalLinkInput, PayPalLinkOptions, PayPalLinkResult
  • PrivacyPolicyInput, PrivacyPolicyOptions, PrivacyPolicyResult
  • ResumeInput, ResumeExperience, ResumeEducation, ResumePdfOptions
  • TermsInput, TermsOptions, TermsResult

7. Validation and Error Handling

All validation failures throw explicit, typed ValidationError instances containing the offending field name and clear diagnostic messages:

import { ValidationError } from '@rahul_dadhich15/business-tools-toolkit';

try {
  calculateInvoiceTotals(invalidInvoice);
} catch (err) {
  if (err instanceof ValidationError) {
    console.error(`Validation failed on field "${err.field}": ${err.message}`);
  }
}

8. Browser and Node Compatibility

This package is designed for maximum runtime versatility:

| Environment | Supported Entry Point | Notes | |:---|:---|:---| | Node.js (18+) | @rahul_dadhich15/business-tools-toolkit | PDF rendering, text generation, URL construction, vCards. Universal import never touches DOM or canvas globals. | | Browser (ESM) | @rahul_dadhich15/business-tools-toolkit | Full in-memory generation, PDF export, vCard generation. | | Browser (DOM/Canvas) | @rahul_dadhich15/business-tools-toolkit/browser | Re-exports all universal utilities plus createSignaturePad, downloadBlob, downloadPdf, downloadVCard, and downloadPng. |


9. Security and Privacy Safeguards

  1. Untrusted Input Treatment: All user-provided strings are treated as untrusted. HTML output is built with strict character escaping (&, <, >, ", ').
  2. URL Sanitization: Links in email signatures and business cards are checked against permitted schemes (https:, mailto:, tel:). Dangerous protocols like javascript:, vbscript:, and data: are rejected.
  3. SVG Safety: Signature SVG outputs are generated strictly from validated numeric coordinates (Number.isFinite), eliminating arbitrary XML/SVG injection.
  4. Secret Protection: PayPal payment link builders never request or accept client secrets, bearer tokens, or private API credentials.
  5. Zero Remote Exfiltration: All document processing, text formatting, and PDF rendering executes 100% locally in-memory. Candidate data and business information is never sent to external AI or telemetry services.

10. Legal-Document Limitations

IMPORTANT DISCLAIMER Privacy policies and Terms of Service documents produced by this toolkit are customized drafts for informational purposes only.

  • They do not constitute legal advice or attorney representation.
  • They do not guarantee regulatory compliance under GDPR, CCPA/CPRA, or national consumer protection statutes.
  • You must have all generated legal documents reviewed and approved by a qualified attorney in your operating jurisdiction before deployment.

11. PDF Output Limitations

  • Generated invoices and resumes use vector rendering with standard Helvetica fonts via pdf-lib.
  • Invoices are formatted financial records, not legally certified fiscal invoices or tax authority filings.
  • Resumes are structured for readability; compatibility with every legacy applicant tracking system (ATS) parser cannot be guaranteed.

12. Development Setup

# Clone the repository
git clone https://github.com/rahuldadhich1517-sys/business-tools-toolkit.git
cd business-tools-toolkit

# Install dependencies
npm install

# Run typecheck
npm run typecheck

# Run test suite
npm run test:run

# Build dual ESM/CommonJS distribution
npm run build

13. Tests and Coverage

The package is verified by a 93-test Vitest test suite covering unit behaviors, edge cases, XSS attempts, decimal rounding boundaries, and cross-utility integrations:

npm run test:coverage

Current test metrics:

  • Test Files: 11 passed (100%)
  • Tests: 93 passed (100%)
  • Lines Coverage: >90%
  • Functions Coverage: >92%

14. Build and Packaging

Built using tsup targeting ES2022 with dual output:

  • dist/index.js (ESM) & dist/index.cjs (CJS)
  • dist/browser.js (ESM) & dist/browser.cjs (CJS)
  • Full TypeScript declaration files (.d.ts and .d.cts)

Pack dry-run verification ensures only build artifacts, package metadata, and documentation are included in the published tarball:

npm pack --dry-run

15. Supported Environments

  • Node.js: >= 18.0.0
  • Browsers: Modern evergreen browsers supporting ES2022 (Chrome, Firefox, Safari, Edge)

16. Known Limitations

  • Signature Pad: Drawing requires a DOM HTMLCanvasElement context. In non-browser environments, use the headless serializeSignatureSvg utility.
  • Embedded Fonts: PDF rendering currently uses built-in StandardFonts (Helvetica, Helvetica-Bold, Helvetica-Oblique) for zero-dependency portability and small bundle footprint.
  • Payment Link Verification: PayPal link generation constructs URLs only; it does not verify payment processing or merchant authorization.

17. Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub: https://github.com/rahuldadhich1517-sys/business-tools-toolkit

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Run tests and typecheck (npm run typecheck && npm run test:run)
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

18. License

This project is licensed under the MIT License.


19. Changelog

0.1.0 (2026-10-24)

  • Initial Production Release
  • Implemented 9 core business utilities:
    • cover-letter: Strictly factual cover letter generator.
    • digital-business-card: vCard 3.0 / 4.0 generation and escaped HTML business cards.
    • email-signature: Table-based HTML signature with conservative inline CSS.
    • signature-draw: Canvas pointer capture pad and headless SVG serializer.
    • invoice-generate: Single-truth invoice calculation engine and vector PDF export.
    • paypal-link: Secure standard web checkout and PayPal.Me link builder.
    • privacy-policy: Customizable privacy policy draft generator.
    • resume-build: Structured resume builder with multi-page vector PDF export.
    • terms-generate: Terms of service draft generator with conditional clauses.
  • Added browser entry point (@rahul_dadhich15/business-tools-toolkit/browser) with file download helpers.
  • Comprehensive test suite with 93 passing tests and >90% coverage.