CADAM
A Text to CAD Web Application
What it does:
Generates parametric 3D models from natural language descriptions, with support for both text prompts and image references
Outputs OpenSCAD code with automatically extracted parameters that surface as interactive sliders for instant dimension tweaking
Separate agents for conversation and code generation; simple parameter tweaks bypass AI entirely using deterministic regex-based updates
Exports as .STL or .SCAD
Runs fully in-browser by compiling OpenSCAD to WebAssembly and integrating Three.js with React Three Fiber for 3D rendering
Supports BOSL, BOSL2, and MCAD libraries and custom font support (Geist) for text in models
Prerequisites
Node.js and npm
Supabase CLI
ngrok (for local webhook development)
Setting Up Environment Variables
1. Frontend Environment:
Copy .env.local.template to .env.local
to Update all required keys in .env.local : VITE_SUPABASE_ANON_KEY="" VITE_SUPABASE_URL='http://127.0.0.1:54321'
2. Supabase Functions Environment:
Copy supabase/functions/.env.template to supabase/functions/.env
to Update all required keys in supabase/functions/.env , including: ANTHROPIC_API_KEY="" ENVIRONMENT="local" NGROK_URL="" # Your ngrok tunnel URL, e.g., https://xxxx-xx-xx-xxx-xx.ngrok.io
Setting Up ngrok for Local Development
CADAM uses ngrok to send image URLs to Anthropic:
Install ngrok if you haven't already: npm install -g ngrok # or brew install ngrok Start an ngrok tunnel pointing to your Supabase instance: ngrok http 54321 Copy the generated ngrok URL (e.g., https://xxxx-xx-xx-xxx-xx.ngrok.io) and add it to your supabase/functions/.env file: NGROK_URL="https://xxxx-xx-xx-xxx-xx.ngrok.io" Ensure ENVIRONMENT="local" is set in the same file.
Development Workflow
Install Dependencies
npm i
Start Supabase Services
npx supabase start npx supabase functions serve --no-verify-jwt
Credits
This app wouldn't be possible without the work of:
Licenses
This distribution is licensed under the GNU General Public License v3.0 (GPLv3). See LICENSE .
Components and attributions: