From f03a2d78524449ea557ab54f6d7916d817801a04 Mon Sep 17 00:00:00 2001 From: Artem Kozachenko Date: Sat, 21 Mar 2026 14:48:12 +0200 Subject: [PATCH 1/2] onboarding documentation for Excalidraw project --- ONBOARDING.md | 751 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 751 insertions(+) create mode 100644 ONBOARDING.md diff --git a/ONBOARDING.md b/ONBOARDING.md new file mode 100644 index 0000000..9aff8bd --- /dev/null +++ b/ONBOARDING.md @@ -0,0 +1,751 @@ +# Excalidraw — New Engineer Onboarding Guide + +Welcome to the Excalidraw project! This guide will help you understand the codebase, get set up for development, and feel productive as quickly as possible. + +--- + +## Table of Contents + +1. [What Is Excalidraw?](#1-what-is-excalidraw) +2. [Repository at a Glance](#2-repository-at-a-glance) +3. [Package Dependency Graph](#3-package-dependency-graph) +4. [Getting Started](#4-getting-started) +5. [Package Deep-Dives](#5-package-deep-dives) +6. [The Web Application](#6-the-web-application) +7. [Architecture — How It All Works](#7-architecture--how-it-all-works) +8. [State Management](#8-state-management) +9. [Rendering Pipeline](#9-rendering-pipeline) +10. [Collaboration Architecture](#10-collaboration-architecture) +11. [Persistence & Storage](#11-persistence--storage) +12. [Testing](#12-testing) +13. [Build System](#13-build-system) +14. [Key Workflows](#14-key-workflows) +15. [Where to Find Things](#15-where-to-find-things) +16. [Glossary](#16-glossary) + +--- + +## 1. What Is Excalidraw? + +Excalidraw is an open-source, browser-based whiteboard tool for sketching hand-drawn-style diagrams. It lives at [excalidraw.com](https://excalidraw.com) and is also published as an embeddable React component (`@excalidraw/excalidraw`) that other applications can integrate. + +**There are two distinct products in this repo:** + +| Product | Description | Audience | +|---|---|---| +| `@excalidraw/excalidraw` (npm) | Embeddable React component library | Third-party developers | +| excalidraw.com app | Full-featured collaborative whiteboard | End users | + +Both live in the same monorepo and share the same underlying code. + +--- + +## 2. Repository at a Glance + +``` +excalidraw-master/ +├── packages/ +│ ├── excalidraw/ ← @excalidraw/excalidraw (main React component, npm published) +│ ├── common/ ← @excalidraw/common (shared constants, utils, colors) +│ ├── element/ ← @excalidraw/element (element types, rendering, history) +│ ├── math/ ← @excalidraw/math (2D geometry primitives) +│ └── utils/ ← @excalidraw/utils (export utilities for host apps) +│ +├── excalidraw-app/ ← excalidraw.com (private app, NOT published to npm) +│ +├── examples/ +│ ├── with-nextjs/ ← Next.js integration example +│ └── with-script-in-browser/ ← plain HTML /