artisdom / CADAM

Home Page:https://adam.new/cadam

Repository from Github https://github.comartisdom/CADAMRepository from Github https://github.comartisdom/CADAM

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
  • Update all required keys in .env.local:
    VITE_SUPABASE_ANON_KEY="<Test Anon Key>"
    VITE_SUPABASE_URL='http://127.0.0.1:54321'
    

2. Supabase Functions Environment:

  • Copy supabase/functions/.env.template to supabase/functions/.env
  • Update all required keys in supabase/functions/.env, including:
    ANTHROPIC_API_KEY="<Test Anthropic API Key>"
    ENVIRONMENT="local"
    NGROK_URL="<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:

  1. Install ngrok if you haven't already:

    npm install -g ngrok
    # or
    brew install ngrok
  2. Start an ngrok tunnel pointing to your Supabase instance:

    ngrok http 54321
  3. 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"
    
  4. 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:

  • Portions of this project are derived from openscad-web-gui (GPLv3).
  • This distribution includes unmodified binaries from OpenSCAD WASM under GPL v2 or later; distributed here under GPLv3 as part of the combined work. See src/vendor/openscad-wasm/SOURCE-OFFER.txt.

About

https://adam.new/cadam

License:GNU General Public License v3.0


Languages

Language:TypeScript 92.9%Language:CSS 4.2%Language:PLpgSQL 1.6%Language:JavaScript 1.3%Language:HTML 0.1%