Skip to content

A powerful browser-based 3D creation application built with "AI-First" Principles. Built with React, TypeScript, and Babylon.js. Create and modify 3D objects using natural language commands via OpenAI integration. Clean Repo = Open Source with no auth or DB.

License

Notifications You must be signed in to change notification settings

VibeCAD/gui-clean

Moorph GUI Clean

A powerful, browser-based 3D CAD application that enables users to create and manipulate 3D objects with AI assistance. Built with React, TypeScript, Babylon.js, and powered by OpenAI's API through an MCP (Model Context Protocol) server.

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • OpenAI API key (for AI features)

Installation

  1. Clone the repository

    git clone https://github.com/VibeCAD/gui-clean.git
    cd gui-clean
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Open your browser Navigate to http://localhost:5173

Configuration

When you first launch the application, you'll be prompted to enter your OpenAI API key. This enables the AI-powered scene manipulation features.

Note: Your API key is stored locally in your browser and never sent to external servers.

โœจ Features

๐ŸŽฏ 3D Creation: Primitives (cube, sphere, cylinder, etc.) and housing elements with full transform controls
๐Ÿค– AI Integration: Natural language commands for scene manipulation via OpenAI API
๐Ÿ› ๏ธ Professional Tools: Multi-select, snap-to-grid, camera controls, wireframe mode
๐ŸŽจ Modern UI: Dropdown toolbar, real-time status, keyboard shortcuts, responsive design

๐Ÿ—๏ธ Architecture

Core Technologies

  • Frontend: React 18 + TypeScript + Vite
  • 3D Engine: Babylon.js for WebGL rendering
  • State Management: Zustand for application state
  • AI Integration: OpenAI API with MCP Server
  • Styling: Custom CSS with modern design system

Key Components

  • useBabylonScene: Main hook managing 3D scene lifecycle
  • SceneStore: Centralized state management for 3D objects
  • AISidebar: AI-powered natural language interface
  • GizmoManager: Interactive 3D transform controls
  • ObjectFactory: 3D primitive and housing creation system

๐ŸŽฎ Usage

Creating Objects

  1. Click Create in the toolbar
  2. Select from Primitives or Housing elements
  3. Object appears in the 3D scene at a random position
  4. Use transform tools to position and modify

AI Commands

  1. Open the AI sidebar (right panel)
  2. Enter natural language commands like:
    • "Create a red cube next to the sphere"
    • "Make all objects blue"
    • "Arrange objects in a circle"
    • "Delete everything except the house"

Transform Operations

  1. Select an object in the 3D scene
  2. Choose transform mode: Select, Move, Rotate, or Scale
  3. Use gizmo handles for precise manipulation
  4. Hold Ctrl for multi-select operations

Camera Navigation

  • Mouse: Left-click and drag to rotate
  • Wheel: Zoom in/out
  • Toolbar: Quick camera positions (Front, Top, etc.)

๐Ÿ”ง Development

Project Structure

src/
โ”œโ”€โ”€ babylon/          # Babylon.js integration
โ”‚   โ”œโ”€โ”€ hooks/       # React hooks for 3D scene
โ”‚   โ”œโ”€โ”€ objectFactory.ts
โ”‚   โ”œโ”€โ”€ sceneManager.ts
โ”‚   โ””โ”€โ”€ gizmoManager.ts
โ”œโ”€โ”€ components/       # React components
โ”‚   โ””โ”€โ”€ sidebar/     # AI and properties panels
โ”œโ”€โ”€ state/           # State management
โ”‚   โ””โ”€โ”€ sceneStore.ts
โ”œโ”€โ”€ types/           # TypeScript definitions
โ””โ”€โ”€ ai/              # AI service integration

Key Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm run lint         # Run ESLint

๐ŸŒŸ Why "Clean"?

This repository represents a clean, open-source version of the Moorph GUI platform:

  • โŒ No Authentication: No login/signup required
  • โŒ No Database: No server-side data persistence
  • โŒ No Cloud Services: Runs entirely in the browser
  • โœ… Pure 3D Creation: Focus on core 3D manipulation features
  • โœ… AI Integration: Full OpenAI API support
  • โœ… Open Source: MIT licensed for community development

Perfect for developers who want to:

  • Learn 3D web development with Babylon.js
  • Integrate AI into 3D applications
  • Build upon a solid CAD foundation
  • Contribute to open-source 3D tools

๐Ÿค Contributing

We welcome contributions! This clean version is designed for community development:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

๐Ÿ“ License

MIT License - see LICENSE file for details.


Built with โค๏ธ by Moorph Labs

Transform your 3D ideas into reality with the power of AI and modern web technologies.

About

A powerful browser-based 3D creation application built with "AI-First" Principles. Built with React, TypeScript, and Babylon.js. Create and modify 3D objects using natural language commands via OpenAI integration. Clean Repo = Open Source with no auth or DB.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages