-
Notifications
You must be signed in to change notification settings - Fork 37
Add documentation #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SmachuloTetiana
wants to merge
1
commit into
koldovsky:main
Choose a base branch
from
SmachuloTetiana:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| # Excalidraw | ||
|
|
||
| <div align="center"> | ||
| <p> | ||
| <strong>Virtual whiteboard for sketching hand-drawn like diagrams.</strong><br/> | ||
| Collaborative and end-to-end encrypted. | ||
| </p> | ||
| </div> | ||
|
|
||
| [](LICENSE) | ||
| [](https://www.npmjs.com/package/@excalidraw/excalidraw) | ||
| [](https://docs.excalidraw.com/docs/introduction/contributing) | ||
| [](https://discord.gg/UexuTaE) | ||
|
|
||
| ## Features | ||
|
|
||
| - 💯 Free & open-source | ||
| - 🎨 Infinite, canvas-based whiteboard | ||
| - ✍️ Hand-drawn style rendering | ||
| - 🌓 Dark mode | ||
| - 🏗️ Highly customizable | ||
| - 📷 Image support | ||
| - 😀 Shape libraries | ||
| - 🌐 Localization (i18n) | ||
| - 🖼️ Export to PNG, SVG & clipboard | ||
| - 💾 Open format (.excalidraw JSON) | ||
| - ⚒️ Tools: rectangle, circle, diamond, arrow, line, free-draw, eraser, text | ||
| - ➡️ Arrow-binding & labeled arrows | ||
| - 🔙 Undo/Redo | ||
| - 🔍 Zoom and panning | ||
|
|
||
| ### [excalidraw.com](https://excalidraw.com) extras | ||
|
|
||
| - 📡 PWA support (offline) | ||
| - 🤼 Real-time collaboration | ||
| - 🔒 End-to-end encryption | ||
| - 💾 Local-first (browser autosave) | ||
| - 🔗 Shareable links | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| packages/ | ||
| ├── excalidraw/ # @excalidraw/excalidraw - Main React component (npm package) | ||
| ├── common/ # @excalidraw/common - Shared utilities and constants | ||
| ├── element/ # @excalidraw/element - Element manipulation logic | ||
| ├── math/ # @excalidraw/math - Math utilities and types | ||
| └── utils/ # @excalidraw/utils - Export utilities | ||
|
|
||
| excalidraw-app/ # Production app (excalidraw.com) | ||
| examples/ | ||
| ├── with-nextjs/ # Next.js integration example | ||
| └── with-script-in-browser/ # Browser script example | ||
| dev-docs/ # Documentation site (Docusaurus) | ||
| scripts/ # Build and release scripts | ||
| ``` | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### Using the npm Package | ||
|
|
||
| ```bash | ||
| npm install react react-dom @excalidraw/excalidraw | ||
| # or | ||
| yarn add react react-dom @excalidraw/excalidraw | ||
| ``` | ||
|
|
||
| ```tsx | ||
| import { Excalidraw } from "@excalidraw/excalidraw"; | ||
|
|
||
| function App() { | ||
| return ( | ||
| <div style={{ height: "500px" }}> | ||
| <Excalidraw /> | ||
| </div> | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| See the [installation docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/installation) for more details. | ||
|
|
||
| ## Development | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Node.js](https://nodejs.org/) | ||
| - [Yarn](https://yarnpkg.com/) (v1 or v2.4.2+) | ||
| - [Git](https://git-scm.com/) | ||
|
|
||
| ### Setup | ||
|
|
||
| ```bash | ||
| git clone https://github.com/excalidraw/excalidraw.git | ||
| cd excalidraw | ||
| yarn | ||
| yarn start | ||
| ``` | ||
|
|
||
| Open [http://localhost:3000](http://localhost:3000) to start developing. | ||
|
|
||
| ### Commands | ||
|
|
||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `yarn start` | Start development server | | ||
| | `yarn test:typecheck` | TypeScript type checking | | ||
| | `yarn test:update` | Run all tests (with snapshot updates) | | ||
| | `yarn fix` | Auto-fix formatting and linting | | ||
| | `yarn start:example` | Start example app on port 3001 | | ||
|
|
||
| ### Architecture | ||
|
|
||
| - **Yarn workspaces** for monorepo management | ||
| - **Vite** for app bundling, **esbuild** for packages | ||
| - **Jotai** for state management | ||
| - **Vitest** for testing | ||
| - **TypeScript** with strict configuration | ||
|
|
||
| ### Package Development | ||
|
|
||
| Work in `packages/*` for editor features, `excalidraw-app/` for app-specific features. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| ### Core | ||
|
|
||
| | Package | Purpose | | ||
| |---------|---------| | ||
| | `react` | UI framework | | ||
| | `jotai` | State management | | ||
| | `roughjs` | Hand-drawn rendering | | ||
| | `perfect-freehand` | Freehand drawing | | ||
| | `nanoid` | ID generation | | ||
| | `pako` | Compression | | ||
|
|
||
| ### Build & Dev | ||
|
|
||
| | Package | Purpose | | ||
| |---------|---------| | ||
| | `vite` | App bundler | | ||
| | `esbuild` | Package bundler | | ||
| | `typescript` | Type checking | | ||
| | `vitest` | Testing | | ||
| | `eslint`, `prettier` | Code quality | | ||
|
|
||
| ## Contributing | ||
|
|
||
| 1. Fork and clone the repo | ||
| 2. Run `yarn` to install dependencies | ||
| 3. Create a branch: `git checkout -b your-branch-name` | ||
| 4. Make changes and run `yarn test:update` | ||
| 5. Submit a PR with semantic prefix: `feat:`, `fix:`, `docs:`, `refactor:`, etc. | ||
|
|
||
| See the [contribution guide](https://docs.excalidraw.com/docs/introduction/contributing) for details. | ||
|
|
||
| ## Documentation | ||
|
|
||
| - [Full Documentation](https://docs.excalidraw.com) | ||
| - [API Reference](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api) | ||
| - [Integration Guide](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration) | ||
|
|
||
| ## Integrations | ||
|
|
||
| - [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor) | ||
| - [npm Package](https://www.npmjs.com/package/@excalidraw/excalidraw) | ||
|
|
||
| ## Who's Using Excalidraw | ||
|
|
||
| Google Cloud • Meta • CodeSandbox • Obsidian • Replit • Slite • Notion • HackerRank | ||
|
|
||
| ## Support | ||
|
|
||
| - [Report Issues](https://github.com/excalidraw/excalidraw/issues) | ||
| - [Discord](https://discord.gg/UexuTaE) | ||
| - [Open Collective](https://opencollective.com/excalidraw) | ||
|
|
||
| ## License | ||
|
|
||
| [MIT](LICENSE) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language identifier to the fenced block (markdownlint MD040).
At Line 42, the code fence is missing a language, which will trip markdownlint. Use
textfor the tree diagram.🛠️ Proposed fix
Verify each finding against the current code and only fix it if needed.
In
@PROJECT_DOCUMENTATION.mdaround lines 42 - 56, The fenced code blockcontaining the repository tree diagram (the triple-backtick block with the
packages/ ├── excalidraw/ ... scripts/ listing) is missing a language
identifier; add "text" immediately after the opening ``` so the block becomes