A LAN-accessible web application that allows users to interact with AI through natural language to generate CadQuery Python code, execute it to create 3D models, and preview them in real-time in the browser.
| Module | Technology |
|---|---|
| Frontend Framework | React 18 |
| 3D Preview | model-viewer |
| Code Editor | Monaco Editor |
| Backend Framework | FastAPI |
| 3D Modeling | CadQuery |
| Database | SQLite |
| AI Models | Claude / OpenAI / Ollama (user configurable) |
- Python 3.12+
- Node.js 18+
- uv (Python package manager)
Platform Notice:
- x86_64 Linux
- macOS (Intel/ARM)
- Windows
One-click startup (automatically installs dependencies):
./start.shThis will:
- Install backend dependencies via
uv sync - Install frontend dependencies via
npm install - Start backend on port 8000
- Start frontend on port 5173
Press Ctrl+C to stop all services.
Backend
cd backend
uv sync
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm install
npm run dev -- --host 0.0.0.0 --port 5173Copy backend/.env.example to backend/.env and configure:
| Variable | Description | Default |
|---|---|---|
APP_NAME |
Application name | CadQuery 3D Generator |
API_PREFIX |
API route prefix | /api |
DATABASE_URL |
SQLite database URL | sqlite:///./app.db |
MODEL_OUTPUT_DIR |
Directory for generated GLB files | models |
CORS_ORIGINS |
Allowed CORS origins | http://localhost:5173 |
DEFAULT_PROVIDER |
Default AI provider | openai |
Frontend (React)
|
| REST API / SSE
v
Backend (FastAPI)
|-- API Layer: /api/chat, /api/execute, /api/models, /api/config
|-- Service Layer: AIService, CodeExecutor, ModelConverter
|-- Data Layer: SQLite (config, conversations, models)
- Natural language to CadQuery code generation via AI
- Real-time 3D model preview with model-viewer
- Monaco code editor with syntax highlighting
- Support for multiple AI providers (OpenAI, Claude, Ollama)
- Model history management
- GLB file download