How ibrahimibrahimi/excalidraw works
Excalidraw is a hand-drawn whiteboard editor, with the hosted app adding local-first persistence, shareable links, and encrypted real-time collaboration. Users create and manipulate diagrams in the editor, then save locally, export/share, or collaborate. The graph separates the app shell, editor interaction/rendering, data handling, and hosted-app capabilities. Some subsystems are represented from README claims and the source index; their internal wiring is omitted where excerpts do not establish it.
Main entry points: excalidraw-app/App.tsx App shell · components/App.tsx Editor canvas · Collab.tsx Collaboration session · firebase.ts Firebase persistence
Components 24
Hosted App
- App shell
excalidraw-app/App.tsx - App state
excalidraw-app/app-jotai.ts - App settings
excalidraw-app/app_constants.ts
Editor Runtime
- Editor canvas
packages/excalidraw/components/App.tsx - Action manager
packages/excalidraw/actions/manager.tsx - Element manipulation
packages/element/src/dragElements.ts - Viewport controls
packages/excalidraw/viewport.ts - Editor state
packages/excalidraw/appState.ts - Localization
packages/excalidraw/i18n.ts - Clipboard
packages/excalidraw/clipboard.ts - Shape library
packages/excalidraw/data/library.ts
Scene Data
- Scene restore
packages/excalidraw/data/restore.ts - Image files
excalidraw-app/data/FileManager.ts - Local persistence
excalidraw-app/data/LocalData.ts - Browser storage
excalidraw-app/data/localStorage.ts - Scene import/export
excalidraw-app/data/index.ts - File status
excalidraw-app/data/fileStatusStore.ts
Sharing & Sync
- Collaboration session
excalidraw-app/collab/Collab.tsx - Firebase persistence
excalidraw-app/data/firebase.ts - Tab synchronization
excalidraw-app/data/tabSync.ts - Share dialog
excalidraw-app/share/ShareDialog.tsx
Other components
- Diagram user
- Share backend
- Collaborators
Connections 28
- Diagram user → App shell: opens
README.md - App shell → Editor canvas: hosts
excalidraw-app/App.tsx - App shell → App state: provides store
excalidraw-app/App.tsx - App shell → Scene import/export: imports and exports
excalidraw-app/App.tsx - App shell → Image files: updates file status
excalidraw-app/App.tsx - App shell → Firebase persistence: loads shared files
excalidraw-app/App.tsx - Editor canvas → Action manager: dispatches
packages/excalidraw/components/App.tsx - Editor canvas → Element manipulation: manipulates elements
- Editor canvas → Viewport controls: controls view
packages/excalidraw/components/App.tsx - Editor canvas → Editor state: maintains state
packages/excalidraw/components/App.tsx - Editor canvas → Clipboard: supports clipboard
README.md - Editor canvas → Shape library: supports shape libraries
README.md - Editor canvas → Localization: localizes interface
packages/excalidraw/components/App.tsx - Editor canvas → Scene restore: restores elements
packages/excalidraw/components/App.tsx - App shell → Local persistence: autosaves locally
README.md - Local persistence → Browser storage: reads and writes
excalidraw-app/data/LocalData.ts - App shell → File status: checks pending files
excalidraw-app/App.tsx - Image files → Firebase persistence: stores image files
- App shell → Collaboration session: starts collaboration
excalidraw-app/App.tsx - Collaboration session → Scene import/export: gets syncable elements
excalidraw-app/collab/Collab.tsx - Collaboration session → Firebase persistence: loads and saves scenes
excalidraw-app/collab/Collab.tsx - Collaboration session → Browser storage: saves username
excalidraw-app/collab/Collab.tsx - Collaboration session → Collaborators: syncs scene
README.md - App shell → Share dialog: offers sharing
README.md - App shell → Share backend: exports share link
excalidraw-app/App.tsx - Scene import/export → Firebase persistence: uploads share files
excalidraw-app/data/index.ts - Tab synchronization → Browser storage: coordinates tabs
- App settings → Collaboration session: defines sync events
excalidraw-app/collab/Collab.tsx