Inventory Kits and Bundles Manager (lib/kits.js)

everything · src/inventory/src/lib/kits.js · javascript · MIT
pos, lang:javascript, tag:bundles

Manages assembled product kits, component recipes, and automatic stock deductions for bundled inventory items. Reuse this module when building POS or inventory systems that handle composite products.

// Source: https://github.com/HeyPuter/everything | License: MIT | Copyright 2026 Puter Technologies Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Kits and bundles: one product made of others.
 *
 * Every product's stock was independent, so anything made of other
 * things had to be tracked in someone's head — a café's breakfast set, a
 * workshop's assembled kit, a three-pack of something also sold singly.
 * Selling one meant remembering to remove three or four components in
 * three or four separate dialogs at the busiest moment of the day, so it
 * got skipped and the component counts drifted until a stocktake found
 * it.
 *
 * A kit is a product with `components: [{ productId, qty }]` and a mode:
 *
 *   'build' — make N of it: the components are consume

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key