@jackgreen2018/beauty-menu
v1.0.0
Published
A lightweight, high-performance beauty service menu generator that runs entirely in the browser or Node.js via Rust/WASM. No server required, no file uploads — 100% client-side with Rust-level speed.
Readme
@jackgreen2018/beauty-menu
A lightweight, high-performance beauty service menu generator that runs entirely in the browser or Node.js via Rust/WASM. No server required, no file uploads — 100% client-side with Rust-level speed.
Generate professional one-page service menus for nail techs and estheticians. Perfect for salons, spas, and beauty professionals who want a clean, customizable menu without a Canva subscription.
Install
npm install @jackgreen2018/beauty-menuUsage
import beautyMenu from '@jackgreen2018/beauty-menu';
const pdfBytes = await beautyMenu.generateMenu({
service_name: "Glamour Nails & Spa",
services: [
{ name: "Classic Manicure", description: "Nail shaping & polish", price: 35.00 },
{ name: "Gel Manicure", description: "Long-lasting gel polish", price: 50.00 },
{ name: "Luxury Pedicure", description: "Spa pedicure with massage", price: 65.00 },
{ name: "Acrylic Full Set", description: "Full acrylic nail set", price: 75.00 },
{ name: "Nail Art (per nail)", description: "Custom designs", price: 5.00 },
],
business_name: "Glamour Nails & Spa",
phone: "(555) 123-4567",
colors: [180, 120, 160, 255, 255, 255], // mauve primary, white secondary
style: "modern" // or "classic"
});
// pdfBytes is a Uint8Array containing the PDF
// Save it or display it in the browser
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
const url = URL.createObjectURL(blob);
window.open(url);Node.js (save to file)
import { writeFile } from 'fs/promises';
import beautyMenu from '@jackgreen2018/beauty-menu';
const pdfBytes = await beautyMenu.generateMenu({
service_name: "Serenity Spa",
services: [
{ name: "Facial Treatment", description: "Deep cleansing facial", price: 85.00 },
{ name: "Eyebrow Shaping", description: "Wax and trim", price: 30.00 },
],
business_name: "Serenity Spa",
phone: "(555) 987-6543"
});
await writeFile('service-menu.pdf', Buffer.from(pdfBytes));API
generateMenu(options)
Returns a Promise<Uint8Array> containing the PDF bytes.
Options:
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| service_name | string | yes | — | Name of the salon/spa |
| services | Array<{name, description?, price}> | yes | — | List of services with prices |
| business_name | string | no | "" | Business name (shown under title) |
| phone | string | no | "" | Phone number |
| colors | [r,g,b, r,g,b] | no | [180,120,160,255,255,255] | Primary and secondary RGB colors |
| style | "modern" | "classic" | no | "modern" | Alternating row backgrounds |
Performance
Benchmark results comparing @jackgreen2018/beauty-menu (Rust/WASM) vs pdf-lib (JavaScript):
=== Beauty Menu Generator Benchmark ===
Options: {
"service_name": "Glamour Nails & Spa",
"service_count": 8
}
--- Results ---
Library | Time (ms) | Size (bytes) | Pages
---------------------------|-----------|--------------|------
@jackgreen2018/beauty-menu | 4.3 | 2611 | 1
pdf-lib | 20.1 | 1348 | 1
--- Summary ---
WASM speedup: 4.64x faster
WASM size: 193.7% of pdf-lib sizeWASM speedup: 4.64x faster than pdf-lib for equivalent menu generation.
Canva Alternative
| Feature | Canva Subscription | @jackgreen2018/beauty-menu | |---------|-------------------|------------------------------| | Monthly cost | $15/mo | $0 | | Annual cost | $180/year | $0 | | Client-side | No (browser editor) | Yes (WASM library) | | Privacy | Data in their editor | Stays on your device | | Customization | Templates | Full code control | | Integration | Web app only | npm package, works anywhere |
Break-even: After ~12 months of Canva ($180), this library pays for itself with a single free use.
License
MIT
