Skip to content

villagekit/gridkit

Repository files navigation

Grid Kit

(Note: The new gridbeam.xyz is not yet live, so some of this README is aspirational.)

A code-as-CAD engine for modular grid-beam designs. Powers gridbeam.xyz.

You write a parametric design in TypeScript; the engine renders it in 3D, validates parameters, and produces a bill of materials. The catalog of designs at gridbeam.xyz/designs is built entirely from this engine and the products in villagekit/gridkit-products.

Inspired by NopSCADlib.

Demo

A walkthrough of the design process:

Screenshot of the YouTube demo

https://youtu.be/tMxWzfpn7Kg 📺

The video is from an earlier version, but the workflow is unchanged.

Get started

Use the engine via the website. Visit gridbeam.xyz/designs to browse the catalog and configure designs in the browser. No install needed.

Run the studio app locally. The studio is a desktop CAD-as-code editor for authoring new designs.

git clone https://github.com/villagekit/gridkit
cd gridkit
pnpm install
pnpm dev:app:studio

Screenshot of the Grid Kit Studio app

Use the libraries directly. The core packages are published to npm under the @villagekit/* scope:

pnpm add @villagekit/design @villagekit/sandbox @villagekit/parameters

See villagekit/gridkit-products for example designs, and DEV.md for the full development workflow.

Packages

Core

Package Purpose
@villagekit/design Convenience entry point bundling parts, plugins, and the kit product type for design authors
@villagekit/parameters React UI for editing product parameters (presets, values, URL state)
@villagekit/part Modular part type dispatcher
@villagekit/product Modular product type dispatcher
@villagekit/sandbox WebGL product renderer (Three.js + react-three-fiber)

Parts

Package Purpose
@villagekit/part-gridbeam Grid beam part — a 40 mm extruded modular beam
@villagekit/part-gridpanel Grid panel part — a 40 mm-grid flat panel
@villagekit/part-fastener Fastener parts (bolts, nuts, washers)

Products

Package Purpose
@villagekit/product-kit Reference assembly product type

Plugins

Package Purpose
@villagekit/plugin-smart-fasteners Auto-place fasteners between connected beams

Utilities

Package Purpose
@villagekit/math Geometry helpers used by parts and the renderer
@villagekit/units Unit conversions (mm ↔ grid holes ↔ inches)

Commands

Package Purpose
@villagekit/screenshot Headless CLI for rendering product screenshots from a workspace manifest

Studio app

The studio (apps/studio) is a Tauri-wrapped desktop CAD-as-code editor for authoring new designs against this engine. It bundles the engine packages, a CodeMirror TypeScript editor, and a react-three-fiber preview into a Mac/Windows/Linux app.

The studio stays a separate downloadable desktop app — it isn't embedded into gridbeam.xyz. Browser users configure existing designs through the website's parameter UI; design authoring happens locally in the studio. This keeps the website fast and lets the studio do file-system things a browser tab can't.

Build it from source via the Get started instructions, or TODO download the latest from the GitHub releases page.

Contributing

See DEV.md for environment setup, package layout, and code conventions.

See also

villagekit/villagekit is the more ambitious more generic Rust-powered engine, a work in progress that came from learnings from this project.

License

Licensed under the European Union Public Licence v. 1.2 (summary).

About

[Legacy] Grid Kit is a modular code-as-CAD system for grid beam.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors