A lightweight UML diagram editor for web applications
npm install @ls1intum/apollon






A UML modeling editor written in React and TypeScript.
- Select the diagram type you want to draw from the Diagram Type menu. This selection determines the availability of elements that the user can use while drawing their diagram, making it easier for users who are newly introduced to modeling.
- Adding the element is as easy as dragging it from the elements menu and dropping it to the canvas. So is drawing the connection between them, simply drag and connect two or multiple elements.
- Edit the text of any element by double-clicking on it. An easy-to-use menu will allow you to do so.
- Supports dark/light themes for the editor.
- Supports two languages: German and English.
- Supports exporting the entire diagram or just selected elements of it.
Class DiagramObject DiagramActivity DiagramUse Case DiagramCommunication DiagramComponent DiagramDeployment DiagramPetri Net DiagramReachability GraphSyntax TreeFlowchartThe GitHub repository of its Standalone version is https://github.com/ls1intum/Apollon_standalone
Install the @ls1intum/apollon npm package using either yarn or npm:
``sh`
yarn add @ls1intum/apollon
`sh`
npm install @ls1intum/apollon
Import the ApollonEditor class, which is the default export of the npm package:
`js`
import ApollonEditor from '@ls1intum/apollon';
Get hold of a DOM node and mount a new instance of the Apollon editor into it:
`js`
const container = document.getElementById("...");
const editor = new ApollonEditor(container);
To unmount the editor instance, call its destroy() method:
`js`
editor.destroy();
For a complete overview of the API, please refer to the [lib/es6/index.d.ts] file.
Apollon provides both an ESModules, as well as CommonJS version to be included.
They lay in lib/es6 and lib/es5 and the correct version should be resolved automatically.
Clone the repository and change into the Apollon directory:
``
git clone https://github.com/ls1intum/Apollon.git
cd Apollon
Install all node dependencies:
``
npm install
Launch the webpack-dev-server:
``
npm run start
The webpack-dev-server is now listening on http://localhost:8888. If you change a TypeScript file, webpack will automatically compile the code, bundle the application, and refresh the page in your browser.
``
npm install -g npm-check-updates
npm run update
To build the docs, you need pip installed. You neeed to build Apollon's type definitions before you can build the docs:
`bash`
npm run prepare
Then install necessary dependencies for the docs:
`bash`
npm run docs:prepare
You can now build the docs:
`bash`
npm run docs:build
The docs will be built and put into docs/build/html.
You can also serve the docs locally:
`bash`
npm run docs:watch
The docs will be served on localhost:8088`. This script will also watch for changes in the docs and rebuild them automatically.