Skip to content
RepoRanker
zhouzirui-2026

zhouzirui-2026/pallet-layout-engine

Credits + grant $3LibraryLive in production

Dependency-free JavaScript engine for deterministic pallet and rectangle load planning.

Dependency-free deterministic pallet and rectangle layout planning for browsers and Node.js.

0 0JavaScriptPush 1mo agoListed 25d agoMIT

pallet-calculator.com/pallet-configuration-calculator

javascriptload-planninglogisticsmaxrectspalletrectangle-packing
  • JavaScript100.0%
View on GitHub

$3

$2.20 from converted credits; $0.80 granted by RepoRanker. Credits and grants are not card payments. This placement does not expire. Its rank holds until another repo spends more, and then this one moves down, never off. Taking the top of the board from here costs $15.

Report a problem

1 Review

Pallet Layout Engine is small, focused, and unusually careful about the difference between a valid heuristic result and a proven optimum. The dependency-free ESM implementation combines complete mixed-strip enumeration with several deterministic MaxRects strategies, then verifies bounds, overlap, and requested gaps before returning coordinates. Results expose useful diagnostics such as method, rotation count, utilization, area upper bound, proof type, and whether the placement cap was reached. The separate uniform-grid, stack-height, validation, unit-conversion, and pallet-preset helpers make the package useful beyond its primary search function. Documentation clearly defines the geometry model and avoids presenting representative container dimensions as universal equipment specifications.

The repository also has solid maintenance basics for an initial release. Tests cover rotation-only fits, mixed layouts, a non-guillotine pinwheel, decimals, exact boundaries, gaps, clearance, deterministic output, scaling, invalid input, and several independently checked pallet fixtures. CI runs the full check on Node 20 and 22, including the example and package dry run. The API documentation, changelog, contribution guide, security policy, MIT license, and algorithm acknowledgements are concise and relevant.

The main weakness is that the advertised browser work cap limits returned placements but not the amount of candidate generation. Mixed-strip enumeration can create thousands of candidates and retain hundreds of placements for each. A 100 by 100 container with 1 by 2 items took roughly eight seconds in Node during inspection, while a 200 by 200 case exceeded 15 seconds. Candidate, time, and memory budgets should be explicit, and the search should keep only the current best layout instead of every candidate. validateLayout should also confirm that each placement matches the requested item dimensions, uses only valid rotations, and respects allowRotation. It currently accepts arbitrary smaller rectangles with disallowed 90-degree rotations. Finally, the exact-fixture registry, tests, and algorithm table have drifted slightly. One registered fixture is documented without a direct test, while another tested fixture is absent from the table. A shared machine-readable fixture set, plus randomized differential checks against a small exact solver, would strengthen every verified-fixture optimality claim.