No description
  • TypeScript 96.6%
  • Shell 2%
  • CSS 0.7%
  • Nix 0.4%
  • Just 0.3%
Find a file
main (agent) a642b069e7
All checks were successful
/ check (push) Successful in 20m52s
M6b: a pool of workers, a low-res overview, the CI rehearsal
- geometry: binEnvelope gives a bin's size and seat with no build, and
  lowResBin and lowResPiece give a tray and a grid as plain meshes.
- web: a queue for up to 3 workers. A worker says ready before it gets a
  job, the newest edit takes the next free worker, and a newer target
  drops the requests that still wait. Answers are kept by request, so an
  old solid never stands for a new edit, and a failed build counts as
  answered. A part's grams start after its own build.
- The overview builds only the box and the selected part, and draws the
  other items and the baseplate pieces low-res. The Print tab builds
  every part and piece, and a solid stays real until its part changes.
- The layout takes sizes and seats from the envelopes, so "Add bin" no
  longer waits for a build.
- e2e: print-tab-builds-within-2-s, overview-draws-low-res-bins and
  failed-part-shows-no-old-bin. The overview of both collections is held:
  223 and 288 ms, from 2,079 and 3,695 ms.
- just ci-rehearsal runs the e2e suite in the CI runner's image and
  memory, and fails below 128 MB of headroom.
- The plan was reviewed by three adversarial agents first. Faster
  builders come later, by the user's decision.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 23:37:32 +02:00
.agents/skills M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
.claude/skills M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
.forgejo/workflows M2: slicer check, Slicer interface, PrusaSlicer 2.9 project writer 2026-10-03 16:04:22 +02:00
apps M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
data M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
docs M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
packages M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
scripts M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
.dependency-cruiser.json Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
.envrc initial commit 2026-09-27 13:32:46 +02:00
.gitattributes Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
.gitignore Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
AGENTS.md Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
biome.json Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
CLAUDE.md M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
flake.lock M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
flake.nix M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
justfile M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
LICENSE M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
package.json M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
pnpm-lock.yaml Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
pnpm-workspace.yaml M2: slicer check, Slicer interface, PrusaSlicer 2.9 project writer 2026-10-03 16:04:22 +02:00
README.md M6b: a pool of workers, a low-res overview, the CI rehearsal 2026-10-04 23:37:32 +02:00
THIRD_PARTY_NOTICES.md Part marks: a bar code on every printed part, and the part log 2026-10-04 16:12:29 +02:00
tsconfig.base.json M0 and M1a: modules, compatibility check, data model v2, CI 2026-10-03 11:51:24 +02:00
vitest.config.ts M2: slicer check, Slicer interface, PrusaSlicer 2.9 project writer 2026-10-03 16:04:22 +02:00

FancyBoxes

Why you might care about this repo

  • Design Gridfinity storage for one real container, such as an IKEA GNABBAS basket or a desk drawer. Enter the box's inside sizes, fit the grid to it, place and stack bins, and see the container, the baseplate and every bin in 3D.
  • Set walls by line count, not by millimeters. A 2-line wall stays 2 lines in every stock Prusa profile for the MK4S with the HF0.4 nozzle.
  • Keep a collection of what goes where: each item has a label, notes and a status (planned, printed, bought, retired).
  • Plan the printing: the planned bins go on plates for the bed, each plate downloads as a PrusaSlicer project, and "Mark printed" records what came off the printer.
  • Name a test print in hand: each calibration part carries a part mark, a row of bars on its bottom, and the part log says which design, version and question it was.

Issues this solves

  • Walls that print badly
    • A 1.2 mm wall prints as 3 lines with the 0.20mm SPEED profile and as 2 lines with 0.25mm SPEED. You pick the profile in the slicer, after the export. FancyBoxes knows the line widths of each profile, and picks a thickness that gives the same line count in all of them.
  • Baseplates that are too large for the bed
    • A 7 × 8 baseplate does not fit the 250 × 210 mm bed. FancyBoxes splits it into pieces that fit (4 × 4, 4 × 4, 3 × 4, 3 × 4).
  • Losing track of what is printed
    • A collection stores each bin, its place in the container, and whether it is printed. The 3D view colors items by status.

How you want to use this repo

  1. Install the packages in the dev shell. The flake's dev shell holds the whole toolchain: Node 24, pnpm, just, yq and the Playwright browsers.

    nix develop -c pnpm install
    

    Every just recipe enters the dev shell by itself, so just check works from any shell. nix develop (or direnv with use flake) gives you the same tools in an interactive shell. A git flake reads only tracked files, so git add new files before the first nix develop.

  2. Start the app and open http://localhost:5173.

    just dev
    

    On the first start, the server copies the sample collections from data/public/sample/ to data/library/. Your changes stay in data/library/ (gitignored).

  3. Pick a collection, select an item in the list, and change its bin. The 3D view and the measured size follow each change. Save writes the collection. When someone else saved it first, the app tells you and offers a reload.

Commands

just … Does
dev the backend and the Vite dev server, together
check the gate: lint, dependency boundaries, types, unit tests
test [FILTER] unit tests only. FILTER is a module name (just test geometry) or a file pattern
e2e [ARGS] the browser tests, on a throwaway copy of the sample data
slice [ARGS] the slicer check: slices our parts with the pinned PrusaSlicer and checks the G-code against the print rules
mutate [ARGS] plants known bugs in a throwaway copy and lists the ones no test catches. ARGS are module names or mutant ids
ci-rehearsal [SOURCE] runs the e2e suite in the CI runner's image and memory, and fails below 128 MB of headroom. SOURCE is a commit, or tree (the default). It needs a running Docker daemon
m3-plate [--print] writes the M3 calibration plate: unmarked drafts to data/exports/m3-plate-draft/, or with --print the files to print to data/exports/m3-plate/, each part with its part mark and its entry in the part log, and a README that says what to print and what to check
mark-plate [--print] the same for the mark plate: the test plate of the part marks, the reprinted hollow-feet coupon and two pieces to read
part-log [NUMBER] checks the part log, restores it from its journal and writes the part-log page data/exports/part-log.html. NUMBER prints the entries of one part mark
reference [--check | --upstream] renders the Gridfinity parts of other generators that the compatibility check compares against (report)
docs regenerates the module graph in docs/generated/architecture/

The ports and data folders are in data/config/defaults.env. An environment variable of the same name overrides each value.

CI runs just check, just e2e and just slice on every push to git.glurag.de, in a fresh container (.forgejo/workflows/check.yml, scripts/ci/).

Status

The repository setup (milestone M0) and the geometry core (M1) are done. M2 adds the slicer check (just slice) and the PrusaSlicer 2.9 project writer. M4 makes collections editable in the app: create and delete them, enter the box and fit the grid to it, and add, move, turn and remove items. Our parts are measured against Gridfinity Rebuilt, Gridfinity Extended and the Gridfinity Layout Tool in every just check (report). M5 adds the print plan: the planned bins packed on plates for the bed, each plate's 3MF and each part's STL, "Mark printed", grams per part and plate, and the export and import of all data. The calibration plate (M3) is printed, and its hollow-feet coupon is fixed. Part marks name every printed calibration part: just mark-plate --print writes the test plate that fixes their sizes. The milestones to v1 are in docs/roadmap/v1-milestones.md. Features after v1 are in docs/roadmap/.

Architecture overview

FancyBoxes is a pnpm workspace of small modules with one job each. A module is used only through its public entry (src/index.ts), and dependency-cruiser fails just check when an import crosses a boundary that the rules do not allow. So you can rewrite or replace one module and keep the others.

flowchart LR
  web["apps/web<br/>UI shell + features"]
  server["apps/server<br/>HTTP API"]
  slicing["slicing<br/>profiles, line model"]
  layout["layout<br/>planning"]
  geometry["geometry<br/>solids → meshes"]
  calibration["calibration<br/>test prints"]
  partmarks["part-marks<br/>mark code + part log"]
  workshop["apps/workshop<br/>print tools, part-log page"]
  slicercheck["slicer-check<br/>slicer tests"]
  viewer["viewer<br/>3D drawing"]
  documents["documents<br/>versioned storage"]
  spec["spec<br/>shared language"]

  web --> slicing & layout & geometry & viewer
  calibration --> slicing & geometry
  workshop --> calibration & partmarks & geometry & slicing & viewer
  slicercheck --> slicing & geometry
  web -. HTTP .-> server
  server --> documents
  slicing & layout & geometry & viewer & calibration & partmarks --> spec
  web & server --> spec
Module Job Must not know about
spec the data model: parts, collections, print profiles, meshes. zod schemas any other module
slicing profiles, the line model, wall thickness for a line count, the slicer's project file geometry, layout, UI
layout grid fit in a container, baseplate split, item positions geometry, UI
geometry builds solids with manifold-3d and returns plain meshes and STL files slicers, layout, UI
calibration the test pieces that only a print can judge, the test plate of the part marks, and their questions layout, storage, UI
part-marks the part mark code, and the part log: numbers, versions, reuse, a safe append geometry, slicers, UI
slicer-check slices our parts with the pinned PrusaSlicer and checks the G-code (just slice) layout, storage, UI
viewer draws a scene of meshes with three.js where the meshes come from
documents versioned JSON documents: memory store, file store, contract suite what the documents are
testkit fixtures that several modules' tests share anything but spec
server stores collections and serves them over HTTP geometry, layout, UI
web composes the modules in the browser, one folder per feature the store
workshop writes the calibration plates with part marks, and the part-log page layout, storage, the web app

License

AGPL-3.0. See LICENSE. Code and reference parts from other projects, and their notices, are listed in THIRD_PARTY_NOTICES.md.