Skip to content

wangdotjason/MedIPFS

Repository files navigation

MedIPFS

File sharing web application that uses IPFS protocol and Ethereum blockchain for decentralized file storage.

How it works

Architecture

This is a dApp or decentralized application with a simple frontend connected with a set of backend services composed by a Smart Contract deployed to Ganache Ethereum testnet and a storage service using IPFS.

The Smart Contract role is to store basic information about the users and files stored in the app.

Alt text

Stack

  • Solidity for Smart Contract development on Ethereum.
  • Truffle Suite for local infrastructure and SC deployment.
  • Ganache as a local development blockchain.
  • Metamask for in-browser user authentication.
  • React.js (Next.js Framework).
  • Tailwind CSS for styling components.
  • Ant UI framework for prebuilt UI components.

Basic Process

  1. The users connect their account to Metamask after pressing Connect button (the app attempts to do this automatically if there is an existing account logged in in Metamask).
  2. Once there is a connected account in the app, the app enables the button for start uploading files on the Upload section.
  3. Once you uploaded your first file, you will be able to see the result in the Files section (Below the upload section).

Running locally

Configuring the app

First, configure .env file for blockchain configuration

INFURA_PROJECT_ID = <Your Infura Project ID>
PRIVATE_KEY = <Your Infura private key>
ACCOUNT_ADDRESS = <Your Account Address>

Smart contract migration and deployment

First, initialize truffle project on the repo.

truffle init

Then migrate smart contracts to ganache.

truffle migrate --network development

Running frontend application

Then, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published