A modern, web-based UML Class Diagram editor built with JointJS and Tailwind CSS. Create, edit, and generate code from your UML class diagrams with an intuitive user interface.
Live Demo: Quickly explore and test it online
-
Element Creation
- Create Classes, Interfaces, and Abstract Classes
- Drag and drop or click-to-place elements
- Edit class names, attributes, and methods
-
Relationships
- Association
- Inheritance
- Implementation
- Composition
- Aggregation
- Edit relationship multiplicities
-
Code Generation
- Generate code in multiple languages:
- Java
- Python
- PHP
- Copy generated code to clipboard
- Download generated code files
- Generate code in multiple languages:
-
Navigation
- Pan around the diagram by clicking and dragging
- Zoom in/out using Ctrl + Mouse Wheel
- Select all elements with Ctrl+A
- Save diagram as PNG with Ctrl+S
- Node.js and npm installed on your system
-
Clone the repository:
git clone git@github.com:htmou/umlcdp.git cd umlcdp
-
Install dependencies:
npm install
-
Start using the editor by opening
index.html
in your web browser
- Click on the desired element type in the sidebar (Class, Interface, or Abstract Class)
- Click on the canvas to place the element, or drag and drop from the sidebar
- Double-click an element to edit its properties:
- Change the name
- Add/edit attributes (for classes)
- Add/edit methods
- Click on the desired relationship type in the sidebar
- Click on the source element
- Click on the target element to create the relationship
- Double-click the relationship line to edit multiplicities
- Click the "Generate Code" button
- Select your target programming language
- Review the generated code
- Choose to:
- Copy code to clipboard
- Download as a file
- Go back to select a different language
- Pan: Click and drag on empty space to move around the diagram
- Zoom: Use Ctrl + Mouse Wheel to zoom in/out
- Select All: Press Ctrl+A to select all elements
- Delete: Select element(s) and press Delete key
- Save: Press Ctrl+S to save the diagram as PNG
-
Classes
- Can have attributes and methods
- Support public (+), private (-), and protected (#) members
- Example attribute:
+name: String
- Example method:
+getName(): String
-
Interfaces
- Only contain method signatures
- All methods are public
- No attributes
-
Abstract Classes
- Similar to regular classes
- Can have abstract methods
- Can have regular methods and attributes
- Association: Basic relationship between classes
- Inheritance: "is-a" relationship (extends)
- Implementation: Class implementing an interface
- Composition: Strong "has-a" relationship
- Aggregation: Weak "has-a" relationship
Ctrl + A
: Select all elementsCtrl + S
: Save diagram as PNGDelete
: Remove selected element(s)Esc
: Cancel current operation/close modal