How jgraph/drawio works
draw.io is a browser-based diagramming and whiteboarding application. A user opens the editor, manipulates a graph, applies layout and routing behavior, then saves or exports the resulting diagram. Storage supports browser-backed files and multiple cloud providers; the tree also shows importers, stencil libraries, authentication servlets, and offline caching. The graph emphasizes sampled runtime relationships and documents unsampled integrations by their exact enclosing paths; some optional provider links are therefore dashed.
Main entry points: EditorUi.js Editor UI · mxGraph.js Graph Engine · StorageFile.js File Persistence · App.js Application Shell
Components 26
Editor Entry
- Application Shell
src/main/webapp/js/diagramly/App.js - Editor UI
src/main/webapp/js/diagramly/EditorUi.js - Editor Controller
src/main/webapp/js/diagramly/Editor.js
Graph Editing
- Graph Engine
src/main/webapp/mxgraph/src/view/mxGraph.js - Edge Editing
src/main/webapp/mxgraph/src/handler/mxEdgeHandler.js - Automatic Layout
src/main/webapp/mxgraph/src/view/mxLayoutManager.js - Swimlane Sizing
src/main/webapp/mxgraph/src/view/mxSwimlaneManager.js - Undo History
src/main/webapp/mxgraph/src/util/mxUndoManager.js - Edge Routing
src/main/webapp/js/libavoid-js/libavoid-routing.js
Content Features
- Stencil Palettes
src/main/webapp/js/diagramly/sidebar/Sidebar.js - Diagram Importers
src/main/webapp/js/vsdxImporter.js - Diagram Export
src/main/webapp/js/export.js
Storage Integrations
- File Persistence
src/main/webapp/js/diagramly/StorageFile.js - Library Persistence
src/main/webapp/js/diagramly/StorageLibrary.js - Drive Storage
src/main/webapp/js/diagramly/DriveClient.js - Dropbox Storage
src/main/webapp/js/diagramly/DropboxClient.js - GitHub Storage
src/main/webapp/js/diagramly/GitHubClient.js - GitLab Storage
src/main/webapp/js/diagramly/GitLabClient.js - OneDrive Storage
src/main/webapp/js/diagramly/OneDriveClient.js
Platform Services
- Browser Storage
- Offline Cache
src/main/webapp/service-worker.js - Auth Servlets
src/main/server/java/com/mxgraph/online/GoogleAuthServlet.java
Other components
- Diagram User
- Cloud Providers
- Identity Providers
- Web Browser
Connections 28
- Diagram User → Application Shell: opens editor
- Application Shell → Editor UI: starts UI
- Editor UI → Editor Controller: controls editor
- Editor Controller → Graph Engine: edits graph
- Graph Engine → Edge Editing: creates handlers
- Graph Engine → Automatic Layout: dispatches changes
- Graph Engine → Swimlane Sizing: dispatches changes
- Graph Engine → Undo History: emits edits
- Edge Editing → Edge Routing: routes edges
- Editor UI → Stencil Palettes: loads palettes
- Editor UI → Diagram Importers: imports diagrams
- Editor UI → Diagram Export: exports diagrams
- Editor UI → File Persistence: saves files
- File Persistence → Browser Storage: reads writes
- Library Persistence → File Persistence: specializes persistence
- Editor UI → Drive Storage: uses storage
- Editor UI → Dropbox Storage: uses storage
- Editor UI → GitHub Storage: uses storage
- Editor UI → GitLab Storage: uses storage
- Editor UI → OneDrive Storage: uses storage
- Drive Storage → Cloud Providers: syncs files
- Dropbox Storage → Cloud Providers: syncs files
- GitHub Storage → Cloud Providers: syncs files
- GitLab Storage → Cloud Providers: syncs files
- OneDrive Storage → Cloud Providers: syncs files
- Auth Servlets → Identity Providers: authenticates users
- Web Browser → Offline Cache: runs worker
- Offline Cache → Browser Storage: caches assets