A seamless integration between Excalidraw (collaborative whiteboarding) and Box (cloud storage) that allows users to create, edit, and auto-save Excalidraw drawings directly from their Box account.
- 🎨 Native Excalidraw Editor: Full-featured drawing experience with all Excalidraw tools
- 💾 Auto-Save: Intelligent debouncing saves changes after 5 seconds of inactivity or 60 seconds maximum
- 🖼️ Image Support: Embedded images are preserved with base64 encoding
- 🔐 Secure OAuth: Uses Box OAuth2 for secure authentication
- 🔄 Real-time Sync: Changes are automatically saved back to Box
- 📱 Toast Notifications: Native Excalidraw notifications for save status
- 🌐 Client-Side Only: No server required - runs entirely in the browser
Try it live: [Your GitHub Pages URL]
- Go to the Box Developer Console
- Click "Create New App"
- Choose "Custom App" and click "Next"
- Select "User Authentication (OAuth 2.0)" and click "Next"
- Give your app a name (e.g., "Excalidraw Integration") and click "Create App"
- In your Box app settings, go to the "Configuration" tab
- Under "OAuth 2.0 Redirect URI", add your domain:
https://yourdomain.github.io/excalidraw-box/ - Under "Application Scopes", ensure these are checked:
- ✅ Read all files and folders stored in Box
- ✅ Write all files and folders stored in Box
- Under "CORS Domains", add your domain under Allowed origins
https://yourdomain.github.io - Under Box Web Integrations, you'll create 2 web integrations: "Edit with Excalidraw" and "View with Excalidraw" due to the vagaries of how locking works with Box web integrations. For each specify
- Name: "Edit or View with Excalidraw"
- Description: "Edit or View your diagram in excalidraw"
- Limit support to specific extentions: "excalidraw"
- Permissions Requirement: For the Edit flavor select "Full permissions are required", for the View flavor select: "Download permissions are required"
- Scopes: The file / folder from which this integration was invoked
- For the Edit flavor select "Lock to only allow the current user..."
- Client callback url: https://yourusername.github.io/excalidraw-box
- Prompt: "Your file will now be opened in excalidraw"
- New window settings: Enable the integration will open in a new tab
- Callback parameters:
- GET fileId #file_id#
- GET authCode #auth_code#
- Click "Save Changes"
- In the "Configuration" tab, note down:
- Client ID: Found under "OAuth 2.0 Credentials"
- Client Secret: Found under "OAuth 2.0 Credentials"
-
Clone this repository:
git clone https://github.com/yourusername/excalidraw-box.git cd excalidraw-box -
See credentials.json.md For instructions on how to setup your credentials
-
Deploy to GitHub Pages or your preferred hosting platform
- In Box, go to Admin Console → Apps → Custom Apps Manager
- Find your app and click "Authorize"
- Go to Apps → App Integrations
- Click "Add Integration"
- Fill in the integration details:
- Name: Excalidraw Editor
- Description: Edit drawings with Excalidraw
- Integration URL:
https://yourdomain.github.io/excalidraw-box/ - File Extensions:
.excalidraw - Supported Integrations: ✅ Open With
- In Box, click "New" → "More" → "Excalidraw Drawing" (if configured)
- Or create any file with
.excalidrawextension and open it
- Right-click any
.excalidrawfile in Box - Select "Open With" → "Excalidraw Editor"
- The drawing will open in the integrated editor
- Changes are automatically detected and saved
- Saves occur after 5 seconds of inactivity
- Maximum save interval is 60 seconds (even during continuous editing)
- Save status is shown via toast notifications
- Embedded images are preserved with full fidelity
- Frontend: Single HTML file with CDN dependencies
- Drawing Engine: Excalidraw 0.18.0 (configurable in versions.json)
- Authentication: Box OAuth 2.0
- Storage: Box Content API
- Image Handling: Base64 encoding for embedded files
- Deployment: GitHub Actions with credential injection
Drawings are saved as JSON files with the structure:
{
"type": "excalidraw",
"version": 2,
"elements": [...],
"appState": {...},
"files": {
"fileId": {
"dataURL": "data:image/png;base64,..."
}
}
}- Modern browsers with ES6 module support
- Chrome 61+, Firefox 60+, Safari 11+, Edge 16+
- Clone the repository
- Serve the files over HTTPS (required for Box OAuth):
npx http-server -S -p 8080
- Update Box OAuth redirect URI to
https://localhost:8080
excalidraw-box/
├── index.html # Main application file
├── README.md # This file
└── .gitignore # Git ignore rules
"No authorization code" error
- Ensure you're launching from Box using "Open With"
- Check that OAuth redirect URI matches exactly
Images not saving/loading
- Verify file permissions in Box
- Check browser console for serialization errors
Authentication failures
- Confirm Client ID and Secret are correct
- Ensure app is authorized in Box Admin Console
Add ?debug=true to the URL to enable verbose console logging:
https://yourdomain.github.io/excalidraw-box/?debug=true&fileId=123&authCode=abc
- Fork the repository
- Create a feature branch
- Make your changes
- Test with your Box integration
- Submit a pull request
MIT License - see LICENSE file for details
- 📧 Create an issue on GitHub
- 📖 Check Box Developer Documentation
- 🎨 Refer to Excalidraw Documentation
Built with ❤️ using Excalidraw and Box Platform