Receipts, but delightful. Turn structured receipt JSON into beautiful, shareable, printable receipts β designed right in your browser.
English Β· ηΉι«δΈζ Β· ζ₯ζ¬θͺ
One receipt JSON in β SVG, HTML, and PNG out. Same data, many surfaces β with a delightful direct-manipulation editor on top. Built for artist-alley booths, doujin events, craft markets, pop-up stores, and local-first POS tools (e.g. OpenBooth).
A receipt doesn't have to be ugly. For a creator at a booth, the receipt is a brand touchpoint β
a tiny gift the customer keeps, scans, and shares. receipt-engine makes that easy while staying a
neutral, embeddable library: pass it a receipt JSON, get back PNG / SVG / HTML β or hand a merchant
the browser editor and let them design their own.
- ποΈ Direct-manipulation editor β tap text to restyle, drag stickers to scale/rotate, drag the card edges to resize, drag blocks to reorder. Runs entirely in the browser, on phones too.
- π One schema, many outputs β SVG (canonical) Β· HTML Β· PNG, all deterministic.
- π¨ Themes β
custom(colorful, change colors / fonts / stickers) andthermal(monospace, auto-grayscaled images), plus fully custom themes viamergeTheme. - ποΈ 8 ready-made starter templates β minimal Β· doujin booth Β· zine press Β· cafΓ© Β· craft market Β· pixel arcade Β· boutique Β· neon night β each with its own font, palette and personality. Pick one and tweak, or start blank.
- πͺ Any currency β pick a code or just type your own symbol (
NT$,Β₯, β¦); the editor renders it as-is. - βΆ Borderless vector stickers β a clean, solid-fill mark set (no emoji), scalable / rotatable on the canvas.
- π¨οΈ Thermal printing β ESC/POS raster (GS v 0) over Web Bluetooth, straight from the browser.
- π² Browser PNG & share β rasterize to PNG client-side (canvas) and share via Web Share β no server.
- π i18n β the editor UI ships in δΈζ / ζ₯ζ¬θͺ / English.
- π QR codes, π’ smart totals, π§± custom blocks, π§© React component + CLI + typed core.
- π‘οΈ Safe & deterministic β every user value is escaped; the receipt never leaves the browser for a server.
Or run it locally (pnpm monorepo β packages aren't published to npm yet):
pnpm install
pnpm build
pnpm test
# then open apps/playground/public/index.html in any browserWhat you can do in the editor
- Start from a template β 8 ready-made styles (or blank), then make it yours.
- Tap any text β a contextual inspector to change its content, font, color, size and weight
(saved per-element in
styleOverrides); double-tap to edit text inline. - Tap a sticker β a Photoshop-style frame: corner handles scale, a top handle rotates, two-finger pinch on touch; drag to move with alignment snapping.
- Drag the card edges β change width / top / bottom padding.
- Drag a section (or use the layout-order β/β panel) β reorder blocks (
blockOrder). - Upload a logo / background (background is scalable, rotatable, transparent-able), pick
colors & fonts, toggle a transparent background / card / QR backing, switch
custom/thermal, save/restore a config, and download PNG with the fonts embedded so the export matches the preview.
The editor only mutates the receipt model β exports stay deterministic and editor-metadata-free.
| Package | What it does |
|---|---|
@receipt-engine/core |
Schema, validation, normalization, totals. |
@receipt-engine/themes |
Built-in themes + getTheme / mergeTheme. |
@receipt-engine/render-svg |
Receipt β SVG string (canonical). |
@receipt-engine/render-html |
Receipt β standalone HTML. |
@receipt-engine/render-png |
Receipt β PNG Buffer (resvg, server-side). |
@receipt-engine/bitmap |
1-bit dithering + bit-packing for thermal printers. |
@receipt-engine/escpos |
ESC/POS commands + raster output (GS v 0). |
@receipt-engine/connect |
Browser delivery: Web Bluetooth thermal print, canvas PNG, Web Share. |
@receipt-engine/import |
POS / order β receipt adapters (incl. OpenBooth) + template overlay. |
@receipt-engine/react |
<ReceiptCard />. |
@receipt-engine/cli |
receipt-engine render β¦. |
Apps: apps/playground β the static in-browser editor (deployed above) Β·
apps/openbooth-bridge β the OpenBooth β receipt-engine integration bundle.
import { renderReceiptToSvg } from '@receipt-engine/render-svg'
import { renderReceiptToPng } from '@receipt-engine/render-png'
const svg = renderReceiptToSvg(receipt, { theme: 'custom', width: 720 })
const png = await renderReceiptToPng(receipt, { theme: 'custom', pixelRatio: 2 })import { ReceiptCard } from '@receipt-engine/react'
export const App = () => <ReceiptCard receipt={receipt} theme="custom" width={360} />CLI
# from the repo, the CLI runs via the dev script:
pnpm --filter @receipt-engine/cli dev render examples/cute-booth/receipt.json --theme custom --format svg --out receipt.svg
# once built, the bin is available:
receipt-engine render receipt.json --theme custom --format png --out receipt.pngOptions: --theme custom|thermal, --format svg|html|png, --out <path>, --width <number>,
--pretty. svg/html print to stdout when --out is omitted.
Theme customization
import { getTheme, mergeTheme } from '@receipt-engine/themes'
import { renderReceiptToSvg } from '@receipt-engine/render-svg'
const theme = mergeTheme(getTheme('custom'), {
palette: { primary: '#0b7285', accent: '#0b7285' },
})
const svg = renderReceiptToSvg(receipt, { theme })Full field reference in docs/schema.md. Ready-made examples live in
examples/ (simple, cute-booth, openbooth-like).
The rendering paths are pure front-end JavaScript β SVG, HTML, and PNG (canvas, via
@receipt-engine/connect) all run directly in a mobile browser, no server required. That's how the
playground renders, exports PNG, and even thermal-prints over Web Bluetooth on a phone.
(@receipt-engine/render-png is a separate server-side path using a native module, for batch / Node.)
The simplest way to use it: open the deployed editor
on your phone. To embed rendering in your own app (React Native / WebView), import
@receipt-engine/render-svg or @receipt-engine/render-html directly.
Schema Β· Themes Β· Rendering Β· Roadmap
Shipped (v0.1) in-browser editor Β· browser PNG export Β· ESC/POS thermal print over Web Bluetooth Β·
OpenBooth integration Β· δΈ/ζ₯/θ± i18n.
Next hosted receipt pages Β· coupon QR Β· community themes Β· plugin system.
Full list in docs/roadmap.md.
MIT Β© mimito


{ "schemaVersion": "0.1", "currency": "TWD", "merchant": { "name": "Mimito Booth", "subtitle": "ζδ½ Γ ζη« Γ ε°θͺ", "logo": "./assets/logo.svg" }, "event": { "name": "Artist Alley", "boothNumber": "A12" }, "transaction": { "receiptNo": "AA-A12-018", "issuedAt": "2026-06-01T14:30:00+08:00" }, "items": [ { "name": "Sticker Set", "quantity": 2, "unitPrice": 120, "tags": ["ζ°ε"] }, { "name": "Mini Zine", "quantity": 1, "unitPrice": 180, "tags": ["ηΉε Έ"] } ], "discounts": [{ "label": "Set deal", "amount": 50 }], "payments": [{ "method": "Cash", "amount": 700 }], "qr": { "value": "https://instagram.com/mimito.art", "label": "θΏ½θΉ€ζε" }, "message": { "title": "Thank you!", "body": "ζθ¬ζ―ζζεηζ€δ½οΌ" } }