CAD Version Control System
Git for CAD files. Branch designs, merge geometry, resolve conflicts with 3D diffs. Built with Go, Vue.js, PostgreSQL, and MinIO.
View on GitHub →What It Does
This system brings Git-like version control to CAD workflows. Engineers can branch designs for parallel development, commit versions with full history tracking, and merge changes with visual 3D diff viewers - all the things you'd expect from version control, but for physical geometry instead of text files.
The key feature is the 3D diff viewer: side-by-side comparison of CAD files with synchronized camera controls. When you're reviewing whether to merge a design change, you can literally see what changed in 3D space. No more guessing if that hole moved 2mm or 20mm.
Key Features
- Git-like branching model: DAG-based commits with parent linkage and branch protection via merge requests
- 3D visualization: STL file rendering with Three.js, wireframe/solid toggle, and synchronized diff viewing
- Smart file storage: Content-addressable storage with SHA-256 deduplication - same file uploaded twice only stores once
- Merge request workflow: Comment threads, approval system, automatic conflict detection
- Performance optimizations: Redis caching for branch HEADs, lazy loading for file lists, optimistic UI updates
Tech Stack
Backend:
- Go 1.21+ - High-performance API server with Chi router
- PostgreSQL 15 - ACID-compliant version history storage
- MinIO - S3-compatible object storage for CAD files
- Redis - Caching layer for performance
- RabbitMQ - Message queue for async operations
Frontend:
- Vue 3 - Composition API with Pinia state management
- Three.js - 3D rendering for STL files
- Tailwind CSS - Because writing CSS is for people with more patience than me
The Story
I built this to understand how Git actually works under the hood - not just the commands, but the data structures and algorithms that make distributed version control possible. Reading about DAGs and content-addressable storage is one thing. Building your own version control system from scratch is another.
The CAD angle made it more interesting than yet another todo app. Plus, it gave me an excuse to dive into 3D geometry handling and Three.js, which I'd been wanting to learn properly.
Technical Highlights
The architecture follows a clean separation: Go API server handles all version control logic, PostgreSQL stores metadata in a proper relational schema (projects, branches, commits, files, merge requests), MinIO stores the actual CAD files using content-addressable storage, and Redis caches frequently-accessed data like branch HEADs.
Conflict detection is currently checksum-based - if the same file path has different SHA-256 hashes in the source and target branches, it's a conflict. Production would add geometric analysis to quantify changes (vertices moved, faces added/removed) and enable intelligent auto-merging for non-overlapping modifications.
The 3D diff viewer was particularly fun to build. It uses Two Three.js scenes rendered side-by-side, with synchronized OrbitControls so rotating one view rotates both. Simple concept, surprisingly satisfying to use.
Design Decisions
Some choices were pragmatic for the demo scope: single Postgres instance instead of read replicas, manual conflict resolution instead of geometric merging, no authentication layer. Others were architectural decisions I'd keep in production: content-addressable storage for deduplication, DAG-based commit structure, separation of file identity from file content.
The whole system is Dockerized for easy deployment and could scale horizontally with minimal changes - add a load balancer in front of multiple API servers, use Postgres read replicas for queries, and you're most of the way there.
What I Learned
This project forced me to really understand Git's internals - not just how to use it, but how it works under the hood. Building a version control system from scratch makes you appreciate how elegant Git's DAG model is for representing history.
I also got deep into Three.js and 3D rendering concepts I'd only touched superficially before. Turns out rendering wireframes and handling camera synchronization across multiple viewports is its own rabbit hole.
Most importantly: scope management. This could have been a six-month project if I tried to build every feature. Knowing what to cut, what to simplify, and what to document as "production would need X" is its own skill.
View Project on GitHub →