DEV Community

Cover image for DRepo - A Decentralized Version Control System- DAY 1
08-swastik
08-swastik

Posted on

DRepo - A Decentralized Version Control System- DAY 1

In recent years, we know, blockchain technology has emerged as a transformative force, revolutionizing traditional models of data storage, security, and trust. In the 2 parts of this article series, we have explored the various terms related to Blockchain like Ethereum, Solidity smart Contracts, and we have built an actual working DApp (a decentralized application), where we have guided you in building the project from ground zero. This project was built as part of our flagship event Ten Days of Code held from 16th December 2023 to 25th December 2023, where we mentored students all over India in building projects from scratch across various domains.

Home Page

In this project ,we built a decentralised web based version control platform, serving as a central repository for developers to manage code and track changes. Now decentralised as by the name it goes there is no central authority for validation and verification instead the functionality is distributed across a network of nodes, eliminating the need for a central governing body. The project contains all basic features of user registration, repository creation, adding multiple commits with proper file storage.

This DApp is built using Solidity Smart Contracts and the frontend is built using the framework React JS, the application is deployed to the local blockchain network, Ganache. The whole project runs on an Ethereum supported browser, with the help of the Metamask extension. For building and compiling Truffle was used. Lastly, the frontend was connected to the solidity contract using web3. And we have used thirdWebStorage as a IPFS provider for storing code files.

To understand all these terms and how Blockchain works do watch the video below which was a live session from our event Ten Days of Code.

(Attach the recording of the day 1 intro session if possible)

What is a Blockchain?

A Blockchain is a sequential chain of blocks, where each block contains a list of transactions. These blocks are linked together using cryptographic hashes, forming a chain that spans the entire history of the system. The decentralized nature of the blockchain ensures that no single entity has control over the entire network, fostering transparency and resilience.

Beginner's Guide for Blockchain: Blockchain Guide

What are Smart Contracts?

Smart contracts are self-executing contracts with the terms of the agreement directly written into code. They operate on blockchain platforms, such as Ethereum, and automatically execute predefined actions when specific conditions are met. Essentially, they are programs that run on a blockchain, enabling trustless and automated transactions without the need for intermediaries. Keep reading, we will be writing a smart contract for our project use cases.

For in-depth details, click here.

Solidity - A Programming Language for Ethereum Smart Contracts

Solidity is the main programming language for writing smart contracts on the Ethereum blockchain. It is a contract-oriented language, implying that smart contracts are responsible for storing all of the programming logic that interacts with the blockchain. Solidity is a high-level programming language that shares similarities with JavaScript, Python, and C++.

You can refer to the official Solidity documentation here.

Also,

You can refer to the examples provided at Solidity by Example, where they teach Solidity through practical examples.


Top comments (0)