- TypeScript 96.6%
- Shell 2%
- CSS 0.7%
- Nix 0.4%
- Just 0.3%
|
All checks were successful
/ check (push) Successful in 20m52s
- 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> |
||
|---|---|---|
| .agents/skills | ||
| .claude/skills | ||
| .forgejo/workflows | ||
| apps | ||
| data | ||
| docs | ||
| packages | ||
| scripts | ||
| .dependency-cruiser.json | ||
| .envrc | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| biome.json | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| THIRD_PARTY_NOTICES.md | ||
| tsconfig.base.json | ||
| vitest.config.ts | ||
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
-
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 installEvery
justrecipe enters the dev shell by itself, sojust checkworks from any shell.nix develop(or direnv withuse flake) gives you the same tools in an interactive shell. A git flake reads only tracked files, sogit addnew files before the firstnix develop. -
Start the app and open http://localhost:5173.
just devOn the first start, the server copies the sample collections from
data/public/sample/todata/library/. Your changes stay indata/library/(gitignored). -
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 |
- docs/architecture.md — the dependency rules, the interfaces between modules, and how to add or replace a module.
- docs/testing.md — the testing policy: what each kind of test proves, and which tests survive a rewrite.
- docs/generated/architecture/module-graph.md — the real imports, generated from the code.
- docs/decisions.md — one line per decision, with a link to the note that explains it.
License
AGPL-3.0. See LICENSE. Code and reference parts from other projects, and their notices, are listed in THIRD_PARTY_NOTICES.md.