A Git-like version control system for CAD files, built with Go, Vue.js, PostgreSQL, and MinIO, inspired by AllSpice.io.
This system brings Git-like version control to CAD workflows, enabling teams to:
- Branch designs for parallel development
- Commit versions with full history tracking
- Merge changes with visual 3D diff viewers
- Review geometry changes before merging
- Collaborate with comments and approvals
Manage all your CAD projects in one place with an intuitive card-based interface.
Start a new CAD project with a name and description.
Upload STL files with commit messages, just like Git.
Request to merge changes from one branch to another, with automatic conflict detection.
See detected conflicts with options to view 3D diffs or mark as resolved.
Side-by-side 3D comparison of CAD files with synchronized camera controls.
┌─────────────────┐
│ Vue Frontend │ ← Modern UI with 3D viewers
└────────┬────────┘
│ REST API
┌────────▼────────┐
│ Go API Server │ ← Version control logic
└────────┬────────┘
│
┌────┴─────┬──────────┬──────────┐
▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌──────────┐
│Postgres│ │ MinIO │ │ Redis │ │ RabbitMQ │
└────────┘ └────────┘ └────────┘ └──────────┘
Metadata Files Cache Async Jobs
Backend:
- Go 1.21+ - High-performance API server
- Chi Router - Lightweight HTTP router
- PostgreSQL 15 - ACID-compliant version history
- MinIO - S3-compatible object storage
- Redis - Caching layer for performance
- RabbitMQ - Message queue for async operations
Frontend:
- Vue 3 - Reactive UI framework with Composition API
- Tailwind CSS - Utility-first styling
- Three.js - 3D rendering for STL files
- Pinia - State management
- Vue Router - Client-side routing
- Axios - HTTP client
Infrastructure:
- Docker & Docker Compose - Containerization
- Kubernetes-ready - Scalable deployment
- Docker Desktop or Colima
- Node.js 18+ (via NVM recommended)
- Go 1.21+ (optional, for local development)
- Clone the repository
git clone https://github.com/rhblitstein/cad-version-control.git
cd cad-version-control- Start the backend services
# Start Postgres, MinIO, Redis, RabbitMQ, and API
docker-compose up -d
# Wait ~30 seconds for services to initialize
docker-compose ps # All should show "healthy"- Start the frontend
cd frontend
npm install
npm run dev- Open your browser
http://localhost:5173
| Service | URL | Credentials |
|---|---|---|
| Frontend | http://localhost:5173 | - |
| API | http://localhost:8080 | - |
| MinIO Console | http://localhost:9001 | minioadmin / minioadmin |
| RabbitMQ Management | http://localhost:15672 | caduser / cadpass |
| PostgreSQL | localhost:5432 | caduser / cadpass / cadversion |
- Click "Create Project"
- Enter name and description
- Project appears in the grid
- Click into a project
- Click "Create Branch"
- Optionally fork from existing branch
- Click "New Commit"
- Select branch
- Add commit message
- Upload STL files
- Files are deduplicated by SHA-256 checksum
- Navigate to "Merge Requests"
- Create MR between branches
- System detects conflicts automatically
- View 3D diffs side-by-side
- Synchronized camera controls
- Add comments and approvals
- Resolve conflicts
- Merge when ready
- Git-like branching model (DAG)
- Commit history with parent linkage
- File deduplication via content hashing
- Branch protection (via merge requests)
- STL file rendering with Three.js
- Wireframe/solid toggle
- Orbit controls with damping
- Side-by-side diff viewer
- Synchronized cameras
- Merge request workflow
- Comment threads
- Approval system
- Conflict detection
- Manual conflict resolution
- Redis caching for branch HEADs
- Content-addressable storage
- Lazy loading for file lists
- Optimistic UI updates
Key tables:
projects- Top-level containersbranches- Git-like branches with HEAD pointerscommits- Version snapshots forming a DAGfiles- Logical file identitiesfile_versions- Content snapshots at commitsmerge_requests- Branch merge workflowmerge_conflicts- Conflict trackingcomments&approvals- Collaboration
cd backend
# Run locally (without Docker)
export DB_HOST=localhost
export MINIO_ENDPOINT=localhost:9000
# ... set other env vars
go run cmd/api/main.go
# Run tests
go test ./...
# Build
go build -o api cmd/api/main.gocd frontend
# Install dependencies
npm install
# Start dev server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview# Rebuild services
docker-compose up -d --build
# View logs
docker-compose logs -f api
# Stop everything
docker-compose down
# Remove volumes (clean slate)
docker-compose down -vPOST /api/projects- Create projectGET /api/projects- List all projectsGET /api/projects/{id}- Get project details
POST /api/projects/{project_id}/branches- Create branchGET /api/projects/{project_id}/branches- List branchesGET /api/branches/{id}- Get branch details
POST /api/projects/{project_id}/commits- Create commit (multipart)GET /api/commits/{id}- Get commit detailsGET /api/branches/{branch_id}/commits- List commits
GET /api/file-versions/{id}/download- Download fileGET /api/files/{id}/versions- List file versions
POST /api/merge-requests- Create MRGET /api/merge-requests- List MRs (filterable)GET /api/merge-requests/{id}- Get MR detailsPOST /api/merge-requests/{id}/approve- Approve MRPOST /api/merge-requests/{id}/merge- Execute merge
GET /api/merge-requests/{id}/conflicts- List conflictsGET /api/conflicts/{id}/diff- Get geometric diffPOST /api/conflicts/{id}/resolve- Mark resolved
Demo: STL files are triangle meshes - simple to parse and render in browsers with Three.js.
Production: Would need geometry kernels (Parasolid, OpenCascade) to parse native CAD formats (STEP, SOLIDWORKS) and preserve parametric design intent.
Demo: SHA-256 comparison is fast and reliable for detecting changes.
Production: Would add geometric analysis to quantify changes (vertices moved, faces added/removed) and enable intelligent auto-merging.
Demo: Keeps logic simple - user chooses which version to keep.
Production: Could implement 3-way geometric merging for non-overlapping changes, similar to Git's text merging but for 3D geometry.
Demo: Simple deployment, ACID guarantees for correctness.
Production: Would add read replicas for scaling, partitioning for large tables, and connection pooling (PgBouncer).
Current (Demo):
- No authentication/authorization
- No rate limiting
- Single API server (no horizontal scaling)
- STL only (no native CAD formats)
- Manual conflict resolution only
- No file locking
- No branch permissions
Future Enhancements:
- WebSocket real-time updates
- Native CAD format support (STEP, IGES)
- Intelligent geometric merging
- ML-powered conflict suggestions
- CAD tool plugins (SOLIDWORKS, Inventor)
- Multi-tenant architecture
- Advanced analytics
# Backend
cd backend
go test ./...
# Frontend
cd frontend
npm run test
# Integration tests
# (requires running services)
./scripts/integration_test.shRebecca Blitstein
- GitHub: @rhblitstein
- LinkedIn: Rebecca Blitstein
- Built as a technical demonstration for AllSpice.io
- Thanks to the Go, Vue, and Three.js communities
⚡ This project demonstrates:
- Distributed version control (Git internals)
- 3D geometry handling and visualization
- Real-time collaboration patterns
- Scalable architecture design
- Modern full-stack development (Go + Vue + PostgreSQL)





