A decentralized diagram editor built on DrawIO with Arkiv blockchain storage integration. Store your diagrams permanently on the blockchain with cryptographic security.
- Blockchain Storage: Store diagrams permanently on Arkiv blockchain
- DrawIO Integration: Full-featured diagram editor with all DrawIO capabilities
- Multiple Authentication: Support for MetaMask wallet, custodial accounts, and guest mode
- Decentralized: No central server required for diagram storage
- Secure: End-to-end encryption and blockchain immutability
- Free & Open Source: MIT licensed, community-driven development
- Docker and Docker Compose
- Node.js 18+ (for development)
- Bun runtime (preferred package manager)
- Clone the repository:
git clone https://github.com/m00npl/drawiodb.git
cd drawiodb- Copy environment configuration:
cp .env.example .env- Configure your environment variables in
.env:
# Arkiv Configuration (Kaolin Testnet)
GOLEM_CHAIN_ID=60138453025
GOLEM_PRIVATE_KEY=your_private_key_here
GOLEM_RPC_URL=https://kaolin.hoodi.arkiv.network/rpc
GOLEM_WS_URL=wss://kaolin.hoodi.arkiv.network/rpc/ws
# Server Configuration
PORT=3000
NODE_ENV=developmentBefore running the server locally, copy the DrawIO public assets:
cp -r drawio-public public# Build and start services
docker compose up -d
# View logs
docker compose logs -fAccess the application at http://localhost:8900
# Install dependencies
bun install
# Build the project
bun run build
# Start development server
bun run dev-
Prepare your server:
- Ubuntu 20.04+ recommended
- Docker and Docker Compose installed
- Domain name pointing to your server IP
-
Clone and configure:
git clone https://github.com/m00npl/drawiodb.git cd drawiodb cp .env.example .env # Edit .env with your configuration
-
Deploy with Docker:
docker compose up -d
For production deployment with custom domain:
- DNS Setup: Point your domain A record to your server IP
- Reverse Proxy: Use nginx-proxy-manager or similar for SSL termination
- SSL Certificate: Automatic Let's Encrypt certificates recommended
Example nginx configuration:
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:8900;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}| Variable | Description | Required | Default |
|---|---|---|---|
GOLEM_CHAIN_ID |
Arkiv chain ID | Yes | 60138453025 |
GOLEM_PRIVATE_KEY |
Your funded private key | No* | - |
GOLEM_RPC_URL |
Arkiv RPC endpoint | Yes | - |
GOLEM_WS_URL |
Arkiv WebSocket endpoint | Yes | - |
PORT |
Server port | No | 3000 |
NODE_ENV |
Environment mode | No | development |
*Note: If GOLEM_PRIVATE_KEY is not provided, the backend runs in read-only mode and users must sign transactions with MetaMask.
The application runs as a single service:
- drawiodb: Unified application serving both the DrawIO interface (static files) and Backend API for Arkiv operations
The service uses port 8080 and handles all requests through a single container.
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β DrawIO UI βββββΆβ Backend API βββββΆβ Arkiv β
β (Frontend) β β (Node.js) β β (Blockchain) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
- Frontend: Modified DrawIO with Arkiv plugin integration
- Backend: Hono.js API server handling blockchain operations
- Storage: Arkiv blockchain for permanent diagram storage
- Authentication: MetaMask, custodial, or guest mode options
drawio/
βββ src/ # Backend source code
βββ drawio-custom/ # Modified DrawIO files
βββ drawio-public/ # DrawIO public assets
βββ dist/ # Compiled backend
βββ docker-compose.yml # Docker services
βββ Dockerfile # Container definition
βββ README.md # This file
# Install dependencies
bun install
# Build backend
bun run build
# Run tests
bun run test
# Start development server
bun run dev# Run comprehensive test suite
bun run test:all
# Run specific test types
bun run test:api
bun run test:ui- Open DrawIO DB: Navigate to your deployment URL
- Choose Authentication: Select wallet, custodial, or guest mode
- Create Diagram: Use the full DrawIO interface to create your diagram
- Save to Blockchain: Use "File β Save to Arkiv" to store permanently
- Load from Blockchain: Use "File β Open from Arkiv"
- Share Diagrams: Generate shareable links for public diagrams
- Export Options: Export to various formats (PNG, JPG, SVG, PDF)
- Private Keys: Never commit private keys to version control
- Environment Variables: Use
.envfiles for sensitive configuration - HTTPS: Always use HTTPS in production
- Blockchain Security: Diagrams are cryptographically secured on-chain
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License. See LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Demo: https://drawiodb.online
- Live Demo: https://drawiodb.online
- Arkiv: https://golemdb.io
- DrawIO: https://drawio.com
Made with β€οΈ for the decentralized web