WalGraph is a revolutionary decentralized graph database that combines the power of SUI blockchain, Walrus protocol storage, and modern web technologies to create a truly distributed, censorship-resistant graph data management system.
WalGraph enables you to create, store, query, and analyze graph data structures in a completely decentralized manner. Unlike traditional graph databases that rely on centralized servers, WalGraph stores your data permanently on the Walrus protocol while maintaining metadata and access control on the SUI blockchain.
- Distributed Storage: Large graph data stored as JSON-LD on Walrus protocol
- No Single Point of Failure: Truly distributed system with no central authority
- Censorship Resistant: Your data cannot be deleted or modified by third parties
- CRUD Operations: Full Create, Read, Update, Delete for nodes and relationships
- Cypher-like Queries: Powerful query language with MATCH, WHERE, RETURN clauses
- Graph Algorithms: Built-in PageRank, degree centrality, connected components
- Path Finding: Shortest path and all paths between nodes
- Advanced Analytics: Comprehensive graph statistics and metrics
- Interactive Visualization: Real-time D3.js-powered graph rendering
- Intuitive Editor: Visual graph creation and editing interface
- Query Builder: User-friendly query construction and execution
- Responsive Design: Works seamlessly on desktop and mobile devices
- Wallet Connect: Seamless SUI wallet integration
- True Ownership: Users own their graph data through blockchain
- Smart Contracts: Automated access control and data integrity
- JSON-LD Standards: Semantic web compatibility and interoperability
WalGraph employs a sophisticated three-layer architecture:
┌─────────────────────────────────────────────────────┐
│ Frontend Layer │
│ Next.js + TypeScript + D3.js + Tailwind CSS │
└─────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────┐
│ Blockchain Layer │
│ SUI Smart Contracts (Move Language) │
│ │
│ • Access Control & Permissions │
│ • Ownership Tracking │
└─────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────┐
│ Storage Layer │
│ Walrus Protocol │
│ • Large Graph Data (JSON-LD Format) │
│ • Decentralized Content Storage │
│ • Content-Addressed Blob Storage │
└─────────────────────────────────────────────────────┘
- Graph Creation: Users create graphs in the web interface
- Local Processing: Graph algorithms and queries run client-side
- Serialization: Graph data is serialized to JSON-LD format
- Walrus Storage: Large graph data stored as blobs on Walrus
- Blockchain Registry: Ownership recorded on SUI
- Discovery: Public graphs discoverable through blockchain registry
- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first CSS framework
- D3.js: Interactive data visualization
- Monaco Editor: Code editor for queries
- Lucide React: Beautiful icon library
- SUI Blockchain: Layer 1 blockchain for metadata
- Move Language: Smart contract development
- Walrus Protocol: Decentralized blob storage
- JSON-LD: Semantic web data format
- ESLint: Code linting and formatting
- Turbopack: Next.js bundler for fast development
- React Query: Data fetching and caching
- UUID: Unique identifier generation
- Node.js 18+ installed
- SUI CLI installed
- SUI wallet (for testnet)
- Basic knowledge of graph databases
git clone https://github.com/yourusername/walgraph.git
cd walgraphcd frontend
npm install --legacy-peer-depsCreate frontend/.env.local:
# SUI Contract Configuration (TESTNET)
NEXT_PUBLIC_PACKAGE_ID=0x[your_package_id]
NEXT_PUBLIC_REGISTRY_ID=0x[your_registry_id]
# Walrus Configuration (TESTNET)
NEXT_PUBLIC_WALRUS_AGGREGATOR_URL=https://aggregator-devnet.walrus.space
NEXT_PUBLIC_WALRUS_PUBLISHER_URL=https://publisher-devnet.walrus.space
# Network Configuration
NEXT_PUBLIC_SUI_NETWORK=testnet
NEXT_PUBLIC_WALRUS_NETWORK=testnet# Navigate to contracts directory
cd sui_contracts
# Build contracts
sui move build
# Deploy to testnet
sui client publish --gas-budget 100000000cd frontend
npm run devVisit http://localhost:3000 to access the application.
- Connect Wallet: Click "Connect Wallet" and approve the connection
- Create Nodes: Use the "Create" tab to add nodes with properties
- Add Relationships: Connect nodes with labeled relationships
- Visualize: See your graph rendered in real-time
- Save: Store your graph on Walrus and SUI blockchain
WalGraph supports Cypher-like query syntax:
MATCH (person:Person)-[r:KNOWS]-(friend:Person)
WHERE person.name = "Alice"
RETURN person, r, friendRun built-in algorithms:
- Degree Centrality: Find the most connected nodes
- PageRank: Identify influential nodes
- Connected Components: Discover graph clusters
- Shortest Path: Find optimal routes between nodes
walgraph/
├── frontend/ # Next.js web application
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # React components
│ │ ├── lib/ # Utility libraries
│ │ └── services/ # API services
│ └── public/ # Static assets
├── sui_contracts/ # SUI Move smart contracts
│ ├── sources/ # Move source files
│ └── Move.toml # Package configuration
├── walrus-verification/ # Walrus integration tools
└── deployment-guide.md # Detailed deployment instructions
The Move smart contracts provide:
- Graph Metadata Management: Store graph information on-chain
- Access Control: Manage public/private graph permissions
- Owner Verification: Ensure only owners can modify their graphs
- Graph Discovery: Public registry for finding shared graphs
- Version Control: Track graph updates and versions
- Tag-based Search: Organize graphs with custom tags
The frontend follows modern React patterns:
- Component-Based: Modular, reusable UI components
- Type Safety: Full TypeScript coverage
- State Management: React Query for server state
- Responsive Design: Mobile-first approach
- Accessibility: WCAG 2.1 compliance
- Citation Networks: Model academic paper relationships
- Collaboration Graphs: Track researcher collaborations
- Knowledge Graphs: Build semantic research databases
- Decentralized Social: Build censorship-resistant social platforms
- Community Analysis: Analyze social group dynamics
- Influence Mapping: Identify key community members
- Supply Chain: Model complex supply relationships
- Organizational Charts: Visualize company structures
- Customer Journey: Track user interaction patterns
- Transaction Graphs: Analyze blockchain transaction flows
- Protocol Relationships: Model DeFi protocol interactions
- Token Flow Analysis: Track asset movements
- Blockchain Proof: Ownership recorded immutably on SUI
- Private Keys: Only you control your data
- Access Control: Granular permissions management
For detailed deployment instructions, see our Deployment Guide.
The frontend can be easily deployed on Vercel:
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prodDeploy on your own infrastructure:
# Build production assets
npm run build
# Start production server
npm startWe welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Code Quality: Follow TypeScript best practices
- Testing: Add tests for new features
- Documentation: Update docs for API changes
- Performance: Consider performance implications
- Security: Follow security best practices
- Graph Algorithms: Implement new analysis algorithms
- UI/UX: Improve user interface and experience
- Performance: Optimize query processing
- Mobile: Enhance mobile responsiveness
- Documentation: Improve guides and tutorials
- SUI Blockchain Documentation
- Walrus Protocol Documentation
- Move Programming Language
- JSON-LD Specification
This project is licensed under the MIT License - see the LICENSE file for details.
- SUI Foundation: For providing the blockchain infrastructure
- Walrus Team: For decentralized storage protocol
- Move Community: For the smart contract language
- Open Source Community: For the amazing tools and libraries
Built with ❤️ by the WalGraph Team
Democratizing graph data storage and analysis through decentralization