✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

Project Goldfish: Decentralized File ID Management on Sui Blockchain with Walrus

Project Goldfish is a pioneering decentralized application (dApp) built to showcase how to effectively manage and store file references (IDs) on the Sui blockchain. Leveraging the robust capabilities of Walrus storage (or similar services like IPFS), Goldfish focuses on creating an on-chain registry that links file IDs securely to user wallet addresses. This innovative approach ensures data integrity and provides a decentralized solution for file management.

The frontend of Project Goldfish is meticulously crafted using React, TypeScript, and Vite, utilizing the @mysten/dapp-kit for seamless Sui wallet interactions. The backend is powered by a sophisticated Sui Move smart contract, ensuring secure and efficient operations.

Use Cases

  • Decentralized Storage Management: Efficiently manage file IDs on the blockchain, linking them to user wallets for enhanced security and control.
  • Secure Data Referencing: Ensure the integrity of file references stored off-chain by anchoring them to the immutable Sui blockchain.
  • User Authentication and Access Control: Leverage Sui-compatible wallets for secure user authentication and controlled access to file IDs.
  • Integration with Web3 Applications: Seamlessly integrate with other decentralized applications on the Sui network, enhancing interoperability and functionality.
  • Proof of Existence: Establish proof of existence for files by recording their IDs on the blockchain, providing a verifiable timestamp and preventing tampering.

Key Features

  • User Authentication: Securely connect with Sui-compatible wallets, ensuring only authorized users can access and manage their file IDs.
  • File ID Registration:
    • Simulate file uploads to Walrus (or other storage services) for testing and development.
    • Future integration with actual Walrus file uploads, allowing real-world storage management.
    • Store the returned file ID (e.g., Walrus blobId) on the Sui blockchain, associated with the user’s wallet address, ensuring secure and verifiable referencing.
  • File ID Listing: Fetch and display the list of stored file IDs for the connected user, providing a clear overview of their managed files.
  • File ID Removal: Allow users to remove their file IDs from the on-chain registry, giving them full control over their data.
  • Sui Move Smart Contract:
    • FileRegistry shared object to store a Table<address, vector<String>> mapping user addresses to a list of their file ID strings, enabling efficient data retrieval.
    • Functions to add, remove, and retrieve file IDs, providing a comprehensive API for file management.
  • Modern Frontend:
    • Built with React, TypeScript, and Vite, ensuring a responsive and user-friendly interface.
    • Styled with Tailwind CSS and shadcn/ui components, providing a visually appealing and intuitive experience.
    • Uses @mysten/dapp-kit for seamless wallet integration and Sui blockchain interactions, simplifying the user experience.

Tech Stack

Project Goldfish leverages a cutting-edge tech stack to ensure optimal performance, security, and scalability:

  • Blockchain: Sui Network (Testnet)
  • Smart Contracts: Sui Move
  • Frontend:
    • React
    • TypeScript
    • Vite (Build Tool)
    • Tailwind CSS
    • shadcn/ui (UI Components)
  • Sui SDKs:
    • @mysten/sui (Core Sui SDK)
    • @mysten/dapp-kit (React hooks and components for Sui dApps)
    • @mysten/walrus (For Walrus storage interaction - planned/simulated)
    • @mysten/walrus-wasm (WASM bindings for Walrus SDK)
  • State Management: React Context (via @mysten/dapp-kit) & component state (useState, useEffect)

Getting Started

To get started with Project Goldfish, follow these steps:

  1. Backend (Sui Move Contract):
    • Navigate to the backend directory: cd goldfish_backend
    • Build the Move package: sui move build
    • Publish the Move package to Sui Testnet: sui client publish --gas-budget 50000000
    • Important: Note down the Package ID and the Object ID of the created FileRegistry shared object.
    • Update Constants: Open goldfish_frontend/src/constants.ts and update GOLDFISH_PACKAGE_ID and FILE_REGISTRY_OBJECT_ID.
  2. Frontend (React dApp):
    • Navigate to the frontend directory: cd ../goldfish_frontend
    • Install dependencies: pnpm install
    • Ensure WASM for Walrus is available.
    • Run the development server: pnpm dev
    • Open your browser and navigate to the local development URL.
    • Connect your Sui wallet (make sure it’s set to Testnet).

Future Enhancements

Project Goldfish has several planned enhancements to further improve its functionality and user experience:

  • Integrate Real Walrus Upload using the full lower-level Walrus SDK flow.
  • Fetch Real Metadata from Walrus to display detailed file information.
  • Store Original Filenames alongside blobIds for better UX.
  • Implement FileOptions Actions, including download, delete, and extend storage.
  • Improve Error Handling & UX throughout the application.
  • Implement Pagination for File List to handle a large number of files.
  • Add Unit & Integration Tests for robust performance.
  • Deploy to Production/Mainnet with updated constants and network configurations.

UBOS and the Future of Decentralized AI

UBOS is a full-stack AI Agent Development Platform that aligns perfectly with the principles of Project Goldfish. By bringing AI Agents to every business department, UBOS empowers organizations to orchestrate AI Agents, connect them with enterprise data, and build custom AI Agents with their LLM models and Multi-Agent Systems.

Imagine integrating Project Goldfish with UBOS. Files managed on the Sui blockchain could be seamlessly accessed and utilized by AI Agents within the UBOS ecosystem. This integration would enable powerful new use cases, such as:

  • AI-Driven Content Analysis: AI Agents could analyze files stored via Project Goldfish to extract insights, generate summaries, or identify patterns.
  • Automated Data Governance: AI Agents could enforce data governance policies on files stored on the blockchain, ensuring compliance and security.
  • Decentralized Knowledge Management: AI Agents could build a decentralized knowledge base from files stored on the blockchain, making information more accessible and discoverable.

By combining the power of decentralized file management with the intelligence of AI Agents, UBOS and Project Goldfish are paving the way for a future where data is more secure, accessible, and actionable.

Featured Templates

View More
AI Engineering
Python Bug Fixer
119 1433
AI Assistants
AI Chatbot Starter Kit v0.1
140 912
Verified Icon
AI Assistants
Speech to Text
137 1882
Customer service
Multi-language AI Translator
136 921
AI Characters
Sarcastic AI Chat Bot
129 1713

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.