File format
Modules and projects are stored on the server as JSON documents in the ModuleCADFile format. A
.module file is that same document saved to disk, and it can be imported into projects (see
Adding modules).
There is currently no button to download a module as
.module. The only way to download the raw document is the Download raw JSON option, offered when a saved document is damaged.
Structure
{ "version": 4, // schema version "exportedAt": "2026-11-25T12:00:00Z", "metadata": { "name": "Wall cabinet", "units": "mm" }, "scene": { "nodes": [ /* parts and groups (flat list with parentId) */ ], "mates": [ /* mates */ ], "groundPartId": "…", // reference part for re-solving mates "sketches": [ /* face sketches and at most one floor sketch */ ] }, "parametric": { "variables": [ /* variables and form fields */ ], "bindings": [ /* dimension, position, rotation and offset bindings */ ], "materialVariables": [ /* material variables */ ], "formDecision": "form", // "form" | "none" | absent (undecided) "repeats": [ /* repeats */ ] }, "viewport": { "gridVisible": true }, "project": { "instances": [ /* module instances (projects) — each with a name, position, rotation, form answers and a full copy of the source module's document in "source" */ ] }, "environment": { "room": { /* room: dimensions, walls, floor, openings */ }, "props": [ /* props and lights */ ], "floorSketch": { /* floor-plan visibility and opacity */ } }, "meshes": { /* table of imported meshes, keyed by content hash */ }}Principles
- Flat scene: parts form a flat list; groups are referenced by
parentId. - Millimetres: every measurement is in mm (since schema version 3).
- Euler XYZ rotation, in radians in the file (degrees in the interface).
- Optional fields stay optional: older documents, created before a feature existed, keep opening.
- Instances are self-contained: each module instance in a project carries the full document of its source module, which makes it immune to later changes in the library.
Schema versions and migration
ModuleCAD always writes the latest version (4) and converts older documents automatically when opening them:
| Version | Change |
|---|---|
| 1–2 | Measurements at centimetre scale. |
| 3 | Measurements move to millimetres — earlier documents are multiplied by 10 on opening. |
| 4 | Sketches get an anchor (a part face or the floor), which enables the floor plan. |
Validation
Before loading any document, ModuleCAD checks its structure. A document with an invalid structure is not loaded (see Damaged document). Isolated invalid entries — a mate pointing at a part that doesn’t exist, a repeat of a deleted part, an opening outside its wall — are silently dropped, and the rest of the document opens normally. Meshes over the limits are refused.
For technical details, see packages/cad-engine/src/io/ in the repository.