An AI-powered decentralized design tool with encrypted storage using Walrus and Seal for hackathon demonstration.
- AI-Powered Design: Generate text, images, and design suggestions using OpenAI
- Decentralized Storage: Store designs securely using Walrus decentralized blob storage
- End-to-End Encryption: Protect designs with Seal identity-based encryption
- Canvas Editor: Full-featured design canvas with Fabric.js
- Access Control: Manage permissions and sharing with granular controls
- Modern UI: Built with Next.js, TypeScript, and Tailwind CSS
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS
- Canvas: Fabric.js
- AI: OpenAI GPT-4, DALL-E
- Storage: Walrus (decentralized blob storage)
- Encryption: Seal (identity-based encryption)
- Blockchain: Sui Network
-
Clone the repository
git clone <repository-url> cd decentralized_canva
-
Install dependencies
npm install --legacy-peer-deps
-
Set up environment variables Create a
.env.localfile in the root directory:# AI Services NEXT_PUBLIC_OPENAI_API_KEY=your_openai_key_here NEXT_PUBLIC_ANTHROPIC_API_KEY=your_claude_key_here # Walrus Configuration NEXT_PUBLIC_WALRUS_ENDPOINT=https://walrus-testnet.mystenlabs.com NEXT_PUBLIC_WALRUS_PUBLISHER_URL=https://publisher-testnet.walrus.space # Sui Network NEXT_PUBLIC_SUI_NETWORK=testnet NEXT_PUBLIC_SUI_RPC_URL=https://fullnode.testnet.sui.io # Mock Seal Configuration (for development) NEXT_PUBLIC_SEAL_ENABLED=true NEXT_PUBLIC_ENCRYPTION_MODE=mock
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Add Elements: Use the toolbar to add text, shapes, and images
- Edit Properties: Select objects to modify their properties in the right panel
- AI Assistant: Generate content using AI prompts
- Export/Import: Save and load designs in various formats
- Text Generation: Create headlines, body text, and CTAs
- Image Generation: Generate custom illustrations and graphics
- Design Analysis: Get AI feedback on your designs
- Color Suggestions: AI-powered color palette recommendations
- Encryption Status: Monitor encryption state of your designs
- Access Control: Manage user permissions and sharing
- Decentralized Storage: Store designs on Walrus network
src/
├── components/
│ ├── Canvas/ # Canvas editor components
│ ├── AI/ # AI-powered features
│ ├── Privacy/ # Encryption and access control
│ ├── Storage/ # Save/load functionality
│ └── UI/ # Reusable UI components
├── services/
│ ├── sealEncryption.ts # Mock Seal encryption service
│ ├── walrusClient.ts # Walrus storage client
│ ├── aiServices.ts # OpenAI integration
│ ├── accessControl.ts # Permission management
│ └── encryptedStorage.ts # Combined storage service
├── hooks/
│ ├── useCanvas.ts # Canvas state management
│ ├── useAI.ts # AI service integration
│ ├── useEncryption.ts # Encryption state
│ └── useWalrus.ts # Storage operations
├── utils/
│ ├── constants.ts # App constants
│ ├── aiPrompts.ts # AI prompt templates
│ └── helpers.ts # Utility functions
└── config/
└── environment.ts # Environment configuration
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- CanvasEditor: Main canvas interface with toolbar and properties
- AIAssistant: AI-powered content generation
- EncryptionStatus: Shows encryption state
- AccessControlPanel: Manage user permissions
- PropertyPanel: Edit selected object properties
- SealEncryptionService: Mock encryption (replace with real Seal SDK)
- WalrusClient: Decentralized storage (replace with real Walrus SDK)
- AIService: OpenAI integration for text and image generation
- AccessControlService: Permission management
- EncryptedStorageService: Combined storage with encryption
- Mock Services: Seal and Walrus services are mocked for development
- API Keys: Add your OpenAI API key to enable AI features
- Fabric.js: Canvas library with SSR support
- TypeScript: Full type safety throughout the application
- Responsive: Mobile-friendly design with Tailwind CSS
- Create component in
src/components/AI/ - Add service method in
src/services/aiServices.ts - Create hook in
src/hooks/useAI.ts - Add to AIAssistant component
- Add tool to
src/components/Canvas/Toolbar.tsx - Implement functionality in
src/hooks/useCanvas.ts - Add properties to
src/components/Canvas/PropertyPanel.tsx
- Modify
tailwind.config.jsfor theme customization - Update
src/app/globals.cssfor global styles - Use Tailwind classes throughout components
This project is created for hackathon demonstration purposes.
This is a hackathon project. For production use, replace mock services with real implementations:
- Seal SDK: Replace mock encryption with real Seal SDK
- Walrus SDK: Replace mock storage with real Walrus SDK
- Error Handling: Add comprehensive error handling
- Testing: Add unit and integration tests
- Security: Implement proper security measures
-
Build the project
npm run build
-
Deploy to Vercel
npx vercel
-
Set environment variables in your deployment platform
For questions or issues, please refer to the hackathon documentation or contact the development team.