Skip to content

Repository files navigation

Venus CAD Studio Banner

Venus CAD Studio

Venus CAD Studio is a browser-first playground for parametric CAD: write OpenSCAD, preview geometry live via a WASM compiler, and iterate faster with an AI-assisted workflow that can start from a local shape library.

Why We Built This

Traditional CAD can feel heavy for quick iterations, sharing, and experimenting with parametric ideas. Venus CAD Studio is built to make “prompt/code → preview → tweak → export” feel immediate:

  • A fast in-browser loop for OpenSCAD modeling
  • A small, reusable src/shapes library to avoid reinventing common models
  • Optional persistence (projects + chat history) with Supabase
  • STL export when you’re ready to print or share

Highlights

  • OpenSCAD in the browser: compile to STL via an OpenSCAD WASM worker.
  • Code-first editor: Monaco-powered editor with a live preview.
  • AI CAD agent: generates or edits OpenSCAD while following project rules (for example: no $fn).
  • Shape library context: the agent can inspect src/shapes before writing new geometry.
  • Project persistence: save and load projects when authenticated with Supabase.

Tech Stack

  • Frontend: React 19 + TypeScript
  • App framework/routing: TanStack (React Router / Start tooling)
  • Build tooling: Vite
  • Editor: Monaco (@monaco-editor/react)
  • 3D preview: Three.js (STL loader + orbit controls)
  • CAD runtime: OpenSCAD compiled to WebAssembly (worker-based compile)
  • Auth + storage: Supabase
  • Styling/UI: Tailwind CSS + Radix UI primitives + lucide icons
  • Local dev/deploy tooling: Wrangler (Cloudflare)

Project Setup

1) Install dependencies

Using npm:

npm install

Or using bun (if you prefer):

bun install

2) Configure environment variables

Create a local .env from the example:

cp .env.example .env

Fill in:

  • VITE_SUPABASE_URL
  • VITE_SUPABASE_ANON_KEY
  • VITE_SUPABASE_PUBLISHABLE_KEY (if applicable to your setup)

3) Start the dev server

npm run dev

Open the URL printed in the terminal.

4) If the OpenSCAD runtime assets are missing

The app expects OpenSCAD WASM assets under public/openscad. If compilation/preview fails and the console warns about missing OpenSCAD assets, build the WASM port (or copy the generated assets) so these files exist:

  • public/openscad/openscad.wasm
  • public/openscad/openscad.wasm.js
  • public/openscad/openscad.fonts.js
  • public/openscad/openscad.mcad.js

Working With The Shape Library

Local reusable OpenSCAD snippets live in:

  • src/shapes

If you add more shapes, keep them small, parameterized, and fast to compile so the library remains a performance win.

Vote Of Thanks

Big thanks to:

  • The OpenSCAD community for a wonderfully scriptable CAD ecosystem.
  • Supabase for making auth and persistence painless.
  • TanStack, Vite, React, and the broader OSS community for the tools that make building fast, delightful web apps possible.

About

Browser-based parametric CAD studio with OpenSCAD WASM, live 3D preview, AI-assisted modeling, project persistence, and STL export.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages