What it does
ChainScribe is a web application for creating and managing technical documentation, like project wikis or API docs. Its key feature is that every major edit creates a new version, and the hash of each version’s content is stored immutably on the 0G Chain. The actual documentation files (written in Markdown) and their full version history are stored decentrally on 0G Storage. This provides a publicly verifiable, tamper-proof history of changes, ensuring the integrity and authenticity of the documentation.
The problem it solves
For open-source projects, technical manuals, or legal documents, establishing a trusted and unchangeable record of changes is crucial. Traditional platforms like Google Docs or centralized wikis lack inherent, easy-to-verify integrity guarantees. ChainScribe solves this by using blockchain for verification and decentralized storage for robust, censor-resistant data availability.
Challenges I ran into
- Initial Setup: The initial configuration of the 0G SDK and connecting it with our frontend application required careful reading of the documentation.
- Storage Workflow: Designing an efficient data structure to link on-chain hashes with their corresponding files on 0G Storage was a key challenge we overcame.
- State Management: Keeping the UI in sync with both on-chain transactions and storage upload statuses was complex but rewarding.
Technologies I used
- 0G Storage: For storing all documentation files, images, and the complete version history in a decentralized manner .
- 0G Chain: To record cryptographic hashes of each documentation version, providing an immutable and verifiable audit trail .
- React / Next.js: For the frontend user interface.
- Ethers.js / 0G SDK: To interact with the 0G blockchain and storage network.
How we built it
- Frontend: We built a responsive UI with React and Next.js.
- Smart Contracts: We deployed a lightweight smart contract on the 0G Chain to store and manage document hashes.
- Decentralized Storage: We integrated the 0G Storage SDK to upload and retrieve all document data and version histories. We utilized the Log Layer for its append-only structure, which is perfect for maintaining an immutable version history.
- Integration: The frontend uses Ethers.js to interact with our smart contract and the 0G SDK to manage storage operations.
What we learned
- The practical differences between using decentralized storage for data versus using a blockchain for verification.
- How to design a system that is both user-friendly and architecturally sound for Web3.
- The power of 0G’s infrastructure in building applications that require scalable, low-cost storage without sacrificing decentralization.
What’s next for
- 0G Compute Integration: Use 0G Compute to add AI-powered features like automated summarization of changes between versions or smart content suggestions.
- Access Control: Implement token-gated documentation for private or paid content.
- Enhanced Collaboration: Integrate real-time co-editing features for a more seamless user experience.
- Project Ecosystem: Allow grouping of documents into project-wide wikis with shared contributor lists.